common/attr: fix _require_noattr2
attr2/noattr2 doesn't do anything anymore and aren't reported in
/proc/mounts, so we need to check /proc/mounts and _notrun as a result.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
diff --git a/common/attr b/common/attr
index 1c1de63..eb5c862 100644
--- a/common/attr
+++ b/common/attr
@@ -241,7 +241,11 @@
|| _fail "_try_scratch_mkfs_xfs failed on $SCRATCH_DEV"
_try_scratch_mount -o noattr2 > /dev/null 2>&1 \
|| _notrun "noattr2 mount option not supported on $SCRATCH_DEV"
+ grep -qw noattr2 <(findmnt -rncv -M "$SCRATCH_MNT" -o OPTIONS)
+ local res=$?
_scratch_unmount
+ test $res -eq 0 \
+ || _notrun "noattr2 mount option no longer functional"
}
# getfattr -R returns info in readdir order which varies from fs to fs.