]> www.infradead.org Git - users/hch/xfstests-dev.git/commitdiff
xfs/018: make sure that larp mode actually works
authorDarrick J. Wong <djwong@kernel.org>
Mon, 25 Sep 2023 21:42:46 +0000 (14:42 -0700)
committerZorro Lang <zlang@kernel.org>
Thu, 5 Oct 2023 14:40:47 +0000 (22:40 +0800)
Skip this test if larp mode doesn't work.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/xfs/018

index 1ef51a2e61719a64d4bf97522fd53336d445b4d1..73040edc926617985a4c7d641a9d0708d0d7df89 100755 (executable)
@@ -71,6 +71,17 @@ create_test_file()
        done
 }
 
+require_larp()
+{
+       touch $SCRATCH_MNT/a
+
+       # Set attribute, being careful not to include the trailing newline
+       # in the attr value.
+       echo -n "attr_value" | ${ATTR_PROG} -s "attr_name" $SCRATCH_MNT/a 2>&1 | \
+               grep 'Operation not supported' && \
+               _notrun 'LARP not supported on this filesystem'
+}
+
 # real QA test starts here
 _supported_fs xfs
 
@@ -112,6 +123,8 @@ _scratch_mount
 testdir=$SCRATCH_MNT/testdir
 mkdir $testdir
 
+require_larp
+
 # empty, inline
 create_test_file empty_file1 0
 test_attr_replay empty_file1 "attr_name" $attr64 "s" "larp"