]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/tests/weird-files-test
Make out of freespace non-fatal for removable devices -- i.e. behaves like tape
[bacula/bacula] / regress / tests / weird-files-test
index c7d4b202e091723969e708fc25d00b1f780b7748..416cdc76ddac8520a9168d82a4cc437cbac786d5 100755 (executable)
@@ -1,4 +1,9 @@
 #!/bin/sh
+#
+# Copyright (C) 2000-2015 Kern Sibbald
+# License: BSD 2-Clause; see file LICENSE-FOSS
+#
+
 #
 # Run a simple backup of the Bacula build directory
 #   then restore it.
@@ -34,7 +39,7 @@ cd ..
 start_test
 
 cat <<END_OF_DATA >tmp/bconcmds
-@$out /dev/null
+@output /dev/null
 messages
 @$out tmp/log1.out
 label storage=File
@@ -60,22 +65,20 @@ 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
+#  by Bacula so we delete it for the diffs. diff.pl already discards them
+# rm -f weird-files/sock-file
+
+# to have the same mtime after the rm, we need to touch directories
+# touch weird-files tmp/bacula-restores${cwd}/weird-files
+
 
-${cwd}/bin/testls weird-files | sort >${cwd}/tmp/original
-cd tmp/bacula-restores${cwd}
-${cwd}/bin/testls weird-files | sort >${cwd}/tmp/restored
-cd ${cwd}
+$rscripts/diff.pl -s weird-files -d tmp/bacula-restores${cwd}/weird-files > tmp/diff.out
+dstat=$?
 
 check_two_logs
 if test "$debug" -eq 1; then
-  diff -u ${cwd}/tmp/original ${cwd}/tmp/restored                
-  dstat=$?
-else
-  diff -u ${cwd}/tmp/original ${cwd}/tmp/restored 2>&1 >/dev/null
-  dstat=$?
+  cat tmp/diff.out
 fi
 end_test