Skip to contentSkip to conversation

common: Re-enable testing over NFS

PATCH New Anna Schumaker 1 participant 1 message Oct 9, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 common/rc | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
common/rc +8 -2
index 34d7c19..868007f 100644
@@ -1086,8 +1086,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
Signature · 1 line
2.1.2