Fix the below checkbashisms errors. Because of these errors, these tests
will fail on dash shell.
possible bashism in test.d/kprobe/kretprobe_entry_arg.tc line 14 ('function' is useless):
function streq() {
possible bashism in test.d/dynevent/fprobe_entry_arg.tc line 14 ('function' is useless):
function streq() {
Fixes: f6e2253a61
("selftests/ftrace: Add test cases for entry args at function exit")
Cc: stable@vger.kernel.org
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
19 lines
507 B
Bash
19 lines
507 B
Bash
#!/bin/sh
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
# description: Function return probe entry argument access
|
|
# requires: dynamic_events 'f[:[<group>/][<event>]] <func-name>':README 'kernel return probes support:':README
|
|
|
|
echo 'f:tests/myevent1 vfs_open arg=$arg1' >> dynamic_events
|
|
echo 'f:tests/myevent2 vfs_open%return arg=$arg1' >> dynamic_events
|
|
|
|
echo 1 > events/tests/enable
|
|
|
|
echo > trace
|
|
cat trace > /dev/null
|
|
|
|
streq() {
|
|
test $1 = $2
|
|
}
|
|
|
|
streq `grep -A 1 -m 1 myevent1 trace | sed -r 's/^.*(arg=.*)/\1/' `
|