[LTP] [PATCH v2] kernel/device-drivers/zram/zram01.sh : don't fill from /dev/zero

Richard Palethorpe rpalethorpe@suse.de
Mon Sep 18 10:24:47 CEST 2023


Hello,

Ian Wienand <iwienand@redhat.com> writes:

> On Thu, Sep 14, 2023 at 08:37:46AM +0100, Richard Palethorpe wrote:
>> We don't want to remove coverage of ZRAM_SAME! A bug in ZRAM_SAME is a
>> potential expoit or data-corruption.
>>
>> If you want to change the test you have to show where ZRAM_SAME is being
>> covered instead.
>
> The patch v2 has always had the comment and intent
>
> +	# To make sure we are actually testing both the same-page and
> +	# compression paths, we first pad with zeros but then fill
> +	# with a compressible series of alternatiting 0x00 and 0xFF.
> +	# This should assure we stress the compression path and can
> +	# calculate the compression level reliabily.
>
> I believe this tests both paths, and in a more rigorous manner than the
> extant test.
>
> -i

I did miss that, however it's actually more rigorous (read "complete")
to test these things seperately. Or even better to test them seperately
then together. Because if only writing out same-page's and a single page
with some meta-data in results in a bug, then your method would not find
that.

You're still swapping one type of coverage for another.

So I'm still in favor of accepting Petr's original patch and of course I
would welcome what you are proposing as additional coverage.

-- 
Thank you,
Richard.


More information about the ltp mailing list