]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/tests/weird-files-test
Use getfattr and setfattr on Linux not attr as that is a XFS tool which works too...
[bacula/bacula] / regress / tests / weird-files-test
index 4174ec43718d173b1d09772d2c8ae0e220376175..bd211f0b1de277fb03cc9ddbfab20ce51e67be24 100755 (executable)
@@ -6,7 +6,6 @@
 TestName="weird-files-test"
 JobName=wierd-files
 . scripts/functions
-set_debug 0
 
 if test ! -d weird-files ; then
    echo " "
@@ -15,17 +14,22 @@ if test ! -d weird-files ; then
 fi
 
 cwd=`pwd`
-scripts/copy-test-confs
 scripts/cleanup
-change_jobname $JobName
+scripts/copy-test-confs
+change_jobname NightlySave $JobName
 #
 # Note, we save the weird-files directory twice on purpose
 #  because this causes problems with hard linked files 
 #  that are only saved once.  In 1.33, Bacula now deals
 #  with this situation.
 #
-echo "${cwd}/weird-files" >/tmp/file-list
-echo "${cwd}/weird-files" >>/tmp/file-list
+echo "${cwd}/weird-files" >${cwd}/tmp/file-list
+echo "${cwd}/weird-files" >>${cwd}/tmp/file-list
+
+# Create a Unix domain socket (sock-file)
+cd weird-files
+perl socket.pl
+cd ..
 
 start_test
 
@@ -50,13 +54,16 @@ done
 yes
 wait
 messages
-@$out
 quit
 END_OF_DATA
 
 run_bacula
 check_for_zombie_jobs storage=File 
 stop_bacula
+# Note, the Unix domain socket (sock-file) is not restored
+#  by Bacula so we delete it for the diffs
+rm -f weird-files/sock-file
+touch weird-files tmp/bacula-restores${cwd}/weird-files
 
 ${cwd}/bin/testls weird-files | sort >${cwd}/tmp/original
 cd tmp/bacula-restores${cwd}
@@ -64,6 +71,7 @@ ${cwd}/bin/testls weird-files | sort >${cwd}/tmp/restored
 cd ${cwd}
 
 check_two_logs
-diff ${cwd}/tmp/original ${cwd}/tmp/restored 2>&1 >/dev/null
+#diff -u ${cwd}/tmp/original ${cwd}/tmp/restored 2>&1 >/dev/null
+diff -u ${cwd}/tmp/original ${cwd}/tmp/restored                
 dstat=$?
 end_test