From: Bart Van Assche Date: Tue, 19 Jun 2018 20:23:45 +0000 (-0700) Subject: common/rc: Fix _have_tracepoint() X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=f39765e40bd03fa9f177905aac335058f45bf3c0;p=users%2Fsagi%2Fblktests.git common/rc: Fix _have_tracepoint() Make sure that _have_tracepoint() uses the argument passed to that function instead of using an undefined variable. Reviewed-by: Johannes Thumshirn Signed-off-by: Bart Van Assche --- diff --git a/common/rc b/common/rc index 7f17280..7592400 100644 --- a/common/rc +++ b/common/rc @@ -112,6 +112,8 @@ _have_tracefs() { } _have_tracepoint() { + local event=$1 + if [[ ! -d /sys/kernel/debug/tracing/events/${event} ]]; then SKIP_REASON="tracepoint ${event} does not exist" return 1