Date: Mon, 20 Oct 2008 17:26:30 +0000 (UTC) From: Dag-Erling Smorgrav <des@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r184090 - head/tools/regression/lib/libutil Message-ID: <200810201726.m9KHQUgb076589@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: des Date: Mon Oct 20 17:26:30 2008 New Revision: 184090 URL: http://svn.freebsd.org/changeset/base/184090 Log: #ifdef out the lock-against-self test. I'm not sure it makes sense, and it relies on non-portable flock(2) semantics. Not only is flock(2) not portable, but on some OSes that do have it, it is implemented in terms of fcntl(2) locks, which are per-process rather than per-descriptor. Modified: head/tools/regression/lib/libutil/test-flopen.c Modified: head/tools/regression/lib/libutil/test-flopen.c ============================================================================== --- head/tools/regression/lib/libutil/test-flopen.c Mon Oct 20 17:24:25 2008 (r184089) +++ head/tools/regression/lib/libutil/test-flopen.c Mon Oct 20 17:26:30 2008 (r184090) @@ -89,6 +89,7 @@ test_flopen_open(void) return (result); } +#if FLOPEN_CAN_LOCK_AGAINST_SELF /* * Test that flopen() can lock against itself */ @@ -114,6 +115,7 @@ test_flopen_lock_self(void) unlink(fn); return (result); } +#endif /* * Test that flopen() can lock against other processes @@ -152,7 +154,9 @@ static struct test { } t[] = { { "flopen_create", test_flopen_create }, { "flopen_open", test_flopen_open }, +#if FLOPEN_CAN_LOCK_AGAINST_SELF { "flopen_lock_self", test_flopen_lock_self }, +#endif { "flopen_lock_other", test_flopen_lock_other }, };
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810201726.m9KHQUgb076589>