3 # Run a simple backup of the Bacula build directory
6 if test ! -d weird-files ; then
8 echo "Weird files not configured. Test not run."
12 scripts/copy-test-confs
15 # Note, we save the weird-files directory twice on purpose
16 # because this causes problems with hard linked files
17 # that are only saved once. In 1.33, Bacula now deals
18 # with this situation.
20 echo "${cwd}/weird-files" >/tmp/file-list
21 echo "${cwd}/weird-files" >>/tmp/file-list
25 echo " === Starting weird filenames test ==="
26 echo " === Starting weird filenames test ===" >>working/log
29 # bin/bacula start 2>&1 >/dev/null
31 bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
45 restore where=${cwd}/tmp/bacula-restores select all storage=File done
52 scripts/check_for_zombie_jobs storage=File
53 bin/bacula stop 2>&1 >/dev/null
54 ${cwd}/bin/testls weird-files | sort >${cwd}/tmp/original
55 cd tmp/bacula-restores${cwd}
56 ${cwd}/bin/testls weird-files | sort >${cwd}/tmp/restored
58 grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
60 grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
62 diff ${cwd}/tmp/original ${cwd}/tmp/restored 2>&1 >/dev/null
63 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
66 echo " !!!!! Weird files test failed!!! !!!!! "
67 echo " !!!!! Weird files test failed!!! !!!!! " >>test.out
70 echo " ===== Weird files test OK ===== "
71 echo " ===== Weird files test OK ===== " >>test.out