xfs: wrap xfs_db calls to the test device

Create a _test_xfs_db analogue to _scratch_xfs_db so that we can
encapsulate whatever strange test fs options were fed to us by the test
runner.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This commit is contained in:
Darrick J. Wong
2020-09-14 18:43:34 -07:00
committed by Eryu Guan
parent 5f98984ec7
commit 66dd0c19da
4 changed files with 23 additions and 10 deletions
+13
View File
@@ -218,6 +218,19 @@ _scratch_xfs_db()
$XFS_DB_PROG "$@" $(_scratch_xfs_db_options)
}
_test_xfs_db_options()
{
TEST_OPTIONS=""
[ "$USE_EXTERNAL" = yes -a ! -z "$TEST_LOGDEV" ] && \
TEST_OPTIONS="-l$TEST_LOGDEV"
echo $TEST_OPTIONS $* $TEST_DEV
}
_test_xfs_db()
{
$XFS_DB_PROG "$@" $(_test_xfs_db_options)
}
_scratch_xfs_admin()
{
local options=("$SCRATCH_DEV")