Commit 8e324a5c authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'linux_kselftest-next-6.15-rc1' of...

Merge tag 'linux_kselftest-next-6.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest

Pull Kselftest updates from Shuah Khan:

 - Fix bugs and clean up code in tracing, ftrace, and user_events tests

 - Add missing executables to ftrace gitignore

* tag 'linux_kselftest-next-6.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
  selftests/ftrace: add 'poll' binary to gitignore
  selftests/ftrace: Use readelf to find entry point in uprobe test
  selftests/user_events: Fix failures caused by test code
  selftests/tracing: Allow some more tests to run in instances
  selftests/ftrace: Clean up triggers after setting them
  selftests/tracing: Test only toplevel README file not the instances
parents 68f090f0 82ef781f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0-only
logs
poll
+7 −3
Original line number Diff line number Diff line
@@ -3,14 +3,18 @@
# description: Generic dynamic event - add/remove/test uprobe events
# requires: uprobe_events

if ! which readelf > /dev/null 2>&1 ; then
  echo "No readelf found. skipped."
  exit_unresolved
fi

echo 0 > events/enable
echo > dynamic_events

REALBIN=`readlink -f /bin/sh`
ENTRYPOINT=`readelf -h ${REALBIN} | grep Entry | sed -e 's/[^0]*//'`

echo 'cat /proc/$$/maps' | /bin/sh | \
	grep "r-xp .*${REALBIN}$" | \
	awk '{printf "p:myevent %s:0x%s\n", $6,$3 }' >> uprobe_events
echo "p:myevent ${REALBIN}:${ENTRYPOINT}" >> uprobe_events

grep -q myevent uprobe_events
test -d events/uprobes/myevent
+7 −1
Original line number Diff line number Diff line
@@ -156,7 +156,13 @@ check_requires() { # Check required files and tracers
                exit_unsupported
            fi
        elif [ "$r" != "$i" ]; then
            if ! grep -Fq "$r" README ; then
	    # If this is an instance, check the top directory
	    if echo $TRACING_DIR | grep -q "/instances/"; then
		test="$TRACING_DIR/../.."
	    else
		test=$TRACING_DIR
	    fi
            if ! grep -Fq "$r" $test/README ; then
                echo "Required feature pattern \"$r\" is not in README."
                exit_unsupported
            fi
+1 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
# SPDX-License-Identifier: GPL-2.0
# description: event trigger - test inter-event histogram trigger expected fail actions
# requires: set_event snapshot "snapshot()":README
# flags: instance

fail() { #msg
    echo $1
+3 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
# SPDX-License-Identifier: GPL-2.0
# description: event trigger - test inter-event histogram trigger onchange action
# requires: set_event "onchange(var)":README ping:program
# flags: instance

fail() { #msg
    echo $1
@@ -19,4 +20,6 @@ if ! grep -q "changed:" events/sched/sched_waking/hist; then
    fail "Failed to create onchange action inter-event histogram"
fi

echo '!hist:keys=comm:newprio=prio:onchange($newprio).save(comm,prio) if comm=="ping"' >> events/sched/sched_waking/trigger

exit 0
Loading