Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'linux_kselftest-fixes-6.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest

Pull kselftest fixes from Shuah Khan:
"Fixes to build warnings in several tests and fixes to ftrace tests"

* tag 'linux_kselftest-fixes-6.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
selftests/futex: don't pass a const char* to asprintf(3)
selftests/futex: don't redefine .PHONY targets (all, clean)
selftests/tracing: Fix event filter test to retry up to 10 times
selftests/futex: pass _GNU_SOURCE without a value to the compiler
selftests/overlayfs: Fix build error on ppc64
selftests/openat2: Fix build warnings on ppc64
selftests: cachestat: Fix build warnings on ppc64
tracing/selftests: Fix kprobe event name test for .isra. functions
selftests/ftrace: Update required config
selftests/ftrace: Fix to check required event file
kselftest/alsa: Ensure _GNU_SOURCE is defined

+47 -15
+1 -1
tools/testing/selftests/alsa/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 # 3 3 4 - CFLAGS += $(shell pkg-config --cflags alsa) 4 + CFLAGS += $(shell pkg-config --cflags alsa) $(KHDR_INCLUDES) 5 5 LDLIBS += $(shell pkg-config --libs alsa) 6 6 ifeq ($(LDLIBS),) 7 7 LDLIBS += -lasound
+1
tools/testing/selftests/cachestat/test_cachestat.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 #define _GNU_SOURCE 3 + #define __SANE_USERSPACE_TYPES__ // Use ll64 3 4 4 5 #include <stdio.h> 5 6 #include <stdbool.h>
+1
tools/testing/selftests/filesystems/overlayfs/dev_in_maps.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 #define _GNU_SOURCE 3 + #define __SANE_USERSPACE_TYPES__ // Use ll64 3 4 4 5 #include <inttypes.h> 5 6 #include <unistd.h>
+19 -7
tools/testing/selftests/ftrace/config
··· 1 - CONFIG_KPROBES=y 1 + CONFIG_BPF_SYSCALL=y 2 + CONFIG_DEBUG_INFO_BTF=y 3 + CONFIG_DEBUG_INFO_DWARF4=y 4 + CONFIG_EPROBE_EVENTS=y 5 + CONFIG_FPROBE=y 6 + CONFIG_FPROBE_EVENTS=y 2 7 CONFIG_FTRACE=y 8 + CONFIG_FTRACE_SYSCALLS=y 9 + CONFIG_FUNCTION_GRAPH_RETVAL=y 3 10 CONFIG_FUNCTION_PROFILER=y 4 - CONFIG_TRACER_SNAPSHOT=y 5 - CONFIG_STACK_TRACER=y 6 11 CONFIG_HIST_TRIGGERS=y 7 - CONFIG_SCHED_TRACER=y 8 - CONFIG_PREEMPT_TRACER=y 9 12 CONFIG_IRQSOFF_TRACER=y 10 - CONFIG_PREEMPTIRQ_DELAY_TEST=m 13 + CONFIG_KALLSYMS_ALL=y 14 + CONFIG_KPROBES=y 15 + CONFIG_KPROBE_EVENTS=y 11 16 CONFIG_MODULES=y 12 17 CONFIG_MODULE_UNLOAD=y 18 + CONFIG_PREEMPTIRQ_DELAY_TEST=m 19 + CONFIG_PREEMPT_TRACER=y 20 + CONFIG_PROBE_EVENTS_BTF_ARGS=y 13 21 CONFIG_SAMPLES=y 14 22 CONFIG_SAMPLE_FTRACE_DIRECT=m 15 23 CONFIG_SAMPLE_TRACE_PRINTK=m 16 - CONFIG_KALLSYMS_ALL=y 24 + CONFIG_SCHED_TRACER=y 25 + CONFIG_STACK_TRACER=y 26 + CONFIG_TRACER_SNAPSHOT=y 27 + CONFIG_UPROBES=y 28 + CONFIG_UPROBE_EVENTS=y
+1 -1
tools/testing/selftests/ftrace/test.d/dynevent/test_duplicates.tc
··· 1 1 #!/bin/sh 2 2 # SPDX-License-Identifier: GPL-2.0 3 3 # description: Generic dynamic event - check if duplicate events are caught 4 - # requires: dynamic_events "e[:[<group>/][<event>]] <attached-group>.<attached-event> [<args>]":README 4 + # requires: dynamic_events "e[:[<group>/][<event>]] <attached-group>.<attached-event> [<args>]":README events/syscalls/sys_enter_openat 5 5 6 6 echo 0 > events/enable 7 7
+19 -1
tools/testing/selftests/ftrace/test.d/filter/event-filter-function.tc
··· 10 10 } 11 11 12 12 sample_events() { 13 - echo > trace 14 13 echo 1 > events/kmem/kmem_cache_free/enable 15 14 echo 1 > tracing_on 16 15 ls > /dev/null ··· 21 22 echo 0 > events/enable 22 23 23 24 echo "Get the most frequently calling function" 25 + echo > trace 24 26 sample_events 25 27 26 28 target_func=`cat trace | grep -o 'call_site=\([^+]*\)' | sed 's/call_site=//' | sort | uniq -c | sort | tail -n 1 | sed 's/^[ 0-9]*//'` ··· 32 32 33 33 echo "Test event filter function name" 34 34 echo "call_site.function == $target_func" > events/kmem/kmem_cache_free/filter 35 + 35 36 sample_events 37 + max_retry=10 38 + while [ `grep kmem_cache_free trace| wc -l` -eq 0 ]; do 39 + sample_events 40 + max_retry=$((max_retry - 1)) 41 + if [ $max_retry -eq 0 ]; then 42 + exit_fail 43 + fi 44 + done 36 45 37 46 hitcnt=`grep kmem_cache_free trace| grep $target_func | wc -l` 38 47 misscnt=`grep kmem_cache_free trace| grep -v $target_func | wc -l` ··· 58 49 59 50 echo "Test event filter function address" 60 51 echo "call_site.function == 0x$address" > events/kmem/kmem_cache_free/filter 52 + echo > trace 61 53 sample_events 54 + max_retry=10 55 + while [ `grep kmem_cache_free trace| wc -l` -eq 0 ]; do 56 + sample_events 57 + max_retry=$((max_retry - 1)) 58 + if [ $max_retry -eq 0 ]; then 59 + exit_fail 60 + fi 61 + done 62 62 63 63 hitcnt=`grep kmem_cache_free trace| grep $target_func | wc -l` 64 64 misscnt=`grep kmem_cache_free trace| grep -v $target_func | wc -l`
+2 -1
tools/testing/selftests/ftrace/test.d/kprobe/kprobe_eventname.tc
··· 30 30 fi 31 31 32 32 grep " [tT] .*\.isra\..*" /proc/kallsyms | cut -f 3 -d " " | while read f; do 33 - if grep -s $f available_filter_functions; then 33 + cnt=`grep -s $f available_filter_functions | wc -l`; 34 + if [ $cnt -eq 1 ]; then 34 35 echo $f 35 36 break 36 37 fi
-2
tools/testing/selftests/futex/Makefile
··· 3 3 4 4 TEST_PROGS := run.sh 5 5 6 - .PHONY: all clean 7 - 8 6 include ../lib.mk 9 7 10 8 all:
+1 -1
tools/testing/selftests/futex/functional/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 INCLUDES := -I../include -I../../ $(KHDR_INCLUDES) 3 - CFLAGS := $(CFLAGS) -g -O2 -Wall -D_GNU_SOURCE -pthread $(INCLUDES) $(KHDR_INCLUDES) 3 + CFLAGS := $(CFLAGS) -g -O2 -Wall -D_GNU_SOURCE= -pthread $(INCLUDES) $(KHDR_INCLUDES) 4 4 LDLIBS := -lpthread -lrt 5 5 6 6 LOCAL_HDRS := \
+1 -1
tools/testing/selftests/futex/functional/futex_requeue_pi.c
··· 360 360 361 361 int main(int argc, char *argv[]) 362 362 { 363 - const char *test_name; 363 + char *test_name; 364 364 int c, ret; 365 365 366 366 while ((c = getopt(argc, argv, "bchlot:v:")) != -1) {
+1
tools/testing/selftests/openat2/openat2_test.c
··· 5 5 */ 6 6 7 7 #define _GNU_SOURCE 8 + #define __SANE_USERSPACE_TYPES__ // Use ll64 8 9 #include <fcntl.h> 9 10 #include <sched.h> 10 11 #include <sys/stat.h>