Several tests fail if an external log device is used; in this case the xfs_db invocation fails with a clear indication of why, so fix that as other tests do by testing for and using the external log option if present. Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx> --- diff --git a/common/repair b/common/repair index 5a9097f4..cf69dde9 100644 --- a/common/repair +++ b/common/repair @@ -9,8 +9,12 @@ _zero_position() value=$1 struct="$2" + SCRATCH_OPTIONS="" + [ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \ + SCRATCH_OPTIONS="-l$SCRATCH_LOGDEV" + # set values for off/len variables provided by db - eval `xfs_db -r -c "$struct" -c stack $SCRATCH_DEV | perl -ne ' + eval `xfs_db -r -c "$struct" -c stack $SCRATCH_OPTIONS $SCRATCH_DEV | perl -ne ' if (/byte offset (\d+), length (\d+)/) { print "offset=$1\nlength=$2\n"; exit }'` diff --git a/tests/xfs/030 b/tests/xfs/030 index efdb6a18..e1cc32ef 100755 --- a/tests/xfs/030 +++ b/tests/xfs/030 @@ -77,7 +77,10 @@ else _scratch_unmount fi clear="" -eval `xfs_db -r -c "sb 1" -c stack $SCRATCH_DEV | perl -ne ' +SCRATCH_OPTIONS="" +[ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \ + SCRATCH_OPTIONS="-l$SCRATCH_LOGDEV" +eval `xfs_db -r -c "sb 1" -c stack $SCRATCH_OPTIONS $SCRATCH_DEV | perl -ne ' if (/byte offset (\d+), length (\d+)/) { print "clear=", $1 / 512, "\n"; exit }'`