From 09dba37649c7b11df0342a03af581e746c835e82 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Tue, 11 Aug 2009 12:20:28 +0200 Subject: [PATCH] Change backup-acl to acl-xattr-test and make it skip if acl/xattr not installed --- regress/DartTestfile.txt.in | 1 + regress/all-disk-tests | 1 + regress/tests/acl-xattr-test | 21 ++++++++++++++++++--- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/regress/DartTestfile.txt.in b/regress/DartTestfile.txt.in index d7da80e55b..7389690ffc 100644 --- a/regress/DartTestfile.txt.in +++ b/regress/DartTestfile.txt.in @@ -1,5 +1,6 @@ +ADD_TEST(disk:acl-xattr-test "@regressdir@/tests/acl-xattr-test") ADD_TEST(disk:accurate-test "@regressdir@/tests/accurate-test") ADD_TEST(disk:auto-label-test "@regressdir@/tests/auto-label-test") ADD_TEST(disk:backup-bacula-test "@regressdir@/tests/backup-bacula-test") diff --git a/regress/all-disk-tests b/regress/all-disk-tests index 31fe6ff5d8..76229f4b14 100755 --- a/regress/all-disk-tests +++ b/regress/all-disk-tests @@ -6,6 +6,7 @@ echo " " echo " " >>test.out echo "Start non-root disk tests" echo "Start non-root disk tests" >>test.out +nice tests/acl-xattr-test nice tests/accurate-test nice tests/auto-label-test nice tests/backup-bacula-test diff --git a/regress/tests/acl-xattr-test b/regress/tests/acl-xattr-test index b9da95c554..8fd26c12d2 100755 --- a/regress/tests/acl-xattr-test +++ b/regress/tests/acl-xattr-test @@ -3,18 +3,33 @@ # Run a backup of the Bacula build directory with some acls # then restore it. # -# The fs have to be mount with the acl option (mount -o remount,acl,user_xattr /tmp) -# on ubuntu, it needs the attr package +# Your filesystem must be mounted with the acl option (mount -o remount,acl,user_xattr /tmp) +# on ubuntu, the attr package must be installed # # For this script to work, you will also need a number of acl packages loaded # not default on Debian derivatives: # apt-get install acl libacl1 libacl1-dev attr # -TestName="backup-acl-test" +TestName="acl-xattr-test" JobName=backup . scripts/functions require_linux + +# Require getfacl to be installed +getfacl Makefile 2>&1 >/dev/null +if test $? -ne 0; then + echo "$TestName skipped: getfacl not installed" + exit 0 +fi + +# Require getfattr to be installed +getfattr -d Makefile 2>&1 >/dev/null +if test $? -ne 0; then + echo "$TestName skipped: getfattr not installed" + exit 0 +fi + scripts/cleanup scripts/copy-confs -- 2.39.5