selftests/ftrace: Add missing spaces after ! in probe syntax tests
Subsystems (3)
PATCH 1/1 selftests/ftrace: Add missing spaces after ! in probe syntax tests
Add the missing space between ! and grep. Otherwise, the shell tries to run !grep and reports "!grep: not found". This always skips the conditional checks without checking for kernel return probe argument support.
--- .../selftests/ftrace/test.d/dynevent/fprobe_syntax_errors.tc | 4 ++-- .../selftests/ftrace/test.d/kprobe/kprobe_syntax_errors.tc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
tools/testing/selftests/ftrace/test.d/dynevent/fprobe_syntax_errors.tc +2 -2
@@ -33,7 +33,7 @@ check_error 'f vfs_read ^$stack10000' # BAD_STACK_NUM check_error 'f vfs_read ^$arg10000' # BAD_ARG_NUM -if !grep -q 'kernel return probes support:' README; then +if ! grep -q 'kernel return probes support:' README; then check_error 'f vfs_read $retval ^$arg1' # BAD_VAR fi check_error 'f vfs_read ^$none_var' # BAD_VAR
@@ -100,7 +100,7 @@ if grep -q "<argname>" README; then check_error 'f vfs_read args=^$arg*' # BAD_VAR_ARGS check_error 'f vfs_read +0(^$arg*)' # BAD_VAR_ARGS check_error 'f vfs_read $arg* ^$arg*' # DOUBLE_ARGS -if !grep -q 'kernel return probes support:' README; then +if ! grep -q 'kernel return probes support:' README; then check_error 'f vfs_read%return ^$arg*' # NOFENTRY_ARGS fi check_error 'f vfs_read ^hoge' # NO_BTFARG
tools/testing/selftests/ftrace/test.d/kprobe/kprobe_syntax_errors.tc +1 -1
@@ -108,7 +108,7 @@ if grep -q "<argname>" README; then check_error 'p vfs_read args=^$arg*' # BAD_VAR_ARGS check_error 'p vfs_read +0(^$arg*)' # BAD_VAR_ARGS check_error 'p vfs_read $arg* ^$arg*' # DOUBLE_ARGS -if !grep -q 'kernel return probes support:' README; then +if ! grep -q 'kernel return probes support:' README; then check_error 'r vfs_read ^$arg*' # NOFENTRY_ARGS fi check_error 'p vfs_read+20 ^$arg*' # NOFENTRY_ARGS
Signature · 1 line
2.43.0
Quoted 6 lines · Jaewon Jung
Add the missing space between ! and grep. Otherwise, the shell tries to run !grep and reports "!grep: not found". This always skips the conditional checks without checking for kernel return probe argument support.
Signed-off-by Jaewon Jung <[email protected]>
Looks good to me! Also we need followings.
Shuah, can you pick this fix?
Thanks,
Signature · 1 line
Masami Hiramatsu (Google) <[email protected]>
PATCH v2 1/1 selftests/ftrace: Add missing spaces after ! in probe syntax tests
In reply to Jaewon JungAdd the missing space between ! and grep. Otherwise, the shell tries to run !grep and reports "!grep: not found". This always skips the conditional checks without checking for kernel return probe argument support.
---
Changes in v2:
- Add Fixes, Cc stable and Acked-by tags as suggested by Masami.
.../selftests/ftrace/test.d/dynevent/fprobe_syntax_errors.tc | 4 ++-- .../selftests/ftrace/test.d/kprobe/kprobe_syntax_errors.tc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
tools/testing/selftests/ftrace/test.d/dynevent/fprobe_syntax_errors.tc +2 -2
@@ -33,7 +33,7 @@ check_error 'f vfs_read ^$stack10000' # BAD_STACK_NUM check_error 'f vfs_read ^$arg10000' # BAD_ARG_NUM -if !grep -q 'kernel return probes support:' README; then +if ! grep -q 'kernel return probes support:' README; then check_error 'f vfs_read $retval ^$arg1' # BAD_VAR fi check_error 'f vfs_read ^$none_var' # BAD_VAR
@@ -100,7 +100,7 @@ if grep -q "<argname>" README; then check_error 'f vfs_read args=^$arg*' # BAD_VAR_ARGS check_error 'f vfs_read +0(^$arg*)' # BAD_VAR_ARGS check_error 'f vfs_read $arg* ^$arg*' # DOUBLE_ARGS -if !grep -q 'kernel return probes support:' README; then +if ! grep -q 'kernel return probes support:' README; then check_error 'f vfs_read%return ^$arg*' # NOFENTRY_ARGS fi check_error 'f vfs_read ^hoge' # NO_BTFARG
tools/testing/selftests/ftrace/test.d/kprobe/kprobe_syntax_errors.tc +1 -1
@@ -108,7 +108,7 @@ if grep -q "<argname>" README; then check_error 'p vfs_read args=^$arg*' # BAD_VAR_ARGS check_error 'p vfs_read +0(^$arg*)' # BAD_VAR_ARGS check_error 'p vfs_read $arg* ^$arg*' # DOUBLE_ARGS -if !grep -q 'kernel return probes support:' README; then +if ! grep -q 'kernel return probes support:' README; then check_error 'r vfs_read ^$arg*' # NOFENTRY_ARGS fi check_error 'p vfs_read+20 ^$arg*' # NOFENTRY_ARGS
Signature · 1 line
2.43.0
Shuah Khan
maintainerQuoted 5 lines · Jaewon Jung
Add the missing space between ! and grep. Otherwise, the shell tries to run !grep and reports "!grep: not found". This always skips the conditional checks without checking for kernel return probe argument support.
Quoted 8 lines
Fixes 25f00e40ce79 ("tracing/probes: Support $argN in return probe (kprobe and fprobe)")Signed-off-by Jaewon Jung <[email protected]>---
Changes in v2:
- Add Fixes, Cc stable and Acked-by tags as suggested by Masami.
Thank you. I will take this for 7.4-rc2.
thanks,
-- Shuah
Masami Hiramatsu (Google)
maintainerQuoted 15 lines · Shuah Khan
Quoted 5 lines · Jaewon Jung
Add the missing space between ! and grep. Otherwise, the shell tries to run !grep and reports "!grep: not found". This always skips the conditional checks without checking for kernel return probe argument support.
Quoted 8 lines
Fixes 25f00e40ce79 ("tracing/probes: Support $argN in return probe (kprobe and fprobe)")Signed-off-by Jaewon Jung <[email protected]>---
Changes in v2:
- Add Fixes, Cc stable and Acked-by tags as suggested by Masami.
Quoted 1 line
Thank you. I will take this for 7.4-rc2.
Thank you!
Signature · 1 line
Masami Hiramatsu (Google) <[email protected]>