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@xxxxxxxxxx> Signed-off-by: Ming Lei <ming.lei@xxxxxxxxxx> --- tests/block/028 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/block/028 b/tests/block/028 index 7bee691c0515..a0ab9ff208db 100755 --- a/tests/block/028 +++ b/tests/block/028 @@ -38,6 +38,14 @@ test() { test_pi "$dix" "$dif" echo "Test(dix:$dix dif:$dif) complete" done + if dmesg | grep -q "guard tag error at sector"; then + echo "Fail" + break + fi + if dmesg | grep -q "ref tag error at location"; then + echo "Fail" + break + fi done rm -f "$FULL" -- 2.9.5