Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7d758af2 authored by bamvor.zhangjian@huawei.com's avatar bamvor.zhangjian@huawei.com Committed by Shuah Khan
Browse files

selftests: add default rules for c source file



There are difference rules for compiling c source file in different
testcases. In order to enable KBUILD_OUTPUT support in later patch,
this patch introduce the default rules in
"tools/testing/selftest/lib.mk" and remove the existing rules in each
testcase.

Acked-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Signed-off-by: default avatarBamvor Jian Zhang <bamvor.zhangjian@linaro.org>
Signed-off-by: default avatarShuah Khan <shuahkh@osg.samsung.com>
parent 5fe59799
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -11,8 +11,6 @@ execveat.symlink: execveat
execveat.denatured: execveat
	cp $< $@
	chmod -x $@
%: %.c
	$(CC) $(CFLAGS) -o $@ $^

TEST_GEN_PROGS := execveat
TEST_GEN_FILES := execveat.symlink execveat.denatured script subdir
+3 −0
Original line number Diff line number Diff line
@@ -45,4 +45,7 @@ all: $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED) $(TEST_GEN_FILES)
clean:
	$(RM) -r $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED) $(TEST_GEN_FILES)

%: %.c
	$(CC) $(CFLAGS) $(LDFLAGS) $(LDLIBS) -o $@ $^

.PHONY: run_tests all clean install emit_tests
+0 −3
Original line number Diff line number Diff line
@@ -2,9 +2,6 @@
CFLAGS = -Wall \
         -O2

unprivileged-remount-test: unprivileged-remount-test.c
	$(CC) $(CFLAGS) unprivileged-remount-test.c -o unprivileged-remount-test

TEST_GEN_PROGS := unprivileged-remount-test

include ../lib.mk
+0 −2
Original line number Diff line number Diff line
@@ -4,8 +4,6 @@ CFLAGS = -Wall -Wl,--no-as-needed -O2 -g
CFLAGS += -I../../../../usr/include/

reuseport_bpf_numa: LDFLAGS += -lnuma
%: %.c
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^

TEST_PROGS := run_netsocktests run_afpackettests test_bpf.sh
TEST_GEN_FILES =  socket
+1 −3
Original line number Diff line number Diff line

get_size: get_size.c
	$(CC) -static -ffreestanding -nostartfiles -s $< -o $@
CFLAGS := -static -ffreestanding -nostartfiles -s

TEST_GEN_PROGS := get_size

Loading