]> www.infradead.org Git - users/hch/blktests.git/commitdiff
nvme/018: Ignore error message generated by nvme read
authorLogan Gunthorpe <logang@deltatee.com>
Wed, 17 Jul 2019 17:12:54 +0000 (11:12 -0600)
committerOmar Sandoval <osandov@osandov.com>
Mon, 29 Jul 2019 17:13:07 +0000 (10:13 -0700)
nvme-cli at some point started printing the error message:

  NVMe status: CAP_EXCEEDED: The execution of the command has caused the
capacity of the namespace to be exceeded(0x6081)

This was not accounted for by test 018 and caused it to fail.

This test does not need to test the error message content, it's
only important that a read past the end of the file fails. Therefore,
pipe stderr of nvme-cli to $FULL.

Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
tests/nvme/018

index e29fa92e8153ad49fc600a77b19bdeec059eb85c..f5f5ecdb0989f84f52d494e8a46e1d4d74703e06 100755 (executable)
@@ -44,9 +44,8 @@ test() {
        sectors="$(blockdev --getsz "/dev/${nvmedev}n1")"
        bs="$(blockdev --getbsz "/dev/${nvmedev}n1")"
 
-       if nvme read "/dev/${nvmedev}n1" -s "$sectors" -c 0 -z "$bs"; then
-               echo "ERROR: Successfully read out of device lba range"
-       fi
+       nvme read "/dev/${nvmedev}n1" -s "$sectors" -c 0 -z "$bs" 2>"$FULL" \
+               && echo "ERROR: Successfully read out of device lba range"
 
        nvme disconnect -n "${subsys_name}"