]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/tests/fileregexp-test
Use getfattr and setfattr on Linux not attr as that is a XFS tool which works too...
[bacula/bacula] / regress / tests / fileregexp-test
index a30d1285772aaa4cedaf1ef5bfa32be4f9ea253e..e4dbe2678612f0423ad6341e65b96be2ac303666 100755 (executable)
@@ -20,14 +20,14 @@ echo "s%File Retention =%File Retention = 2 #%" >>  ${outf}
 cp ${scripts}/bacula-dir.conf ${tmp}/1
 sed -f ${outf} ${tmp}/1 >${scripts}/bacula-dir.conf
 
-change_jobname Client1 $JobName
+change_jobname BackupClient1 $JobName
 start_test
 
 cat <<END_OF_DATA >${tmp}/bconcmds
-@output /dev/null
+@$out /dev/null
 messages
 @$out ${tmp}/log1.out
-label volume=TestVolume001 storage=File pool=Default
+label volume=TestVolume001 storage=File pool=File
 run job=$JobName yes
 wait
 messages
@@ -44,7 +44,6 @@ README
 yes
 wait
 messages
-@$out
 quit
 END_OF_DATA
 
@@ -52,11 +51,18 @@ run_bacula
 check_for_zombie_jobs storage=File
 stop_bacula
 
+#
+# The above restore should have restored some directories, but only
+# files that have README in their name.  There should in fact, be
+# no other files restored COUNT_OTHER==0 and 13 README files restored.
+# We complain if there are less than 11
+#
 COUNT_OTHER=`find ${tmp}/bacula-restores -type f | grep -v README | wc -l`
 COUNT_README=`find ${tmp}/bacula-restores -type f | grep README | wc -l`
 
-if [ $COUNT_OTHER -gt 0 -o $COUNT_README -lt 15 ]; then
+if [ $COUNT_OTHER -gt 0 -o $COUNT_README -lt 11 ]; then
     print_debug "Found non matching files"
+    print debug "Count_other=$COUNT_OTHER count_readme=$COUNT_README"
     print_debug `find ${tmp}/bacula-restores -type f | grep -v README`
     rstat=2
 fi