[CRIU] [PATCH 7/9] test/zdtm/static/skip-me.c: generalize
Kir Kolyshkin
kir at openvz.org
Wed Mar 29 15:21:18 PDT 2017
Make it possible to use a custom message telling why the test is
skipped.
Signed-off-by: Kir Kolyshkin <kir at openvz.org>
---
test/zdtm/static/seccomp_filter.c | 1 +
test/zdtm/static/seccomp_filter_inheritance.c | 1 +
test/zdtm/static/seccomp_filter_tsync.c | 1 +
test/zdtm/static/seccomp_strict.c | 1 +
test/zdtm/static/skip-me.c | 2 +-
5 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/test/zdtm/static/seccomp_filter.c b/test/zdtm/static/seccomp_filter.c
index 36295a2..81d9851 100644
--- a/test/zdtm/static/seccomp_filter.c
+++ b/test/zdtm/static/seccomp_filter.c
@@ -194,6 +194,7 @@ err:
#else /* __NR_seccomp */
+#define TEST_SKIP_REASON "incompatible kernel (no seccomp)"
#include "skip-me.c"
#endif /* __NR_seccomp */
diff --git a/test/zdtm/static/seccomp_filter_inheritance.c b/test/zdtm/static/seccomp_filter_inheritance.c
index 36d183c..840136c 100644
--- a/test/zdtm/static/seccomp_filter_inheritance.c
+++ b/test/zdtm/static/seccomp_filter_inheritance.c
@@ -184,6 +184,7 @@ err:
#else /* __NR_seccomp */
+#define TEST_SKIP_REASON "incompatible kernel (no seccomp)"
#include "skip-me.c"
#endif /* __NR_seccomp */
diff --git a/test/zdtm/static/seccomp_filter_tsync.c b/test/zdtm/static/seccomp_filter_tsync.c
index 8b85947..9b4742b 100644
--- a/test/zdtm/static/seccomp_filter_tsync.c
+++ b/test/zdtm/static/seccomp_filter_tsync.c
@@ -209,6 +209,7 @@ err:
#else /* __NR_seccomp */
+#define TEST_SKIP_REASON "incompatible kernel (no seccomp)"
#include "skip-me.c"
#endif /* __NR_seccomp */
diff --git a/test/zdtm/static/seccomp_strict.c b/test/zdtm/static/seccomp_strict.c
index 054d0d9..ac95ac8 100644
--- a/test/zdtm/static/seccomp_strict.c
+++ b/test/zdtm/static/seccomp_strict.c
@@ -129,6 +129,7 @@ err:
#else /* __NR_seccomp */
+#define TEST_SKIP_REASON "incompatible kernel (no seccomp)"
#include "skip-me.c"
#endif /* __NR_seccomp */
diff --git a/test/zdtm/static/skip-me.c b/test/zdtm/static/skip-me.c
index 0cb53aa..9a55276 100644
--- a/test/zdtm/static/skip-me.c
+++ b/test/zdtm/static/skip-me.c
@@ -2,7 +2,7 @@ int main(int argc, char ** argv)
{
test_init(argc, argv);
- test_msg("Skipping test on incompatible kernel");
+ test_msg("Skipping test:" TEST_SKIP_REASON);
test_daemon();
test_waitsig();
--
2.9.3
More information about the CRIU
mailing list