From 8b9844e4f1ee4b26fcbc64f73e4e621f6ff0e63f Mon Sep 17 00:00:00 2001 From: Reiner Herrmann Date: Fri, 21 Sep 2018 18:45:10 +0200 Subject: tests: skip more tests if capabilities/seccomp of host differs --- test/utils/utils.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'test/utils/utils.sh') diff --git a/test/utils/utils.sh b/test/utils/utils.sh index d98e4c2e4..c3d4a0dcf 100755 --- a/test/utils/utils.sh +++ b/test/utils/utils.sh @@ -115,11 +115,19 @@ echo "TESTING: top (test/utils/top.exp)" echo "TESTING: file transfer (test/utils/ls.exp)" ./ls.exp -echo "TESTING: firemon seccomp (test/utils/firemon-seccomp.exp)" -./firemon-seccomp.exp +if grep -q "^Seccomp.*0" /proc/self/status; then + echo "TESTING: firemon seccomp (test/utils/firemon-seccomp.exp)" + ./firemon-seccomp.exp +else + echo "TESTING SKIP: seccomp already active (test/utils/firemon-seccomp.exp)" +fi -echo "TESTING: firemon caps (test/utils/firemon-caps.exp)" -./firemon-caps.exp +if grep -q "^CapBnd:\\s0000003fffffffff" /proc/self/status; then + echo "TESTING: firemon caps (test/utils/firemon-caps.exp)" + ./firemon-caps.exp +else + echo "TESTING SKIP: other capabilities than expected (test/utils/firemon-caps.exp)" +fi echo "TESTING: firemon cpu (test/utils/firemon-cpu.exp)" ./firemon-cpu.exp -- cgit v1.2.3-70-g09d2