Re: [PATCH tests 3/5] tests: support to skip checking dmesg

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

 



On Tue, 23 May 2023 21:38:58 +0800
Yu Kuai <yukuai1@xxxxxxxxxxxxxxx> wrote:

> From: Yu Kuai <yukuai3@xxxxxxxxxx>
> 
> Prepare to add a regression test for raid10 that require error injection
> to trigger error path, and kernel will complain about io error, checking
> dmesg for error log will make it impossible to pass this test.
> 
> Signed-off-by: Yu Kuai <yukuai3@xxxxxxxxxx>
> ---
>  test | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/test b/test
> index 61d9ee83..b244453b 100755
> --- a/test
> +++ b/test
> @@ -107,8 +107,12 @@ do_test() {
>  		echo -ne "$_script... "
>  		if ( set -ex ; . $_script ) &> $targetdir/log
>  		then
> -			dmesg | grep -iq "error\|call trace\|segfault" &&
> -				die "dmesg prints errors when testing
> $_basename!"
> +			if [ -f "${_script}.inject_error" ]; then
> +				echo "dmesg checking is skipped because test
> inject error"

Following the convention, I would say that it is a "negative test' or just
'negative/md_negative' so errors are expected.

Why not just add some sort of "negative" to the test name?

Anyway:
Acked-by: Mariusz Tkaczyk <mariusz.tkaczyk@xxxxxxxxxxxxxxx>

Thanks,
Mariusz



[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux