[CRIU] [PATCH 2/2] tests: get rid of HAVE_SECCOMP nonsense
Tycho Andersen
tycho.andersen at canonical.com
Thu Feb 11 06:46:26 PST 2016
Because of the #undef (probably left over from some debugging I did that
accidentally got committed), this test never ran. Anyway, this is all
unnecessary because we can just use the seccomp_filter feature flag in the
tests.
Also reenable the seccomp_filter_tsync test.
Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
---
test/zdtm/live/static/seccomp_filter_tsync.c | 14 --------------
test/zdtm/live/static/seccomp_filter_tsync.desc | 2 +-
2 files changed, 1 insertion(+), 15 deletions(-)
diff --git a/test/zdtm/live/static/seccomp_filter_tsync.c b/test/zdtm/live/static/seccomp_filter_tsync.c
index 56e0794..a583549 100644
--- a/test/zdtm/live/static/seccomp_filter_tsync.c
+++ b/test/zdtm/live/static/seccomp_filter_tsync.c
@@ -15,15 +15,6 @@
#include <pthread.h>
#include "zdtmtst.h"
-#undef __NR_seccomp
-
-#ifdef __NR_seccomp
-#define HAVE_SECCOMP 1
-#else
-#define HAVE_SECCOMP 0
-#define __NR_seccomp -1
-#endif
-
#ifndef SECCOMP_SET_MODE_FILTER
#define SECCOMP_SET_MODE_FILTER 1
#endif
@@ -106,11 +97,6 @@ int main(int argc, char ** argv)
test_init(argc, argv);
- if (!HAVE_SECCOMP) {
- skip("no seccomp present in this kernel\n");
- return 0;
- }
-
if (socketpair(PF_LOCAL, SOCK_SEQPACKET, 0, sk_pair)) {
pr_perror("socketpair");
return -1;
diff --git a/test/zdtm/live/static/seccomp_filter_tsync.desc b/test/zdtm/live/static/seccomp_filter_tsync.desc
index 0b16609..14dd961 100644
--- a/test/zdtm/live/static/seccomp_filter_tsync.desc
+++ b/test/zdtm/live/static/seccomp_filter_tsync.desc
@@ -1 +1 @@
-{'flags': 'suid noauto', 'feature': 'seccomp_filters'}
+{'flags': 'suid', 'feature': 'seccomp_filters'}
--
2.5.0
More information about the CRIU
mailing list