Skip to content

Commit 3d0b8e4

Browse files
mhiramatshuahkh
authored andcommitted
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: 37f4660 ("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>
1 parent e011853 commit 3d0b8e4

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

tools/testing/selftests/ftrace/test.d/00basic/trace_marker_raw.tc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
# requires: trace_marker_raw
55
# flags: instance
66

7+
check_awk_strtonum || exit_unresolved
8+
79
is_little_endian() {
810
if lscpu | grep -q 'Little Endian'; then
911
echo 1;

tools/testing/selftests/ftrace/test.d/functions

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,10 @@ check_requires() { # Check required files and tracers
173173
done
174174
}
175175

176+
check_awk_strtonum() { # strtonum is GNU awk extension
177+
awk 'BEGIN{strtonum("0x1")}'
178+
}
179+
176180
LOCALHOST=127.0.0.1
177181

178182
yield() {

0 commit comments

Comments
 (0)