]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
BEE Backport regress/tests/bvfs-restore-test
authorEric Bollengier <eric@baculasystems.com>
Wed, 2 Sep 2020 12:47:52 +0000 (14:47 +0200)
committerEric Bollengier <eric@baculasystems.com>
Tue, 1 Mar 2022 14:36:18 +0000 (15:36 +0100)
This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Wed Jul 29 11:29:46 2020 +0200

    regress: Fix for bvfs-restore-test on MySQL

regress/tests/bvfs-restore-test

index 632ae45fbdb30edfdf0d9cedc3938fc503dbc3c4..2b2329d0ce4e1ff30e4ac81961f5e0c48d5901e9 100755 (executable)
@@ -62,13 +62,18 @@ cat <<EOF >$tmp/bconcmds
 .bvfs_lsdirs jobid=1,2,3,4 path=
 @$out $tmp/log3.out
 .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
 quit
 EOF
 
 run_bconsole
 
+# The hl/ directory ID can change, we take it from a bvfs_lsdir
+hldirid=`awk '/hl\/$/ { print $1 }' $tmp/log4.out`
+fid=`awk "/^$hldirid/"' { m=(m>$2)?m:$2 } END { print m }' $tmp/log3.out`
+
 dirid=`awk '/\/$/ { print $1 }' $tmp/log0.out`
-fid=`awk '/^1/ { m=(m>$2)?m:$2 } END { print m }' $tmp/log3.out`
 
 cat <<EOF >$tmp/bconcmds
 @$out $tmp/log2.out