From: Kern Sibbald Date: Tue, 11 Aug 2009 10:20:28 +0000 (+0200) Subject: Change backup-acl to acl-xattr-test and make it skip if acl/xattr not installed X-Git-Tag: Release-7.0.0~2650^2~14 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1d2ef315817e0e1e3e62fc2b1faab740d7068928;p=bacula%2Fbacula Change backup-acl to acl-xattr-test and make it skip if acl/xattr not installed --- 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