]> www.infradead.org Git - users/sagi/blktests.git/commitdiff
block/028: check if T10 verification fails
authorMing Lei <ming.lei@redhat.com>
Fri, 26 Apr 2019 02:39:37 +0000 (10:39 +0800)
committerOmar Sandoval <osandov@fb.com>
Mon, 6 May 2019 20:00:28 +0000 (13:00 -0700)
When T10 verification fails, the error code of BLK_STS_PROTECTION
may not be propagated to user space, see mpage_end_io().

So seems the only reliable way for detecting the failure is to
check dmesg.

Cc: Martin K . Petersen <martin.petersen@oracle.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
[Omar: use DMESG_FILTER]
Signed-off-by: Omar Sandoval <osandov@fb.com>
check
tests/block/028

diff --git a/check b/check
index a623892319404ae6c32e8abb2c7e3adc14003e8b..69565de3aebfded5ea57794d397ba6327fce2199 100755 (executable)
--- a/check
+++ b/check
@@ -147,6 +147,7 @@ _check_dmesg() {
             -e "INFO: suspicious RCU usage" \
             -e "INFO: possible circular locking dependency detected" \
             -e "general protection fault:" \
+            -e "blktests failure" \
             "${seqres}.dmesg"
        # shellcheck disable=SC2181
        if [[ $? -eq 0 ]]; then
index 7bee691c0515f750af860e7d53bd171f161bdcb8..5140d941b366b458c34749b7c31b3cd094af7fe6 100755 (executable)
@@ -9,6 +9,7 @@
 . common/scsi_debug
 
 DESCRIPTION="do I/O on scsi_debug with DIF/DIX enabled"
+DMESG_FILTER="sed -r 's/(guard tag error at sector|ref tag error at location)/blktests failure: \\1/'"
 
 requires() {
        _have_scsi_debug