summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/seccomp/Makefile
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2015-12-02 11:39:36 -0800
committerKees Cook <keescook@chromium.org>2017-08-14 13:46:41 -0700
commit967d7ba8415139107033770a40c7ec7dd17fbcb1 (patch)
tree1d11b9221671f6d715df3d762ffce895cbde0f16 /tools/testing/selftests/seccomp/Makefile
parenta33b2d0359a0aae25d5ac7a26b85a5682485ebbb (diff)
selftests/seccomp: Add simple seccomp overhead benchmark
This attempts to produce a comparison between native getpid() and a RET_ALLOW-filtered getpid(), to measure the overhead cost of using seccomp(). Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'tools/testing/selftests/seccomp/Makefile')
-rw-r--r--tools/testing/selftests/seccomp/Makefile18
1 files changed, 13 insertions, 5 deletions
diff --git a/tools/testing/selftests/seccomp/Makefile b/tools/testing/selftests/seccomp/Makefile
index aeb0c805f3ca..553d870b4ca9 100644
--- a/tools/testing/selftests/seccomp/Makefile
+++ b/tools/testing/selftests/seccomp/Makefile
@@ -1,8 +1,16 @@
-TEST_GEN_PROGS := seccomp_bpf
-CFLAGS += -Wl,-no-as-needed -Wall
-LDFLAGS += -lpthread
+all:
include ../lib.mk
-$(TEST_GEN_PROGS): seccomp_bpf.c ../kselftest_harness.h
- $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@
+.PHONY: all clean
+
+BINARIES := seccomp_bpf seccomp_benchmark
+CFLAGS += -Wl,-no-as-needed -Wall
+
+seccomp_bpf: seccomp_bpf.c ../kselftest_harness.h
+ $(CC) $(CFLAGS) $(LDFLAGS) -lpthread $< -o $@
+
+TEST_PROGS += $(BINARIES)
+EXTRA_CLEAN := $(BINARIES)
+
+all: $(BINARIES)