summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMasami Hiramatsu (Google) <mhiramat@kernel.org>2026-02-10 12:54:22 +0300
committerShuah Khan <skhan@linuxfoundation.org>2026-03-31 22:06:24 +0300
commit3d0b8e45075d398369eb07e11f529c17a63cf5e1 (patch)
tree8596c97f1c44f713fa65f6e677823035edd8310c /tools
parente011853dd78f97898ae8e0b0b949603987e24c4b (diff)
downloadlinux-3d0b8e45075d398369eb07e11f529c17a63cf5e1.tar.xz
selftests/tracing: Fix to check awk supports non POSIX strtonum()
Check the awk command supports non POSIX strtonum() function in the trace_marker_raw test case. Fixes: 37f46601383a ("selftests/tracing: Add basic test for trace_marker_raw file") Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Link: https://lore.kernel.org/r/177071726229.2369897.11506524546451139051.stgit@mhiramat.tok.corp.google.com Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/ftrace/test.d/00basic/trace_marker_raw.tc2
-rw-r--r--tools/testing/selftests/ftrace/test.d/functions4
2 files changed, 6 insertions, 0 deletions
diff --git a/tools/testing/selftests/ftrace/test.d/00basic/trace_marker_raw.tc b/tools/testing/selftests/ftrace/test.d/00basic/trace_marker_raw.tc
index a2c42e13f614..8e905d4fe6dd 100644
--- a/tools/testing/selftests/ftrace/test.d/00basic/trace_marker_raw.tc
+++ b/tools/testing/selftests/ftrace/test.d/00basic/trace_marker_raw.tc
@@ -4,6 +4,8 @@
# requires: trace_marker_raw
# flags: instance
+check_awk_strtonum || exit_unresolved
+
is_little_endian() {
if lscpu | grep -q 'Little Endian'; then
echo 1;
diff --git a/tools/testing/selftests/ftrace/test.d/functions b/tools/testing/selftests/ftrace/test.d/functions
index e8e718139294..41325f387ee7 100644
--- a/tools/testing/selftests/ftrace/test.d/functions
+++ b/tools/testing/selftests/ftrace/test.d/functions
@@ -173,6 +173,10 @@ check_requires() { # Check required files and tracers
done
}
+check_awk_strtonum() { # strtonum is GNU awk extension
+ awk 'BEGIN{strtonum("0x1")}'
+}
+
LOCALHOST=127.0.0.1
yield() {