diff options
author | des <des@FreeBSD.org> | 2008-10-20 17:26:30 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2008-10-20 17:26:30 +0000 |
commit | 87e3b3e46d09d6928ebb3b0cfb84ab6f887adbb8 (patch) | |
tree | 2dec73bf08a4bd4586c7bf0b483c142cc4b3964e /tools | |
parent | 0cf0f083d0077e6dffc74d8105bbc6812785e68c (diff) | |
download | FreeBSD-src-87e3b3e46d09d6928ebb3b0cfb84ab6f887adbb8.zip FreeBSD-src-87e3b3e46d09d6928ebb3b0cfb84ab6f887adbb8.tar.gz |
#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.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/regression/lib/libutil/test-flopen.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/regression/lib/libutil/test-flopen.c b/tools/regression/lib/libutil/test-flopen.c index 62fa699..c8191d0 100644 --- a/tools/regression/lib/libutil/test-flopen.c +++ b/tools/regression/lib/libutil/test-flopen.c @@ -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 }, }; |