Skip to content

Commit 1e6b485

Browse files
mhiramatshuahkh
authored andcommitted
selftests/ftrace: Fix bash specific "==" operator
Since commit a1d6cd8 ("selftests/ftrace: event_triggers: wait longer for test_event_enable") introduced bash specific "==" comparation operator, that test will fail when we run it on a posix-shell. `checkbashisms` warned it as below. possible bashism in ftrace/func_event_triggers.tc line 45 (should be 'b = a'): if [ "$e" == $val ]; then This replaces it with "=". Fixes: a1d6cd8 ("selftests/ftrace: event_triggers: wait longer for test_event_enable") Signed-off-by: Masami Hiramatsu (Google) <[email protected]> Reviewed-by: Steven Rostedt (Google) <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
1 parent 787fccb commit 1e6b485

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/testing/selftests/ftrace/test.d/ftrace/func_event_triggers.tc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ test_event_enabled() {
4242

4343
while [ $check_times -ne 0 ]; do
4444
e=`cat $EVENT_ENABLE`
45-
if [ "$e" == $val ]; then
45+
if [ "$e" = $val ]; then
4646
return 0
4747
fi
4848
sleep $SLEEP_TIME

0 commit comments

Comments
 (0)