From: Anna Schumaker Date: Tue, 14 Oct 2014 11:59:38 +0000 (+1100) Subject: common: Re-enable testing over NFS X-Git-Tag: v2022.05.01~3026 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=19c805e0052c9f0f3fc6585fda54c7d41651ebff;p=xfstests-dev.git common: Re-enable testing over NFS 83ef157 (common: Check fs consistency on TEST_DEV only when needed) has _require_test unconditionally return _notrun when testing on an NFS filesystem, essentially disabling NFS. This patch changes the code to validate $TEST_DEV and only call _notrun if validation fails. Signed-off-by: Anna Schumaker Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner --- diff --git a/common/rc b/common/rc index 3d366db6..747cf72c 100644 --- a/common/rc +++ b/common/rc @@ -1092,8 +1092,14 @@ _require_test() { case "$FSTYP" in nfs*) - _notrun "requires a test device" - ;; + echo $TEST_DEV | grep -q ":/" > /dev/null 2>&1 + if [ -z "$TEST_DEV" -o "$?" != "0" ]; then + _notrun "this test requires a valid \$TEST_DIR" + fi + if [ ! -d "$TEST_DIR" ]; then + _notrun "this test requires a valid \$TEST_DIR" + fi + ;; cifs) echo $TEST_DEV | grep -q "//" > /dev/null 2>&1 if [ -z "$TEST_DEV" -o "$?" != "0" ]; then