From: Eric Bollengier Date: Sun, 21 Nov 2010 16:47:54 +0000 (+0100) Subject: regress: Update delta plugin to raise error if we get delta back melted X-Git-Tag: Release-7.0.0~1358 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e0f60230f358d1d768466d2b26cbebed983422bc;p=bacula%2Fbacula regress: Update delta plugin to raise error if we get delta back melted --- diff --git a/regress/tests/delta-test b/regress/tests/delta-test index 857888147d..19ee993ec8 100755 --- a/regress/tests/delta-test +++ b/regress/tests/delta-test @@ -38,15 +38,17 @@ label storage=File volume=TestVolume001 setdebug level=150 client=$CLIENT estimate job=$JobName level=Full setdebug level=50 client=$CLIENT -run job=$JobName yes +run job=$JobName comment="read 400 bytes of passwd" yes wait status client=$CLIENT messages -run job=$JobName level=Incremental yes +run job=$JobName comment="read 100 bytes of group" level=Incremental yes wait messages -status client=$CLIENT -run job=$JobName level=Incremental yes +run job=$JobName comment="read 100 bytes of hosts" level=Incremental yes +wait +messages +run job=$JobName comment="read 100 bytes of services" level=Incremental yes wait messages status client=$CLIENT @@ -85,18 +87,25 @@ check_two_logs stop_bacula -head -c 100 /etc/passwd > $tmp/source -diff -u $tmp/source $tmp/delta.txt > $tmp/d +head -c 50 /etc/passwd > $tmp/source +head -c 50 /etc/group >> $tmp/source +head -c 50 /etc/hosts >> $tmp/source +head -c 100 /etc/services >> $tmp/source +head -c 400 /etc/passwd | tail -c 150 >> $tmp/source + +diff -u $tmp/source $tmp/delta.OK.txt > $tmp/d if [ $? -ne 0 ]; then - print_debug "ERROR: delta.txt and source are different, restore failed" + print_debug "ERROR: delta.OK.txt and source are different, restore failed" dstat=1 fi -head -c 300 /etc/passwd > $tmp/source -diff -u $tmp/source $tmp/delta.OK.txt > $tmp/d +head -c 400 /etc/passwd > $tmp/source2 +diff -u $tmp/source2 $tmp/delta.txt > $tmp/d if [ $? -ne 0 ]; then - print_debug "ERROR: delta.OK.txt and source are different, restore failed" - dstat=2 + print_debug "ERROR: delta.txt and source2 are different, restore failed" + dstat=1 fi + + end_test