From patchwork Fri Jun 22 22:19:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 10483147 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 08C2C602CB for ; Fri, 22 Jun 2018 22:19:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EECCD28FF5 for ; Fri, 22 Jun 2018 22:19:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E3F5328FFB; Fri, 22 Jun 2018 22:19:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A54D128FF5 for ; Fri, 22 Jun 2018 22:19:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933808AbeFVWTs (ORCPT ); Fri, 22 Jun 2018 18:19:48 -0400 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:59818 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933753AbeFVWTr (ORCPT ); Fri, 22 Jun 2018 18:19:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1529705988; x=1561241988; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=LfnLuETl3j/NeWsOHVJ9DDxa9dgFHVDDLakvjcxXxWY=; b=RgOqGbniwcPCunbKIphSABRwraie69T7KtUwvELGEmBTqfojICiYsDtj PCLR1YM2Gcy9l3fN4TYPjAT3+YshpbMdY7OT1kFrpG95oZDujcUqwd3qM Q0Pfjar8arh59rPhVmKOcjwPRPeZNFzp7is8woE2lv8pKn7n6to1Efr+T lZst0MCjBTi20e2TQw64aYZanVsNfmmmJOy2fe48Pw9B3rSLUXVGwUoeY 5vhBWRAyVsk+Yx5p5/daQ8su4+w5HWnjCytCIkrRTsERCC81sNXc9L8RK dHlUZjzcz6AI/OmJN45S82lTl1bhdH/VuRr3oDSo95aYa5qxeaUdPGrZc A==; X-IronPort-AV: E=Sophos;i="5.51,259,1526313600"; d="scan'208";a="83827516" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 23 Jun 2018 06:19:47 +0800 Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP; 22 Jun 2018 15:09:15 -0700 Received: from thinkpad-bart.sdcorp.global.sandisk.com ([10.111.67.248]) by uls-op-cesaip01.wdc.com with ESMTP; 22 Jun 2018 15:19:47 -0700 From: Bart Van Assche To: Omar Sandoval Cc: linux-block@vger.kernel.org, Bart Van Assche Subject: [PATCH blktests 01/15] common/rc: Fix _have_tracepoint() Date: Fri, 22 Jun 2018 15:19:32 -0700 Message-Id: <20180622221946.10987-2-bart.vanassche@wdc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180622221946.10987-1-bart.vanassche@wdc.com> References: <20180622221946.10987-1-bart.vanassche@wdc.com> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Make sure that _have_tracepoint() uses the argument passed to that function instead of using an undefined variable. Signed-off-by: Bart Van Assche --- common/rc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/rc b/common/rc index 7f1728025364..7592400dda82 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