[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
sqaush4 tests (was: Re: [PATCH] squash4: fix handling of fragments and s
From: |
Andrei Borzenkov |
Subject: |
sqaush4 tests (was: Re: [PATCH] squash4: fix handling of fragments and sparse files) |
Date: |
Sat, 25 Feb 2017 18:26:29 +0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 |
25.02.2017 18:23, Andrei Borzenkov пишет:
> 24.02.2017 19:19, Andrei Borzenkov пишет:
>>> How do you create those files reliably? Feel free to add any files to
>>> grub-fs-tester. Feel free to commit without tests, we can add tests later.
>>>
>>
>> I would say, we need to generally create less "nice" test files
>>
>> 1. Generate test files that are not exact multiple of filesystem block.
>> This would cover squash tail packing and may uncover similar issues in
>> other drivers as well.
>>
>> 2. Generate sparse files by seeking beyond end of file. We already had
>> similar problem with indirect ext* blocks that was not caught by tests.
>> We should produce holes both for direct and indirect blocks (we may pick
>> common offset or make it fs-specific if necessary).
>>
>> 3. We need to produce really small files also to test inlining. Again we
>> can pick common size or make it fs-specific.
>>
>> Assuming we generate files as described, for squash4 just call it with
>> -always-use-fragments to force tail packing. -nopad may be interesting
>> as well to stress our driver even more.
>>
>>
>
> Attached patch implements 1 + -always-use-fragments. It reliably causes
> squash4 test to fail without my patch. I can change BLOCKCNT for squash4
> only, but I think it makes sense to do globally.
>
> sparse files need some tweaking in garbage-gen, will look into it.
>
Sorry, wrong patch attached.
squash4-tests.patch
Description: Text Data