From: Eric Bollengier Date: Thu, 3 Mar 2022 10:31:26 +0000 (+0100) Subject: regress: Test new bvfs_restore fileindex option X-Git-Tag: Beta-15.0.0~633 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=790e32c287061f76811937c523a8996f1ac7d95e;p=thirdparty%2Fbacula.git regress: Test new bvfs_restore fileindex option --- diff --git a/regress/tests/bvfs-restore-test b/regress/tests/bvfs-restore-test index 640676821..9e4051784 100755 --- a/regress/tests/bvfs-restore-test +++ b/regress/tests/bvfs-restore-test @@ -64,6 +64,10 @@ cat <$tmp/bconcmds .bvfs_lsfiles jobid=1,2,3,4 path=$tmp/hl/ pattern=verify.c @$out $tmp/log4.out .bvfs_lsdirs path=$tmp/ jobid=1 pattern=hl +@$out $tmp/log5.out +sql +select FileIndex,Filename from File WHERE JobId=1 and FileIndex > 0 and FileIndex < 4; + quit EOF @@ -87,6 +91,16 @@ wait restore file=?b211$$ where=$tmp/bacula-restore2 yes wait messages +.bvfs_cleanup path=b211$$ +.bvfs_restore path=b211$$ jobid=1,2 fileindex=1,1,1,2,1,3 +restore file=?b211$$ where=$tmp/bacula-restore3 yes +wait +messages +@$out $tmp/log22.out +@# Will not work due to the filter +.bvfs_cleanup path=b211$$ +.bvfs_restore path=b211$$ jobid=3 fileindex=1,1,1,2,1,3 +messages quit EOF @@ -111,4 +125,16 @@ fi mode=`awk -F= '/Inserting hardlinks method=/ { print $2 ; exit}' $cwd/working/*trace` print_debug "INFO: Was using $mode method" +nb=`find $tmp/bacula-restore3/ -type f | wc -l` +if [ $nb != 3 ]; then + print_debug "ERROR: found difference after fileindex restore" + estat=1 +fi + +grep "Can't create restore list" $tmp/log22.out > /dev/null +if [ $? != 0 ]; then + print_debug "ERROR: found difference after fileindex restore 2" + estat=1 +fi + end_test