mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-04-14 09:57:39 +02:00
Add -v flag to prove command to also print the names of tests that succeeded, not only those that failed, to allow easier debugging of the test suite. Also, drop printing the option and value to stdout in check_with_osnoise_options, which was a debugging print that was accidentally left in the final commit, and which would be otherwise now visible in make check output, as stdout is no longer suppressed. Suggested-by: Crystal Wood <crwood@redhat.com> Reviewed-by: Wander Lairson Costa <wander@redhat.com> Link: https://lore.kernel.org/r/20251126144205.331954-6-tglozar@redhat.com Signed-off-by: Tomas Glozar <tglozar@redhat.com>
116 lines
3.2 KiB
Makefile
116 lines
3.2 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
ifeq ($(srctree),)
|
|
srctree := $(patsubst %/,%,$(dir $(CURDIR)))
|
|
srctree := $(patsubst %/,%,$(dir $(srctree)))
|
|
srctree := $(patsubst %/,%,$(dir $(srctree)))
|
|
endif
|
|
|
|
include $(srctree)/tools/scripts/Makefile.include
|
|
|
|
# O is an alias for OUTPUT
|
|
OUTPUT := $(O)
|
|
|
|
ifeq ($(OUTPUT),)
|
|
OUTPUT := $(CURDIR)
|
|
else
|
|
# subdir is used by the ../Makefile in $(call descend,)
|
|
ifneq ($(subdir),)
|
|
OUTPUT := $(OUTPUT)/$(subdir)
|
|
endif
|
|
endif
|
|
|
|
ifneq ($(patsubst %/,,$(lastword $(OUTPUT))),)
|
|
OUTPUT := $(OUTPUT)/
|
|
endif
|
|
|
|
RTLA := $(OUTPUT)rtla
|
|
RTLA_IN := $(RTLA)-in.o
|
|
|
|
VERSION := $(shell sh -c "make -sC ../../.. kernelversion | grep -v make")
|
|
DOCSRC := ../../../Documentation/tools/rtla/
|
|
|
|
FEATURE_TESTS := libtraceevent
|
|
FEATURE_TESTS += libtracefs
|
|
FEATURE_TESTS += libcpupower
|
|
FEATURE_TESTS += libbpf
|
|
FEATURE_TESTS += clang-bpf-co-re
|
|
FEATURE_TESTS += bpftool-skeletons
|
|
FEATURE_DISPLAY := libtraceevent
|
|
FEATURE_DISPLAY += libtracefs
|
|
FEATURE_DISPLAY += libcpupower
|
|
FEATURE_DISPLAY += libbpf
|
|
FEATURE_DISPLAY += clang-bpf-co-re
|
|
FEATURE_DISPLAY += bpftool-skeletons
|
|
|
|
all: $(RTLA)
|
|
|
|
include $(srctree)/tools/build/Makefile.include
|
|
include Makefile.rtla
|
|
|
|
# check for dependencies only on required targets
|
|
NON_CONFIG_TARGETS := clean install tarball doc doc_clean doc_install
|
|
|
|
config := 1
|
|
ifdef MAKECMDGOALS
|
|
ifeq ($(filter-out $(NON_CONFIG_TARGETS),$(MAKECMDGOALS)),)
|
|
config := 0
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(config),1)
|
|
include $(srctree)/tools/build/Makefile.feature
|
|
include Makefile.config
|
|
endif
|
|
|
|
CFLAGS += $(INCLUDES) $(LIB_INCLUDES)
|
|
|
|
export CFLAGS OUTPUT srctree
|
|
|
|
ifeq ($(BUILD_BPF_SKEL),1)
|
|
src/timerlat.bpf.o: src/timerlat.bpf.c
|
|
$(QUIET_CLANG)$(CLANG) -g -O2 -target bpf -c $(filter %.c,$^) -o $@
|
|
|
|
src/timerlat.skel.h: src/timerlat.bpf.o
|
|
$(QUIET_GENSKEL)$(SYSTEM_BPFTOOL) gen skeleton $< > $@
|
|
|
|
example/timerlat_bpf_action.o: example/timerlat_bpf_action.c
|
|
$(QUIET_CLANG)$(CLANG) -g -O2 -target bpf -c $(filter %.c,$^) -o $@
|
|
|
|
tests/bpf/bpf_action_map.o: tests/bpf/bpf_action_map.c
|
|
$(QUIET_CLANG)$(CLANG) -g -O2 -target bpf -c $(filter %.c,$^) -o $@
|
|
else
|
|
src/timerlat.skel.h:
|
|
$(Q)echo '/* BPF skeleton is disabled */' > src/timerlat.skel.h
|
|
|
|
example/timerlat_bpf_action.o: example/timerlat_bpf_action.c
|
|
$(Q)echo "BPF skeleton support is disabled, skipping example/timerlat_bpf_action.o"
|
|
|
|
tests/bpf/bpf_action_map.o: tests/bpf/bpf_action_map.c
|
|
$(Q)echo "BPF skeleton support is disabled, skipping tests/bpf/bpf_action_map.o"
|
|
endif
|
|
|
|
$(RTLA): $(RTLA_IN)
|
|
$(QUIET_LINK)$(CC) $(LDFLAGS) -o $(RTLA) $(RTLA_IN) $(EXTLIBS)
|
|
|
|
static: $(RTLA_IN)
|
|
$(eval LDFLAGS += -static)
|
|
$(QUIET_LINK)$(CC) -static $(LDFLAGS) -o $(RTLA)-static $(RTLA_IN) $(EXTLIBS)
|
|
|
|
rtla.%: fixdep FORCE
|
|
make -f $(srctree)/tools/build/Makefile.build dir=. $@
|
|
|
|
$(RTLA_IN): fixdep FORCE src/timerlat.skel.h
|
|
make $(build)=rtla
|
|
|
|
clean: doc_clean fixdep-clean
|
|
$(call QUIET_CLEAN, rtla)
|
|
$(Q)find . -name '*.o' -delete -o -name '\.*.cmd' -delete -o -name '\.*.d' -delete
|
|
$(Q)rm -f rtla rtla-static fixdep FEATURE-DUMP rtla-*
|
|
$(Q)rm -rf feature
|
|
$(Q)rm -f src/timerlat.bpf.o src/timerlat.skel.h example/timerlat_bpf_action.o
|
|
check: $(RTLA) tests/bpf/bpf_action_map.o
|
|
RTLA=$(RTLA) BPFTOOL=$(SYSTEM_BPFTOOL) prove -o -f -v tests/
|
|
examples: example/timerlat_bpf_action.o
|
|
.PHONY: FORCE clean check
|