From patchwork Mon Feb 3 16:40:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 11363103 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5B6B1924 for ; Mon, 3 Feb 2020 16:41:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4491F20838 for ; Mon, 3 Feb 2020 16:41:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731450AbgBCQk5 (ORCPT ); Mon, 3 Feb 2020 11:40:57 -0500 Received: from mx2.suse.de ([195.135.220.15]:43782 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730677AbgBCQk4 (ORCPT ); Mon, 3 Feb 2020 11:40:56 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id A2B6DAF7E; Mon, 3 Feb 2020 16:40:54 +0000 (UTC) From: Daniel Wagner To: linux-block@vger.kernel.org Cc: Keith Busch , "Elliott\, Robert" , Johannes Thumshirn , Logan Gunthorpe , Omar Sandoval , Daniel Wagner Subject: [PATCH blktests v3 1/2] nvme/018: Ignore message generated by nvme read Date: Mon, 3 Feb 2020 17:40:48 +0100 Message-Id: <20200203164049.140280-2-dwagner@suse.de> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20200203164049.140280-1-dwagner@suse.de> References: <20200203164049.140280-1-dwagner@suse.de> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org nvme-cli writes 'CAP_EXCEEDED' message also on stdout not just stderr. This lets the test fail as well. Fixes: 1aee5f430b30 ("nvme/018: Ignore error message generated by nvme read") Signed-off-by: Daniel Wagner Reviewed-by: Logan Gunthorpe Reviewed-by: Keith Busch Reviewed-by: Chaitanya Kulkarni --- tests/nvme/018 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/nvme/018 b/tests/nvme/018 index 0a5b4c2ab019..d0f15db23538 100755 --- a/tests/nvme/018 +++ b/tests/nvme/018 @@ -43,7 +43,7 @@ test() { sectors="$(blockdev --getsz "/dev/${nvmedev}n1")" bs="$(blockdev --getbsz "/dev/${nvmedev}n1")" - nvme read "/dev/${nvmedev}n1" -s "$sectors" -c 0 -z "$bs" 2>"$FULL" \ + nvme read "/dev/${nvmedev}n1" -s "$sectors" -c 0 -z "$bs" &>"$FULL" \ && echo "ERROR: Successfully read out of device lba range" nvme disconnect -n "${subsys_name}" From patchwork Mon Feb 3 16:40:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 11363101 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3BB60138D for ; Mon, 3 Feb 2020 16:41:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2363B20838 for ; Mon, 3 Feb 2020 16:41:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731446AbgBCQk5 (ORCPT ); Mon, 3 Feb 2020 11:40:57 -0500 Received: from mx2.suse.de ([195.135.220.15]:43800 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730978AbgBCQk4 (ORCPT ); Mon, 3 Feb 2020 11:40:56 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 264A5AFA1; Mon, 3 Feb 2020 16:40:55 +0000 (UTC) From: Daniel Wagner To: linux-block@vger.kernel.org Cc: Keith Busch , "Elliott\, Robert" , Johannes Thumshirn , Logan Gunthorpe , Omar Sandoval , Daniel Wagner Subject: [PATCH blktests v3 2/2] nvme/018: Reword misleading error message Date: Mon, 3 Feb 2020 17:40:49 +0100 Message-Id: <20200203164049.140280-3-dwagner@suse.de> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20200203164049.140280-1-dwagner@suse.de> References: <20200203164049.140280-1-dwagner@suse.de> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org 'nvme read' is expected to fail, though the error message "ERROR: Successfully..." is misleading. Reword the error text to clarify the real intent of the test and what failed. Reported-by: Logan Gunthorpe Signed-off-by: Daniel Wagner Reviewed-by: Logan Gunthorpe Reviewed-by: Keith Busch Reviewed-by: Chaitanya Kulkarni --- tests/nvme/018 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/nvme/018 b/tests/nvme/018 index d0f15db23538..67d89a6f0b24 100755 --- a/tests/nvme/018 +++ b/tests/nvme/018 @@ -3,7 +3,7 @@ # Copyright (C) 2018 Sagi Grimberg # # Test NVMe out of range access on a file backend. Regression test for commit -# 9c891c139894 ("nvmet: check fileio lba range access boundaries"). +# 9c891c139894 ("nvmet: check fileio LBA range access boundaries"). . tests/nvme/rc @@ -44,7 +44,7 @@ test() { bs="$(blockdev --getbsz "/dev/${nvmedev}n1")" nvme read "/dev/${nvmedev}n1" -s "$sectors" -c 0 -z "$bs" &>"$FULL" \ - && echo "ERROR: Successfully read out of device lba range" + && echo "ERROR: nvme read for out of range LBA was not rejected" nvme disconnect -n "${subsys_name}"