Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1459106imm; Fri, 8 Jun 2018 17:09:55 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJVLQYdsoDBqCs62hLlnNbkTcSGMv6XO/4V6WOgHnSxAK201CtK8W40vyn6gT7E4TRLMtdu X-Received: by 2002:a17:902:8486:: with SMTP id c6-v6mr8373139plo.283.1528502994955; Fri, 08 Jun 2018 17:09:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528502994; cv=none; d=google.com; s=arc-20160816; b=Y3cVPjZ3qMKV2RLJmIZ/W68y60CkB8BKBpn6tS3EkQPkJ76TeuPLoVxxWXHmUuA7AT tcSFuTwWaYi5sfeMPThkFYtC7gqFP2BjLOlyV/q5ls45E7UgjzOvNSUrsZ7sCrjLYhO4 09JpdWLjT2Am1+YXVGoAB9rDxxMOW2BWcCT1REJ245DM9A1KCv4sRc0jnszF1xL3HJGo awAe5MvvDQR8nbB/XANwzWoYl1BzsZXDfACVYFerDkxuuO3RT1hAOFvOZ1yfxgBUAazq U78J4ZcnVEgawLR9MFWgZSP57ERQ3coRhOMU25uxo7r4yFF1ro9+53idZMOEWkWxzo41 zCOQ== 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=MZB/Po2judKtikD4Sgdl4vDqZH/vqzhYydD3vhB1h8U5rizOLAaros1RlwSWWEDkBA +0R0QM6Wb5DdIKbW+KULo4ui39T0O7XkGq4Pq14qyBrWmyShvmXQTmdCJf8ypdsg5GDi MH0hiZ81R9PPbRQBL8TxoKCas76chQ4We8tXa/d5d58lYKt/dDRdx7je0flbfLqE0enk 4OfKUjwyxugj7lOSlomTDQct/xjQkB6ZpRrnx/yq/spBUN2XXc+Mc244cuBroaspVe+F mD2QbcsUIXjMymNeUgnleG1Fm1S3dQ7vKxZYy6PLB/ufp/ZB9WpJu2aJ46YJcLubJlaC UMKg== 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 r8-v6si29538983pgs.573.2018.06.08.17.09.40; Fri, 08 Jun 2018 17:09:54 -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 S1753253AbeFIAIa (ORCPT + 99 others); Fri, 8 Jun 2018 20:08:30 -0400 Received: from ale.deltatee.com ([207.54.116.67]:60542 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752974AbeFIAI1 (ORCPT ); Fri, 8 Jun 2018 20:08:27 -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 1fRRQd-00043v-2S; Fri, 08 Jun 2018 18:08:24 -0600 Received: from gunthorp by cgy1-donard.priv.deltatee.com with local (Exim 4.89) (envelope-from ) id 1fRRQc-0003dB-D1; Fri, 08 Jun 2018 18:08:22 -0600 From: Logan Gunthorpe To: linux-kernel@vger.kernel.org, linux-ntb@googlegroups.com Cc: Jon Mason , Dave Jiang , Allen Hubbe , Serge Semin , Shyam Sundar S K , Shuah Khan , Logan Gunthorpe Date: Fri, 8 Jun 2018 18:08:19 -0600 Message-Id: <20180609000819.13883-10-logang@deltatee.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180609000819.13883-1-logang@deltatee.com> References: <20180609000819.13883-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, dave.jiang@intel.com, allenbh@gmail.com, fancer.lancer@gmail.com, Shyam-sundar.S-k@amd.com, shuah@kernel.org, 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 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