[CRIU] [PATCH v2 2/3] test: add checkskip hook
Tycho Andersen
tycho.andersen at canonical.com
Tue May 5 09:14:58 PDT 2015
Although there is the skip() macro, this doesn't actually do anything to skip
the test. I looked into adding a test_skip() function in the zdtm lib, but
there didn't seem an easy race-free way to propagate an exit code up to
run_test in zdtm.sh, so we add the checkskip hook for use in the apparmor test
(e.g. when apparmor isn't avialable in the kernel, or is disabled).
Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
---
test/zdtm.sh | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/test/zdtm.sh b/test/zdtm.sh
index 2fa51c2..d3626f7 100755
--- a/test/zdtm.sh
+++ b/test/zdtm.sh
@@ -643,6 +643,11 @@ run_test()
local rst_args=
DUMP_PATH=""
+ if [ -f "$test".checkskip ] && [ "$test".checkskip ]; then
+ echo "Skip $test"
+ return 0
+ fi
+
if [ $COMPILE_ONLY -eq 1 ]; then
echo "Compile $test"
make -C $tdir $tname && return 0 || return 1
--
2.1.4
More information about the CRIU
mailing list