From 61b68482e25ed1250c365252ec0f60c284cc3722 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sat, 30 Aug 2008 16:40:28 +0000 Subject: [PATCH] Check Restore Error status + fix virtual-backup-test script git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7529 91ce42f0-d328-0410-95d8-f526ca767f89 --- regress/scripts/functions | 8 ++++++-- regress/tests/virtual-backup-test | 7 +++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/regress/scripts/functions b/regress/scripts/functions index 4ce89add89..b468081304 100644 --- a/regress/scripts/functions +++ b/regress/scripts/functions @@ -194,14 +194,18 @@ check_two_logs() fi grep "^ Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null rstat=$? - grep "^ Termination: *Restore OK -- warning file count mismatch" tmp/log2.out 2>&1 >/dev/null + grep "^ Termination: .*Restore Error" tmp/log2.out 2>&1 >/dev/null if test $? -eq 0; then rstat=2 fi - grep "^ Termination: .*Verify Differences" tmp/log2.out 2>&1 >/dev/null + grep "^ Termination: *Restore OK -- warning file count mismatch" tmp/log2.out 2>&1 >/dev/null if test $? -eq 0; then rstat=3 fi + grep "^ Termination: .*Verify Differences" tmp/log2.out 2>&1 >/dev/null + if test $? -eq 0; then + rstat=4 + fi } check_restore_diff() diff --git a/regress/tests/virtual-backup-test b/regress/tests/virtual-backup-test index 67e9e41491..d613fe2474 100755 --- a/regress/tests/virtual-backup-test +++ b/regress/tests/virtual-backup-test @@ -59,7 +59,6 @@ list volumes @# @# now do a normal restore of normal backups @# -@$out ${cwd}/tmp/log2.out setdebug level=10 dir restore where=${cwd}/tmp/bacula-restores select unmark * @@ -78,7 +77,6 @@ list jobs @# @# now do a restore of the consolidated Full @# -@$out ${cwd}/tmp/log2.out restore where=${cwd}/tmp/bacula-restores select storage=DiskChanger unmark * mark * @@ -96,6 +94,11 @@ run_bacula check_for_zombie_jobs storage=File stop_bacula +# +# We only used one log so copy it to the second log +# so that any restore errors will be picked up +# +cp -f ${cwd}/tmp/log1.out ${cwd}/tmp/log2.out check_two_logs check_restore_diff end_test -- 2.39.5