From: Eric Bollengier Date: Wed, 11 Jan 2023 14:01:21 +0000 (+0100) Subject: regress: Fix verify-cat-test and verify-vol-test X-Git-Tag: Beta-15.0.0~276 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=10bb6ed0fddea4320c1ff4fbc7d58394de56837c;p=thirdparty%2Fbacula.git regress: Fix verify-cat-test and verify-vol-test --- diff --git a/regress/tests/resume-job-test b/regress/tests/resume-job-test index 663671a2f..36a7622d1 100755 --- a/regress/tests/resume-job-test +++ b/regress/tests/resume-job-test @@ -37,6 +37,13 @@ Pool { } EOF +cat < $tmp/updatepo +#!/bin/sh +touch $cwd/build/po/*.po +EOF + +chmod +x $tmp/updatepo + cat <${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 diff --git a/regress/tests/verify-cat-test b/regress/tests/verify-cat-test index 5c957f54a..3588b99c1 100755 --- a/regress/tests/verify-cat-test +++ b/regress/tests/verify-cat-test @@ -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