diff options
author | Elliott Hughes <enh@google.com> | 2019-08-05 10:38:32 -0700 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2019-08-05 21:03:46 -0500 |
commit | 050c4bd8ec4cc4d84588bc30d70106ae52a7eb5c (patch) | |
tree | c6c65b619a254f35e74884ca5293edebb7df173a /tests | |
parent | d7d87e736d66f02a61caeb582b9175c7563be445 (diff) | |
download | toybox-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-x | tests/du.test | 9 |
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 |