Re: [PATCH] xfstests: btrfs/015 regression test for prealloc with balance

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

 



> +nr_csum_no_found=$(dmesg | grep -c "no csum found")
> +nr_csum_failed=$(dmesg | grep -c "csum failed")
> +
> +_check_csum_error()
> +{
> +	new_csum_no_found=$(dmesg | grep -c "no csum found")
> +	new_csum_failed=$(dmesg | grep -c "csum failed")
> +
> +	if [ $nr_csum_no_found -eq $new_csum_no_found -a \
> +	     $nr_csum_failed -eq $new_csum_failed ]; then
> +		return 0
> +	fi
> +	return 1
> +}

> +# This sucks but unfortunately it is the only way to be sure something didn't go
> +# wrong.
> +_check_csum_error || _fail "csum detected, please check dmesg"

In the future you could make them trace events and catch them for a
given invocation of a command with perf.

- z
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux