Patch does what it says on the tin. First thing I caught while doing a test of all commands in mkroot chattr fails all tests on my system (A ton of "Operation not permitted" errors, on ext4), but the failures are consistent with TEST_HOST so I guess chattr doing what it's supposed to? (Yes, I ran it as root) The .test file will need a rewrite eventually but right now I'm just trying to get all tests to run under mkroot
- Oliver Webb <aquahobby...@proton.me>
From a5ede46b22b62a929067c2622f8588d46a120b36 Mon Sep 17 00:00:00 2001 From: Oliver Webb <aquahobby...@proton.me> Date: Wed, 20 Mar 2024 15:09:44 -0500 Subject: [PATCH] awk -> cut for chattr.test --- tests/chattr.test | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/chattr.test b/tests/chattr.test index 01549b07..9998bcac 100755 --- a/tests/chattr.test +++ b/tests/chattr.test @@ -53,7 +53,7 @@ testing "append-only" "$IN && echo "$_t" > testFile && for attr in "A" "d" "e" "j" "P" "S" "s" "t" "u"; do echo "$_t" > testFile && chattr +$attr testFile 2>/dev/null || ((++SKIP)) # Check that $attr is in the lsattr output, then that - turns it back off. - testing "toggle $attr" "lsattr testFile | awk '{print \$1}' > attrs; + testing "toggle $attr" "lsattr testFile | cut -d' ' -f1 > attrs; grep -q $attr attrs || cat attrs; cat testFile && chattr -$attr testFile && lsattr testFile | clean; rm -rf testFile" "$_t\n$_empty testFile\n" "" "" done @@ -71,8 +71,8 @@ testing "multiple files" "$IN && touch fileA && touch fileB && "$_aA fileA\n$_aA fileB\n$_empty fileA\n$_empty fileB\n" "" "" touch testFile && chattr -v 1234 testFile 2>/dev/null || ((++SKIP)) -testing "-v version" "lsattr -v testFile | awk '{print \$1}' && - chattr -v 4567 testFile && lsattr -v testFile | awk '{print \$1}'; +testing "-v version" "lsattr -v testFile | cut -d' ' -f1 && + chattr -v 4567 testFile && lsattr -v testFile | cud -d' ' -f1; rm -rf testFile" "1234\n4567\n" "" "" mkdir -p a/b/c && touch a/b/c/fA a/b/c/fB -- 2.44.0
_______________________________________________ Toybox mailing list Toybox@lists.landley.net http://lists.landley.net/listinfo.cgi/toybox-landley.net