]> www.infradead.org Git - users/hch/xfstests-dev.git/commitdiff
xfstests: Provide dumpe2fs via standard common.config interface
authorTomas Racek <tracek@redhat.com>
Sun, 3 Feb 2013 10:19:56 +0000 (10:19 +0000)
committerRich Johnston <rjohnston@sgi.com>
Tue, 26 Feb 2013 15:22:24 +0000 (09:22 -0600)
dumpe2fs can be now accessed via $DUMPE2FS_PROG, tests that require it
can check for its availability by _require_dumpe2fs function.

Signed-off-by: Tomas Racek <tracek@redhat.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
common.config
common.rc

index 57f505de62d5f74669c5505288551592bb759e75..7174127802d0b78631e2a728b6b5fca10775928f 100644 (file)
@@ -159,6 +159,7 @@ export KILLALL_PROG="`set_prog_path killall`"
 export INDENT_PROG="`set_prog_path indent`"
 export XFS_COPY_PROG="`set_prog_path xfs_copy`"
 export FSTRIM_PROG="`set_prog_path fstrim`"
+export DUMPE2FS_PROG="`set_prog_path dumpe2fs`"
 
 # Generate a comparable xfsprogs version number in the form of
 # major * 10000 + minor * 100 + release
index 2e8581e009a14ab3e5723e71bc07df4b3194eeed..0cccb94bb62f396afd66c762d86d6b8e91800fc4 100644 (file)
--- a/common.rc
+++ b/common.rc
@@ -1826,6 +1826,13 @@ _test_batched_discard()
        $FSTRIM_PROG ${1} &>/dev/null
 }
 
+_require_dumpe2fs()
+{
+       if [ -z "$DUMPE2FS_PROG" ]; then
+               _notrun "This test requires dumpe2fs utility."
+       fi
+}
+
 ################################################################################
 
 if [ "$iam" != new -a "$iam" != bench ]