Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3152085imm; Fri, 20 Jul 2018 11:02:10 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdXx7pf3RnW6HIQQMS+b8/R37DJje3QDzwFN4TrKe3a6hj3crb3j9uA3N2LIseDfuBzaM+1 X-Received: by 2002:a65:40ca:: with SMTP id u10-v6mr2964907pgp.2.1532109730757; Fri, 20 Jul 2018 11:02:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532109730; cv=none; d=google.com; s=arc-20160816; b=yLKLck6THG6Q/jRWJ7+pGD+kl8EaWJEvV1o7s9Q3gES3RHKIexQLscggWzbFDZ8jV9 r0PBoRaYXdvFDKRJ07rAfEmrIb1fqaBJevNi96pVTBzTb7Fcczt/o6aTt5qhG4tMeB7F EvHSMEiWiMnkiCz4QFPe9eL6cgNDTczX0YEgbOscyRLit9CsDp+biPimzsE7fKxdhWaL 3XkdtmsK3O6TOOZsmIEWKQHYMZ9hUTaXGmnF7vmkP8b7drCepgeZranBCjnFZ0KTxYic ibfPCD8qhVraFpZ6Cy0f0zre0RkJv00AGtP0u5udPkwo4PypUt0cbE/Gbn4/p1ebBk8s fniA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:references:in-reply-to:message-id :date:cc:to:from:arc-authentication-results; bh=wVGhd1EHhKPdbH87kT2bRsTrX3p4eMubRmS0UufDAeo=; b=U1oRfOKXiiwokQurgmxVlK0aHpr3b1RuelcqbHS6QdszZy7UUyj+xt5JJH5hjYACJA EQJHBQ+ntfqYiqA401Ti6iVdps3gSFXbfI+sKIJrnTFDKZRhP+PE4zR1gpDwdE0RrF0j k2BwCC6oHn5I8x+XmS/DYrT0aryPr0bbGALw0CcClh++CCg1OX2gjcEots1oNpGSrK3j KJJAsy3DaKVOGSVcfeEechyUch3HkA7dxGT5rlMVW2/OqRkFbVNFZRs8zn++aXb/nYIU FVUkGT9EGX2U+s84jVCQt7mSbLW7srTC5OOb1pxJJTHvThTffl6ge+QLoA4irNL1u4Gt aUqg== 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 1-v6si2353991pgb.107.2018.07.20.11.01.55; Fri, 20 Jul 2018 11:02:10 -0700 (PDT) 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 S2388368AbeGTSuG (ORCPT + 99 others); Fri, 20 Jul 2018 14:50:06 -0400 Received: from ale.deltatee.com ([207.54.116.67]:38360 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387950AbeGTSuF (ORCPT ); Fri, 20 Jul 2018 14:50:05 -0400 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 1fgZhn-0008E8-0W; Fri, 20 Jul 2018 12:00:42 -0600 Received: from gunthorp by cgy1-donard.priv.deltatee.com with local (Exim 4.89) (envelope-from ) id 1fgZhl-000138-Ew; Fri, 20 Jul 2018 12:00:37 -0600 From: Logan Gunthorpe To: linux-kernel@vger.kernel.org, linux-ntb@googlegroups.com, Jon Mason Cc: Allen Hubbe , Serge Semin , Shyam Sundar S K , Shuah Khan , Doug Meyer , Logan Gunthorpe Date: Fri, 20 Jul 2018 12:00:34 -0600 Message-Id: <20180720180034.3964-9-logang@deltatee.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180720180034.3964-1-logang@deltatee.com> References: <20180720180034.3964-1-logang@deltatee.com> 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, allenbh@gmail.com, fancer.lancer@gmail.com, Shyam-sundar.S-k@amd.com, shuah@kernel.org, dmeyer@gigaio.com, logang@deltatee.com X-SA-Exim-Mail-From: gunthorp@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) 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.1 Subject: [PATCH v2 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 --- 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.11.0