aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2020-12-05 13:11:52 -0800
committerRob Landley <rob@landley.net>2020-12-06 02:22:22 -0600
commit49c02dbe435681015a88c636749d144044fc5e4a (patch)
tree2d8a7f931c6277155a15ab5418a5d033560814eb
parent75b89012c90470a27d66b54ad89901b94fcfd169 (diff)
downloadtoybox-49c02dbe435681015a88c636749d144044fc5e4a.tar.gz
id.test: hacks to pass on Raspberry Pi OS.
The rest of `make tests` all pass on a Raspberry Pi 400.
-rwxr-xr-xtests/id.test8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/id.test b/tests/id.test
index b4b13a6e..5eae928e 100755
--- a/tests/id.test
+++ b/tests/id.test
@@ -5,13 +5,15 @@
#testing "name" "command" "result" "infile" "stdin"
# Systems with SELinux will have security context cruft,
-# and BSDs call the root group "wheel" instead.
-CLEAN="sed 's/ context=.*//g' | sed 's/wheel/root/g'"
+# BSDs call the root group "wheel" instead,
+# and Raspberry Pi OS has root also in the 117(lpadmin) group.
+CLEAN="sed 's/ context=.*//g' | sed 's/wheel/root/g' | \
+sed 's/117//g' | sed -E 's/\(?lpadmin\)?//g' | sed 's/[ ,]$//'"
testing "0" "id 0 | $CLEAN" "uid=0(root) gid=0(root) groups=0(root)\n" "" ""
testing "root" "id root | $CLEAN" \
"uid=0(root) gid=0(root) groups=0(root)\n" "" ""
-testing "-G root" "id -G root" "0\n" "" ""
+testing "-G root" "id -G root | $CLEAN" "0\n" "" ""
testing "-nG root" "id -nG root | $CLEAN" "root\n" "" ""
testing "-g root" "id -g root" "0\n" "" ""
testing "-ng root" "id -ng root | $CLEAN" "root\n" "" ""