CFLAGS = -Wall
+TEST_GEN_PROGS := execveat
+TEST_GEN_FILES := execveat.symlink execveat.denatured script subdir
+# Makefile is a run-time dependency, since it's accessed by the execveat test
+TEST_FILES := Makefile
+
+EXTRA_CLEAN := subdir.moved execveat.moved xxxxx*
+
+include ../lib.mk
+
subdir:
mkdir -p $@
script:
execveat.denatured: execveat
cp $< $@
chmod -x $@
-
-TEST_GEN_PROGS := execveat
-TEST_GEN_FILES := execveat.symlink execveat.denatured script subdir
-# Makefile is a run-time dependency, since it's accessed by the execveat test
-TEST_FILES := Makefile
-
-include ../lib.mk
-
-clean:
- rm -rf $(TEST_GEN_PROGS) $(TEST_GEN_FILES) subdir.moved execveat.moved xxxxx*
TEST_PROGS := ftracetest
TEST_FILES := test.d
+EXTRA_CLEAN := logs/*
include ../lib.mk
-
-clean:
- rm -rf logs/*
TEST_GEN_PROGS := kcmp_test
+EXTRA_CLEAN := kcmp-test-file
+
include ../lib.mk
-clean:
- $(RM) $(TEST_GEN_PROGS) kcmp-test-file
all: $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED) $(TEST_GEN_FILES)
clean:
- $(RM) -r $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED) $(TEST_GEN_FILES)
+ $(RM) -r $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED) $(TEST_GEN_FILES) $(EXTRA_CLEAN)
%: %.c
$(CC) $(CFLAGS) $(LDFLAGS) $(LDLIBS) -o $@ $^
ASFLAGS += -O2 -Wall -g -nostdlib -m64
+EXTRA_CLEAN = *.o check-reversed.S
+
include ../../lib.mk
switch_endian_test: check-reversed.S
check-reversed.S: check-reversed.o
hexdump -v -e '/1 ".byte 0x%02X\n"' $< > $@
-
-clean:
- $(RM) $(TEST_GEN_PROGS) *.o check-reversed.S
TEST_PROGS := pstore_tests pstore_post_reboot_tests
TEST_FILES := common_tests pstore_crash_test
+EXTRA_CLEAN := logs/* *uuid
include ../lib.mk
run_crash:
@sh pstore_crash_test || { echo "pstore_crash_test: [FAIL]"; exit 1; }
-
-clean:
- rm -rf logs/* *uuid
TEST_PROGS := zram.sh
TEST_FILES := zram01.sh zram02.sh zram_lib.sh
+EXTRA_CLEAN := err.log
include ../lib.mk
-clean:
- $(RM) err.log