From 4609e9481fe879f539e433b0710f53401d13d4ba Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Mon, 25 Sep 2023 14:42:46 -0700 Subject: [PATCH] xfs/018: make sure that larp mode actually works Skip this test if larp mode doesn't work. Signed-off-by: "Darrick J. Wong" Reviewed-by: Zorro Lang Signed-off-by: Zorro Lang --- tests/xfs/018 | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/xfs/018 b/tests/xfs/018 index 1ef51a2e..73040edc 100755 --- a/tests/xfs/018 +++ b/tests/xfs/018 @@ -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" -- 2.39.5