From 050c4bd8ec4cc4d84588bc30d70106ae52a7eb5c Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Mon, 5 Aug 2019 10:38:32 -0700 Subject: 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. --- tests/du.test | 9 +++++++++ 1 file changed, 9 insertions(+) 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 -- cgit v1.2.3