selftests/powerpc/pmu: Add support for perf event code tests
Add new folder for enabling perf event code tests which includes checking for group constraints, valid/invalid events, also checks for event excludes, alternatives so on. A new folder "event_code_tests", is created under "selftests/powerpc/pmu". Also updates the corresponding Makefiles in "selftests/powerpc" and "event_code_tests" folder. Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20220610134113.62991-16-atrajeev@linux.vnet.ibm.com
This commit is contained in:
parent
78cd598af6
commit
0a110a4b69
@ -8,7 +8,7 @@ EXTRA_SOURCES := ../harness.c event.c lib.c ../utils.c
|
||||
top_srcdir = ../../../../..
|
||||
include ../../lib.mk
|
||||
|
||||
all: $(TEST_GEN_PROGS) ebb sampling_tests
|
||||
all: $(TEST_GEN_PROGS) ebb sampling_tests event_code_tests
|
||||
|
||||
$(TEST_GEN_PROGS): $(EXTRA_SOURCES)
|
||||
|
||||
@ -27,6 +27,7 @@ override define RUN_TESTS
|
||||
$(DEFAULT_RUN_TESTS)
|
||||
TARGET=ebb; BUILD_TARGET=$$OUTPUT/$$TARGET; $(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET run_tests
|
||||
TARGET=sampling_tests; BUILD_TARGET=$$OUTPUT/$$TARGET; $(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET run_tests
|
||||
TARGET=event_code_tests; BUILD_TARGET=$$OUTPUT/$$TARGET; $(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET run_tests
|
||||
endef
|
||||
|
||||
DEFAULT_EMIT_TESTS := $(EMIT_TESTS)
|
||||
@ -34,6 +35,7 @@ override define EMIT_TESTS
|
||||
$(DEFAULT_EMIT_TESTS)
|
||||
TARGET=ebb; BUILD_TARGET=$$OUTPUT/$$TARGET; $(MAKE) OUTPUT=$$BUILD_TARGET -s -C $$TARGET emit_tests
|
||||
TARGET=sampling_tests; BUILD_TARGET=$$OUTPUT/$$TARGET; $(MAKE) OUTPUT=$$BUILD_TARGET -s -C $$TARGET emit_tests
|
||||
TARGET=event_code_tests; BUILD_TARGET=$$OUTPUT/$$TARGET; $(MAKE) OUTPUT=$$BUILD_TARGET -s -C $$TARGET emit_tests
|
||||
endef
|
||||
|
||||
DEFAULT_INSTALL_RULE := $(INSTALL_RULE)
|
||||
@ -41,12 +43,14 @@ override define INSTALL_RULE
|
||||
$(DEFAULT_INSTALL_RULE)
|
||||
TARGET=ebb; BUILD_TARGET=$$OUTPUT/$$TARGET; $(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET install
|
||||
TARGET=sampling_tests; BUILD_TARGET=$$OUTPUT/$$TARGET; $(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET install
|
||||
TARGET=event_code_tests; BUILD_TARGET=$$OUTPUT/$$TARGET; $(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET install
|
||||
endef
|
||||
|
||||
clean:
|
||||
$(RM) $(TEST_GEN_PROGS) $(OUTPUT)/loop.o
|
||||
TARGET=ebb; BUILD_TARGET=$$OUTPUT/$$TARGET; $(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET clean
|
||||
TARGET=sampling_tests; BUILD_TARGET=$$OUTPUT/$$TARGET; $(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET clean
|
||||
TARGET=event_code_tests; BUILD_TARGET=$$OUTPUT/$$TARGET; $(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET clean
|
||||
|
||||
ebb:
|
||||
TARGET=$@; BUILD_TARGET=$$OUTPUT/$$TARGET; mkdir -p $$BUILD_TARGET; $(MAKE) OUTPUT=$$BUILD_TARGET -k -C $$TARGET all
|
||||
@ -54,4 +58,7 @@ ebb:
|
||||
sampling_tests:
|
||||
TARGET=$@; BUILD_TARGET=$$OUTPUT/$$TARGET; mkdir -p $$BUILD_TARGET; $(MAKE) OUTPUT=$$BUILD_TARGET -k -C $$TARGET all
|
||||
|
||||
.PHONY: all run_tests clean ebb sampling_tests
|
||||
event_code_tests:
|
||||
TARGET=$@; BUILD_TARGET=$$OUTPUT/$$TARGET; mkdir -p $$BUILD_TARGET; $(MAKE) OUTPUT=$$BUILD_TARGET -k -C $$TARGET all
|
||||
|
||||
.PHONY: all run_tests clean ebb sampling_tests event_code_tests
|
||||
|
@ -0,0 +1,9 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
CFLAGS += -m64
|
||||
|
||||
TEST_GEN_PROGS :=
|
||||
|
||||
top_srcdir = ../../../../../..
|
||||
include ../../../lib.mk
|
||||
|
||||
$(TEST_GEN_PROGS): ../../harness.c ../../utils.c ../event.c ../lib.c ../sampling_tests/misc.h ../sampling_tests/misc.c
|
Loading…
Reference in New Issue
Block a user