aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2020-10-15 16:48:57 -0700
committerRob Landley <rob@landley.net>2020-10-15 23:00:02 -0500
commitf554ce0a4b592272b9171c7c141480a159fa7194 (patch)
treef379046dd6698681432ed9dc2b4a7b8d668d2add /tests
parent3c11c47faf8af11fc18557a124d543bc1d0c22cb (diff)
downloadtoybox-f554ce0a4b592272b9171c7c141480a159fa7194.tar.gz
chattr.test: don't fail on f2fs with compression enabled.
f2fs with compression enabled only lets you `chattr +c` on an empty file.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/chattr.test6
1 files 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;