]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
regress: Fix verify-cat-test and verify-vol-test
authorEric Bollengier <eric@baculasystems.com>
Wed, 11 Jan 2023 14:01:21 +0000 (15:01 +0100)
committerEric Bollengier <eric@baculasystems.com>
Thu, 14 Sep 2023 11:57:00 +0000 (13:57 +0200)
regress/tests/resume-job-test
regress/tests/verify-cat-test

index 663671a2f3cfaf4452d1976c08c99ad003b8c5be..36a7622d1764f57e715ce7ae05e95a29435e5dd5 100755 (executable)
@@ -37,6 +37,13 @@ Pool {
 }
 EOF
 
+cat <<EOF > $tmp/updatepo
+#!/bin/sh
+touch $cwd/build/po/*.po
+EOF
+
+chmod +x $tmp/updatepo
+
 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
 @output /dev/null
 messages
@@ -48,7 +55,7 @@ wait
 resume incomplete jobid=1
 wait
 messages
-@exec "sh -c 'touch $cwd/build/po/*.po'"
+@exec "$tmp/updatepo"
 setdebug level=0 trace=0 hangup=5 client
 run job=$JobName level=Incremental yes pool=PoolA
 wait
index 5c957f54a34f1b69a22dcbecea4f936853a5405c..3588b99c16cdc5446de28eb3957daf622f528d0e 100755 (executable)
@@ -81,7 +81,7 @@ run_bacula
 check_for_zombie_jobs storage=File
 stop_bacula
 
-while IFS= read -r line <&3; do
+while IFS= read line ; do
    grep "Veryfying: ${line}" tmp/log1.out > /dev/null
    if [ $? -ne 0 ]; then
       estat=1
@@ -94,7 +94,7 @@ while IFS= read -r line <&3; do
       print_debug "Did not found ${line} file in verified files log!"
       print_debug "see: ${cwd}/tmp/original"
    fi
-done 3< ${files_listing}
+done < ${files_listing}
 
 
 grep "^  Termination: *Verify OK" tmp/log1.out 2>&1 >/dev/null
@@ -102,7 +102,7 @@ bstat=$?
 grep "^  Termination: *Verify OK" ${cwd}/tmp/original 2>&1 >/dev/null
 rstat=$?
 
-while IFS= read -r line <&3; do
+while IFS= read line ; do
    grep "Veryfying: ${line}" tmp/log2.out > /dev/null
    if [ $? -eq 0 ]; then
       estat=1
@@ -115,6 +115,6 @@ while IFS= read -r line <&3; do
       print_debug "Found ${line} file in verified files log, no files should be listed now!"
       print_debug "see: ${cwd}/tmp/log3.out"
    fi
-done 3< ${files_listing}
+done < ${files_listing}
 
 end_test