From: Richard Palethorpe <rpalethorpe@suse.de>
To: Martin Doucha <mdoucha@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] syscalls: Check for leftover partition info in loopdev ioctl tests
Date: Mon, 10 Oct 2022 11:29:17 +0100 [thread overview]
Message-ID: <87r0zg9d23.fsf@suse.de> (raw)
In-Reply-To: <c7b54e0f-641d-9188-fd29-4b1b35bf27a7@suse.cz>
Hello,
Martin Doucha <mdoucha@suse.cz> writes:
> On 25. 04. 22 17:21, Cyril Hrubis wrote:
>> Hi!
>>> Due to a kernel bug, successful ioctl09 and ioctl_loop01 test runs
>>> sometimes leave behind stale partition info on the loop device they used,
>>> which then causes mkfs.vfat to fail in later tests. Check that partition
>>> info was properly removed in cleanup.
>>>
>>> Signed-off-by: Martin Doucha <mdoucha@suse.cz>
>>> ---
>>>
>>> This does not fix the mkfs.vfat failures but it makes the true cause visible.
>>> We could add a workaround for the mkfs.vfat failures by simply initializing
>>> the loop device with the LO_FLAGS_PARTSCAN flag by default, or at least when
>>> stale partition info is found by tst_find_free_loopdev().
>>
>> I guess that it would be cleaner to put the stale partition info
>> detection into the loop library. We can print a warning there and then
>> do the workaround.
>
> The workaround needs to be added into tst_attach_device(). It doesn't
> make sense to add it to test cleanup, in part because
> tst_detach_device() can and occasionally does fail on timeout.
>
> On the other hand, we need a cleanup check in ioctl tests which create
> partitions on loop devices, otherwise they'll leave garbage behind silently.
>
>> Also do we want to add a regression test for the stale partition info?
>> Should be easy enough. Or at least add the hash of the kernel commit
>> that fixed it to the ioctl tests?
>
> I haven't investigated deep enough to find out how to reliably trigger
> the bug or which patch fixed it (if any). Regression test would be nice
> but it's not a trivial task at the moment.
I'm trying to cleanup patchwork and I'm not sure what the resolution to
this was?
If this has not been resolved elsewhere and nobody wants to work on this
further then I would be in favor of merging the patch. The information
is then available for others to investigate.
--
Thank you,
Richard.
--
Mailing list info: https://lists.linux.it/listinfo/ltp
prev parent reply other threads:[~2022-10-10 10:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-06 11:08 [LTP] [PATCH] syscalls: Check for leftover partition info in loopdev ioctl tests Martin Doucha
2022-04-19 7:09 ` Petr Vorel
2022-04-25 15:21 ` Cyril Hrubis
2022-04-26 16:14 ` Martin Doucha
2022-10-10 10:29 ` Richard Palethorpe [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r0zg9d23.fsf@suse.de \
--to=rpalethorpe@suse.de \
--cc=ltp@lists.linux.it \
--cc=mdoucha@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox