Date: Mon, 17 Nov 2008 21:06:17 +0000 (UTC) From: Tim Kientzle <kientzle@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r185030 - head/lib/libarchive/test Message-ID: <200811172106.mAHL6H1s092944@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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()));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811172106.mAHL6H1s092944>