]> www.infradead.org Git - users/hch/xfstests-dev.git/commitdiff
common: pass the realtime device to xfs_db when possible
authorDarrick J. Wong <djwong@kernel.org>
Thu, 20 Feb 2025 21:47:07 +0000 (13:47 -0800)
committerZorro Lang <zlang@kernel.org>
Thu, 6 Mar 2025 13:25:55 +0000 (21:25 +0800)
Teach xfstests to pass the realtime device to xfs_db when it supports
that option.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
common/xfs

index c8f2ea241a2a41e42a02fc81d54b903ff4516297..547e91167718e94e04dc9c6586a28cb5306a3a7f 100644 (file)
@@ -308,6 +308,10 @@ _scratch_xfs_db_options()
        SCRATCH_OPTIONS=""
        [ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \
                SCRATCH_OPTIONS="-l$SCRATCH_LOGDEV"
+       if [ "$USE_EXTERNAL" = yes ] && [ ! -z "$SCRATCH_RTDEV" ]; then
+               $XFS_DB_PROG --help 2>&1 | grep -q -- '-R rtdev' && \
+                       SCRATCH_OPTIONS="$SCRATCH_OPTIONS -R$SCRATCH_RTDEV"
+       fi
        echo $SCRATCH_OPTIONS $* $SCRATCH_DEV
 }