From patchwork Wed Jan 29 15:46:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 11356419 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 20D82112B for ; Wed, 29 Jan 2020 15:46:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 08ED92070E for ; Wed, 29 Jan 2020 15:46:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726708AbgA2PqZ (ORCPT ); Wed, 29 Jan 2020 10:46:25 -0500 Received: from mx2.suse.de ([195.135.220.15]:37320 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726564AbgA2PqZ (ORCPT ); Wed, 29 Jan 2020 10:46:25 -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 C3D8EAD31; Wed, 29 Jan 2020 15:46:23 +0000 (UTC) From: Daniel Wagner To: linux-block@vger.kernel.org Cc: Elliott@suse.de, Robert , Johannes Thumshirn , Logan Gunthorpe , Omar Sandoval , Daniel Wagner Subject: [PATCH blktests v2 1/2] nvme/018: Ignore message generated by nvme read Date: Wed, 29 Jan 2020 16:46:18 +0100 Message-Id: <20200129154619.103332-2-dwagner@suse.de> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20200129154619.103332-1-dwagner@suse.de> References: <20200129154619.103332-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: Chaitanya Kulkarni@wdc.com --- 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 Wed Jan 29 15:46:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 11356421 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 E4679139A for ; Wed, 29 Jan 2020 15:46:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CB9642070E for ; Wed, 29 Jan 2020 15:46:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726564AbgA2Pq0 (ORCPT ); Wed, 29 Jan 2020 10:46:26 -0500 Received: from mx2.suse.de ([195.135.220.15]:37334 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726672AbgA2Pq0 (ORCPT ); Wed, 29 Jan 2020 10:46:26 -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 A1500AD3C; Wed, 29 Jan 2020 15:46:24 +0000 (UTC) From: Daniel Wagner To: linux-block@vger.kernel.org Cc: Elliott@suse.de, Robert , Johannes Thumshirn , Logan Gunthorpe , Omar Sandoval , Daniel Wagner Subject: [PATCH blktests v2 2/2] nmve/018: Reword misleading error message Date: Wed, 29 Jan 2020 16:46:19 +0100 Message-Id: <20200129154619.103332-3-dwagner@suse.de> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20200129154619.103332-1-dwagner@suse.de> References: <20200129154619.103332-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: Chaitanya Kulkarni@wdc.com --- 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}"