Re: [PATCH] block/028: check if T10 verification fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 26, 2019 at 10:39:37AM +0800, Ming Lei wrote:
> 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

This will also catch messages that didn't occur during the test run. Not
a huge deal, but I reworked it to use DMESG_FILTER instead. Thanks!



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux