Files
linux/tools/objtool/tests/generic/test-new-function.sh
T
Puranjay Mohan 960c3e352b objtool/klp: Add test for newly introduced functions
A function added by the patch has no original to correlate against, and
still has to be carried into the livepatch or the changed caller ends up
referencing something which does not exist.

The helper is noinline so the case survives the optimiser; otherwise the
compiler folds it into its only caller and the test covers nothing.

Signed-off-by: Puranjay Mohan <[email protected]>
Signed-off-by: Song Liu <[email protected]>
Signed-off-by: Josh Poimboeuf <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Assisted-by: Claude:claude-opus-5
Link: https://patch.msgid.link/[email protected]
2026-09-21 11:02:40 +02:00

17 lines
351 B
Bash
Executable File

#!/bin/bash
# SPDX-License-Identifier: GPL-2.0
#
# A function added by the patch has no original to correlate against and must
# still be carried into the livepatch.
. "$(dirname "$0")/../lib.sh"
setup
build_pair new_function.c
run_diff
assert_patched target
assert_symbol klp_new_helper
pass "new function carried into the patch with its caller"