Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1089389imu; Wed, 9 Jan 2019 11:25:12 -0800 (PST) X-Google-Smtp-Source: ALg8bN7F/Rin1EvCg5kpHiHyHy85T14zJs/Bw2NHOtrMWShVE2lG7RLSHAOv51bErOQXW+2zv2jD X-Received: by 2002:a62:a209:: with SMTP id m9mr7327930pff.218.1547061911833; Wed, 09 Jan 2019 11:25:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547061911; cv=none; d=google.com; s=arc-20160816; b=ULek8mefN43UPo/TojzEhkWWnEYxNEYXH4d8uly94+o8wiDOQAVOcaod9itszEfSa7 8Rz1Wi1uMKSaM1H5vin1FtEFYnxV4Ov+CUL1nqf+77916z/+/BHNkOL7bek/D1ZkUM65 /C/gGJq6mcCBWXvaEZ5uPs22OOYDCIWCLusg0me7c5Ng3DiIO0xagVglipooj/drnDjI Sk//odtYb6JzkZko+5Mjmf7/X5zCTm855ld+BEFtWvjSgJjkA6PsEj6LUpHLuB3mNJR5 y+kAQO8VsgaTuuNjJl8zCclr/w+gVl8NKwDi1lwPpQ9SPwQry+b2kItQkQhiUPEZTE6+ UB7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:cc:to:from; bh=WZQwzVFrxO8EfmqQPpmTVyK3EiPsHpfg0+fr+gZIUlU=; b=g7ujbxAOyJ2Z2J75qG/DJYn09KdJvRsIP395Eby90JqsLDWzDygYXXLvaHzP+erlbc 93nVe3e2puthy4HCAame2G7UcUJ2a2fegHgnmt2DB1uiApwbNhLEYHfbDkwsQ25aGURQ c6rQN8OBo4MzEKHLCO2l34ZzxbFrj2cfjp+3yh+Ql1iLfOBAtL25vGpyCASnki08hDx3 mCswG9U1K/x5B8zHpT+cB5H9aVBJfsod0XnjB5DoBj6uHndsLElMRD/+wM8WfjUWLUo0 06y3E7/FPRGf95HlZnCGSjhHg0/9+P95Pg/JcT3DfEyKBSBvOBBxfWJ/git5LanAkw1P j+9w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f124si451700pfa.1.2019.01.09.11.24.55; Wed, 09 Jan 2019 11:25:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728454AbfAITWs (ORCPT + 99 others); Wed, 9 Jan 2019 14:22:48 -0500 Received: from ale.deltatee.com ([207.54.116.67]:59692 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728176AbfAITWq (ORCPT ); Wed, 9 Jan 2019 14:22:46 -0500 Received: from cgy1-donard.priv.deltatee.com ([172.16.1.31]) by ale.deltatee.com with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ghJR2-00053w-GF; Wed, 09 Jan 2019 12:22:45 -0700 Received: from gunthorp by cgy1-donard.priv.deltatee.com with local (Exim 4.89) (envelope-from ) id 1ghJR1-0001Vz-SC; Wed, 09 Jan 2019 12:22:39 -0700 From: Logan Gunthorpe To: linux-kernel@vger.kernel.org, linux-ntb@googlegroups.com, Jon Mason Cc: Allen Hubbe , Dave Jiang , Serge Semin , Logan Gunthorpe Date: Wed, 9 Jan 2019 12:22:33 -0700 Message-Id: <20190109192233.5752-9-logang@deltatee.com> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20190109192233.5752-1-logang@deltatee.com> References: <20190109192233.5752-1-logang@deltatee.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 172.16.1.31 X-SA-Exim-Rcpt-To: linux-kernel@vger.kernel.org, linux-ntb@googlegroups.com, jdmason@kudzu.us, dave.jiang@intel.com, allenbh@gmail.com, fancer.lancer@gmail.com, logang@deltatee.com X-SA-Exim-Mail-From: gunthorp@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on ale.deltatee.com X-Spam-Level: X-Spam-Status: No, score=-8.7 required=5.0 tests=ALL_TRUSTED,BAYES_00, GREYLIST_ISWHITE,MYRULES_NO_TEXT autolearn=ham autolearn_force=no version=3.4.2 Subject: [PATCH v3 8/8] NTB: ntb_test: Fix bug when counting remote files X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When remote files are counted in get_files_count, without using SSH, the code returns 0 because there is a colon prepended to $LOC. $VPATH should have been used instead of $LOC. Fixes: 06bd0407d06c ("NTB: ntb_test: Update ntb_tool Scratchpad tests") Signed-off-by: Logan Gunthorpe Acked-by: Allen Hubbe Tested-by: Alexander Fomichev --- tools/testing/selftests/ntb/ntb_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/ntb/ntb_test.sh b/tools/testing/selftests/ntb/ntb_test.sh index 08cbfbbc7029..17ca36403d04 100755 --- a/tools/testing/selftests/ntb/ntb_test.sh +++ b/tools/testing/selftests/ntb/ntb_test.sh @@ -250,7 +250,7 @@ function get_files_count() split_remote $LOC if [[ "$REMOTE" == "" ]]; then - echo $(ls -1 "$LOC"/${NAME}* 2>/dev/null | wc -l) + echo $(ls -1 "$VPATH"/${NAME}* 2>/dev/null | wc -l) else echo $(ssh "$REMOTE" "ls -1 \"$VPATH\"/${NAME}* | \ wc -l" 2> /dev/null) -- 2.19.0