]> git.sur5r.net Git - bacula/bacula/commitdiff
Make several dir names unique to avoid test collisions
authorKern Sibbald <kern@sibbald.com>
Thu, 17 Sep 2009 13:18:40 +0000 (15:18 +0200)
committerKern Sibbald <kern@sibbald.com>
Thu, 17 Sep 2009 13:18:40 +0000 (15:18 +0200)
regress/tests/acl-xattr-test
regress/tests/exclude-dir-test

index 70c73d5f126292f35abc5532586e84fb771f818d..a5bda93b90d91bbf231a1171f669bde26065a8b0 100755 (executable)
@@ -61,17 +61,17 @@ d=${cwd}/build/acl
 uid=`id -u`
 rm -rf $d
 mkdir -p $d
-mkdir -p $d/testdir
+mkdir -p $d/acl-dir
 cp ${cwd}/bin/bconsole $d
 
 case `uname -s` in
    Linux)
-      setfacl -m d:user:$uid:r-x $d/testdir
-      setfacl -m d:user:root:-wx $d/testdir
-      setfacl -m user:nobody:--- $d/testdir
+      setfacl -m d:user:$uid:r-x $d/acl-dir
+      setfacl -m d:user:root:-wx $d/acl-dir
+      setfacl -m user:nobody:--- $d/acl-dir
       setfacl -m user:nobody:--- $d/bconsole
       setfacl -m group:nogroup:--x $d/bconsole
-      cp ${cwd}/bin/bconsole $d/testdir
+      cp ${cwd}/bin/bconsole $d/acl-dir
       cp ${cwd}/bin/bconsole $d/other
       attr -s bacula.test -V rulez $d/other 2>/dev/null 1>/dev/null
 
@@ -81,12 +81,12 @@ case `uname -s` in
       )
       ;;
    Darwin)
-      chmod +a "user:$uid allow read execute" $d/testdir
-      chmod +a "user:root allow write execute" $d/testdir
-      chmod +a "user:nobody deny read write execute" $d/testdir
+      chmod +a "user:$uid allow read execute" $d/acl-dir
+      chmod +a "user:root allow write execute" $d/acl-dir
+      chmod +a "user:nobody deny read write execute" $d/acl-dir
       chmod +a "user:nobody deny read write execute" $d/bconsole
       chmod +a "group:nogroup allow execute" $d/bconsole
-      cp ${cwd}/bin/bconsole $d/testdir
+      cp ${cwd}/bin/bconsole $d/acl-dir
       cp ${cwd}/bin/bconsole $d/other
       xattr -w  bacula.test "rulez" $d/other 2>/dev/null 1>/dev/null
 
@@ -101,15 +101,15 @@ case `uname -s` in
       #
       df -F zfs $d > /dev/null 2>&1
       if [ $? = 0 ]; then
-         chmod A+user:$uid:rx:allow $d/testdir
-         chmod A+user:root:wx:allow $d/testdir
-         chmod A+user:nobody:rwx:deny $d/testdir
+         chmod A+user:$uid:rx:allow $d/acl-dir
+         chmod A+user:root:wx:allow $d/acl-dir
+         chmod A+user:nobody:rwx:deny $d/acl-dir
          chmod A+user:nobody:rwx:deny $d/bconsole
          chmod A+group:nogroup:x:allow $d/bconsole
       else
-         chmod A+user:$uid:r-x $d/testdir
-         chmod A+user:root:-wx $d/testdir
-         chmod A+user:nobody:--- $d/testdir
+         chmod A+user:$uid:r-x $d/acl-dir
+         chmod A+user:root:-wx $d/acl-dir
+         chmod A+user:nobody:--- $d/acl-dir
          chmod A+user:nobody:--- $d/bconsole
          chmod A+group:nogroup:--x $d/bconsole
       fi
index 6cfacc7057e7eda3bfadc4c7275e32f201ea8364..8c9334adb736dbeb11729ad01511934be3886a17 100755 (executable)
@@ -38,9 +38,9 @@ cp -f $tmp/1 $conf/bacula-dir.conf
 change_jobname CompressedTest $JobName
 start_test
 
-mkdir ${cwd}/build/src/testdir
-touch ${cwd}/build/src/testdir/.nobkp
-cp ${cwd}/build/src/dird/*.c ${cwd}/build/src/testdir
+mkdir ${cwd}/build/src/xxtestdir
+touch ${cwd}/build/src/xxtestdir/.nobkp
+cp ${cwd}/build/src/dird/*.c ${cwd}/build/src/xxtestdir
 
 cat >tmp/bconcmds <<END_OF_DATA
 @$out /dev/null
@@ -67,13 +67,13 @@ stop_bacula
 
 check_two_logs
 
-# should be ok if we remove the testdir
-rm -rf ${cwd}/build/src/testdir
+# should be ok if we remove the xxtestdir
+rm -rf ${cwd}/build/src/xxtestdir
 check_restore_diff
 
-grep '/testdir' $tmp/log3.out > /dev/null
+grep '/xxtestdir' $tmp/log3.out > /dev/null
 if [ $? = 0 ]; then
-    print_debug "ERROR: Should not see testdir in estimate output"
+    print_debug "ERROR: Should not see xxtestdir in estimate output"
     bstat=2
 fi