From owner-svn-src-all@FreeBSD.ORG Mon Oct 20 17:26:30 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BEEAE106574B; Mon, 20 Oct 2008 17:26:30 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ACD488FC14; Mon, 20 Oct 2008 17:26:30 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9KHQUlO076590; Mon, 20 Oct 2008 17:26:30 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9KHQUgb076589; Mon, 20 Oct 2008 17:26:30 GMT (envelope-from des@svn.freebsd.org) Message-Id: <200810201726.m9KHQUgb076589@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Mon, 20 Oct 2008 17:26:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184090 - head/tools/regression/lib/libutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Oct 2008 17:26:30 -0000 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 }, };