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: 37f4660138 ("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>
This commit is contained in:
Masami Hiramatsu (Google) 2026-02-10 18:54:22 +09:00 committed by Shuah Khan
parent e011853dd7
commit 3d0b8e4507
2 changed files with 6 additions and 0 deletions

View File

@ -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;

View File

@ -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() {