[tip: objtool/core] objtool/klp: Run the klp tests under set -u
From: tip-bot2 for Song Liu
Date: Fri Sep 18 2026 - 06:38:30 EST
The following commit has been merged into the objtool/core branch of tip:
Commit-ID: 3c961933f3462eab9c7e34e5978de837cc86f59a
Gitweb: https://git.kernel.org/tip/3c961933f3462eab9c7e34e5978de837cc86f59a
Author: Song Liu <song@xxxxxxxxxx>
AuthorDate: Wed, 16 Sep 2026 11:43:01 -07:00
Committer: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
CommitterDate: Wed, 16 Sep 2026 17:13:26 -07:00
objtool/klp: Run the klp tests under set -u
Most of these assertions end in a grep, and an empty pattern matches
anything. So a mistyped variable name in a test does not fail: it expands
to nothing, the grep succeeds, and the test reports a pass having checked
nothing. assert_section "$sectoin_nmae" becomes a search for two adjacent
spaces, which readelf's column padding satisfies on every line.
Refuse unset variables. lib.sh guards the few genuinely optional
expansions it has with ${x:-}.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Song Liu <song@xxxxxxxxxx>
Link: https://patch.msgid.link/20260916184351.2720310-9-song@xxxxxxxxxx
Signed-off-by: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
---
tools/objtool/tests/lib.sh | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/objtool/tests/lib.sh b/tools/objtool/tests/lib.sh
index 82e6b0d..294b99c 100644
--- a/tools/objtool/tests/lib.sh
+++ b/tools/objtool/tests/lib.sh
@@ -8,6 +8,8 @@
# codegen varies between compilers and golden files would report churn instead
# of regressions.
+set -u
+
TESTS_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# Tests live in generic/ or in an architecture directory beside it, and each