aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2019-08-05 10:38:32 -0700
committerRob Landley <rob@landley.net>2019-08-05 21:03:46 -0500
commit050c4bd8ec4cc4d84588bc30d70106ae52a7eb5c (patch)
treec6c65b619a254f35e74884ca5293edebb7df173a /tests
parentd7d87e736d66f02a61caeb582b9175c7563be445 (diff)
downloadtoybox-050c4bd8ec4cc4d84588bc30d70106ae52a7eb5c.tar.gz
du: disable the tests if we have SELinux.
ext stores extended attributes in a way that makes all the numbers in the test incorrect. For now, just disable the test in that case.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/du.test9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/du.test b/tests/du.test
index a0960743..ae610256 100755
--- a/tests/du.test
+++ b/tests/du.test
@@ -2,6 +2,15 @@
[ -f testing.sh ] && . testing.sh
+# ext stores extended attributes in a way that makes all the numbers in the
+# tests below incorrect.
+# TODO: include a read-only ext file system that we can mount for the tests?
+if [ "$(stat --format %C . 2>/dev/null)" != "?" ]; then
+ echo "$SHOWSKIP: du (SELinux extended attributes present)"
+ return 2>/dev/null
+ exit
+fi
+
#testing "name" "command" "result" "infile" "stdin"
# we only test with -k since getting POSIX version is variable