From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 21:06:17 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 F1506106567B; Mon, 17 Nov 2008 21:06:17 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DDC7E8FC14; Mon, 17 Nov 2008 21:06:17 +0000 (UTC) (envelope-from kientzle@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 mAHL6H6c092945; Mon, 17 Nov 2008 21:06:17 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAHL6H1s092944; Mon, 17 Nov 2008 21:06:17 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <200811172106.mAHL6H1s092944@svn.freebsd.org> From: Tim Kientzle Date: Mon, 17 Nov 2008 21:06:17 +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: r185030 - head/lib/libarchive/test 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, 17 Nov 2008 21:06:18 -0000 Author: kientzle Date: Mon Nov 17 21:06:17 2008 New Revision: 185030 URL: http://svn.freebsd.org/changeset/base/185030 Log: When running on a filesystem that lacks ACL support, just SKIP the test, don't report a test failure. Modified: head/lib/libarchive/test/test_acl_freebsd.c Modified: head/lib/libarchive/test/test_acl_freebsd.c ============================================================================== --- head/lib/libarchive/test/test_acl_freebsd.c Mon Nov 17 20:49:29 2008 (r185029) +++ head/lib/libarchive/test/test_acl_freebsd.c Mon Nov 17 21:06:17 2008 (r185030) @@ -200,19 +200,19 @@ DEFINE_TEST(test_acl_freebsd) /* Create a test file and try to set an ACL on it. */ fd = open("pretest", O_WRONLY | O_CREAT | O_EXCL, 0777); failure("Could not create test file?!"); - n = -1; - if (assert(fd >= 0)) { - n = acl_set_fd(fd, acl); - failure("acl_set_fd(): errno = %d (%s)", - errno, strerror(errno)); - assertEqualInt(0, n); - close(fd); - } + if (!assert(fd >= 0)) + return; - if (fd < 0 || n != 0) { + n = acl_set_fd(fd, acl); + if (n != 0 && errno == EOPNOTSUPP) { + close(fd); skipping("ACL tests require that ACL support be enabled on the filesystem"); return; } + failure("acl_set_fd(): errno = %d (%s)", + errno, strerror(errno)); + assertEqualInt(0, n); + close(fd); /* Create a write-to-disk object. */ assert(NULL != (a = archive_write_disk_new()));