diff options
author | Kees Cook <keescook@chromium.org> | 2015-12-02 20:39:36 +0100 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2017-08-14 22:46:41 +0200 |
commit | 967d7ba8415139107033770a40c7ec7dd17fbcb1 (patch) | |
tree | 1d11b9221671f6d715df3d762ffce895cbde0f16 /tools/testing/selftests/seccomp/Makefile | |
parent | selftests/seccomp: Add tests for basic ptrace actions (diff) | |
download | linux-967d7ba8415139107033770a40c7ec7dd17fbcb1.tar.xz linux-967d7ba8415139107033770a40c7ec7dd17fbcb1.zip |
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/Makefile | 18 |
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) |