Skip to contentSkip to conversation

xfs/077: fix test for userspace meta_uuid support

PATCH New Eric Sandeen 1 participant 1 message Aug 20, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfs/077: fix test for userspace meta_uuid support

The current _require_meta_uuid() test looks for a failure return code from xfs_db -x -c "uuid generate" but in fact this exits with success. (In fact uuid_f always exits with success; perhaps this needs fixing, but that's in the wild now).

So grep for the string(s) stating that it failed, instead.

---

common/rc +5 -2
index 70d2fa8..737a701 100644
@@ -2720,8 +2720,11 @@ _require_meta_uuid()
 	# This will create a crc fs on $SCRATCH_DEV
 	_require_xfs_crc
 
-	$XFS_DB_PROG -x -c "uuid generate" $SCRATCH_DEV >/dev/null 2>&1 \
-	   || _notrun "Userspace doesn't support meta_uuid feature"
+	$XFS_DB_PROG -x -c "uuid restore" $SCRATCH_DEV 2>&1 \
+	   | grep -q "invalid UUID\|supported on V5 fs" \
+	   && _notrun "Userspace doesn't support meta_uuid feature"
+
+	$XFS_DB_PROG -x -c "uuid generate" $SCRATCH_DEV >/dev/null 2>&1
 
 	_scratch_mount >/dev/null 2>&1 \
 	   || _notrun "Kernel doesn't support meta_uuid feature"