/dev/null is not owned by root when the toybox tests are run inside a sandbox in the Android CI infrastructure. Specify the owner as nobody to make the tar results consistent.
--- tests/tar.test | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
From e112e5f50ebf2b2baf5ec1b5387899a73015c7f4 Mon Sep 17 00:00:00 2001 From: Colin Cross <ccr...@android.com> Date: Fri, 6 Oct 2023 16:45:30 -0700 Subject: [PATCH] Specify owner when testing tar with /dev/null /dev/null is not owned by root when the toybox tests are run inside a sandbox in the Android CI infrastructure. Specify the owner as nobody to make the tar results consistent. --- tests/tar.test | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/tar.test b/tests/tar.test index 8e30e323..93977ffe 100755 --- a/tests/tar.test +++ b/tests/tar.test @@ -154,11 +154,11 @@ nulldev=1,3 # devtmpfs values [ "$(uname)" == "Darwin" ] && nulldev=3,2 testing "pass /dev/null" \ - "tar c --mtime @0 --group sys /dev/null 2>/dev/null | LST" \ - "crw-rw-rw- root/sys $nulldev 1970-01-01 00:00 dev/null\n" "" "" + "tar c --mtime @0 --owner nobody:65534 --group sys /dev/null 2>/dev/null | LST" \ + "crw-rw-rw- nobody/sys $nulldev 1970-01-01 00:00 dev/null\n" "" "" testing "--absolute-names" \ - "tar c --mtime @0 --group sys --absolute-names /dev/null 2>/dev/null | LST" \ - "crw-rw-rw- root/sys $nulldev 1970-01-01 00:00 /dev/null\n" "" "" + "tar c --mtime @0 --owner nobody:65534 --group sys --absolute-names /dev/null 2>/dev/null | LST" \ + "crw-rw-rw- nobody/sys $nulldev 1970-01-01 00:00 /dev/null\n" "" "" # compression types testing "autodetect gzip" 'LST -f "$FILES"/tar/tar.tgz' \ -- 2.42.0.609.gbb76f46606-goog
_______________________________________________ Toybox mailing list Toybox@lists.landley.net http://lists.landley.net/listinfo.cgi/toybox-landley.net