From f554ce0a4b592272b9171c7c141480a159fa7194 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Thu, 15 Oct 2020 16:48:57 -0700 Subject: chattr.test: don't fail on f2fs with compression enabled. f2fs with compression enabled only lets you `chattr +c` on an empty file. --- tests/chattr.test | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/chattr.test b/tests/chattr.test index cefc84b9..8f1c4b2c 100755 --- a/tests/chattr.test +++ b/tests/chattr.test @@ -46,9 +46,11 @@ testing "append-only" "$IN && echo "$_t" > testFile && # For the rest, just toggle the bits back and forth (where supported). # Note that some file system/kernel combinations do return success but -# silently ignore your request: +T on 4.19 f2fs, or +F on 5.2i ext4, +# silently ignore your request: +T on 4.19 f2fs, or +F on 5.2 ext4, # for example, so we're deliberately a bit selective here. -for attr in "A" "c" "d" "e" "j" "P" "S" "s" "t" "u"; do +# f2fs in 5.6+ kernels supports compression, but you can only enable +# compression on a file while it's still empty, so we skip +c too. +for attr in "A" "d" "e" "j" "P" "S" "s" "t" "u"; do echo "$_t" > testFile && chattr +$attr testFile 2>/dev/null || SKIPNEXT=1 # Check that $attr is in the lsattr output, then that - turns it back off. testing "toggle $attr" "lsattr testFile | awk '{print \$1}' > attrs; -- cgit v1.2.3