summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChen Jingpiao <chenjingpiao@gmail.com>2018-08-06 21:58:43 +0800
committerChen Jingpiao <chenjingpiao@gmail.com>2018-08-14 22:08:42 +0800
commit5e7b31f3276f412dd2714ecfc0eddfce5d30a439 (patch)
tree6e149b9c4a488fbad685cac6411da0deedef927b
parent27cb070fbf240964d8c02605e185610735c4a900 (diff)
downloadstrace-ppiao/gsoc-2018-final.tar.gz
tests: add check for seccomp-assisted syscall filteringppiao/gsoc-2018-final
-rw-r--r--tests/Makefile.am1
-rw-r--r--tests/filter_seccomp.in3
-rw-r--r--tests/gen_tests.in1
-rw-r--r--tests/init.sh5
4 files changed, 10 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index a2f39506b..981cb8721 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -386,6 +386,7 @@ EXTRA_DIST = \
eventfd.expected \
fadvise.h \
fcntl-common.c \
+ filter_seccomp.in \
filter-unavailable.expected \
fstatat.c \
fstatx.c \
diff --git a/tests/filter_seccomp.in b/tests/filter_seccomp.in
new file mode 100644
index 000000000..bd81b3747
--- /dev/null
+++ b/tests/filter_seccomp.in
@@ -0,0 +1,3 @@
+siginfo -etrace=none
+socketcall -esocketcall -a20
+wait4 -esignal=none -ewait4
diff --git a/tests/gen_tests.in b/tests/gen_tests.in
index 6744e556e..6ec24b8b0 100644
--- a/tests/gen_tests.in
+++ b/tests/gen_tests.in
@@ -85,6 +85,7 @@ fcntl64 -a8
fdatasync -a14
file_handle -e trace=name_to_handle_at,open_by_handle_at
file_ioctl +ioctl.test
+filter_seccomp test_prog_set -n
finit_module -a25
flock -a19
fork-f -a26 -qq -f -e signal=none -e trace=chdir
diff --git a/tests/init.sh b/tests/init.sh
index 8861b70d0..612d5ca36 100644
--- a/tests/init.sh
+++ b/tests/init.sh
@@ -344,6 +344,11 @@ test_trace_expr()
< negative.list
}
+test_prog_set()
+{
+ test_pure_prog_set "$@" < "$srcdir/$NAME.in"
+}
+
check_prog cat
check_prog rm