From: Tzung-Bi Shih <tzungbi@kernel.org>
To: Philipp Zabel <p.zabel@pengutronix.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] reset: Add KUnit test cases
Date: Thu, 5 Nov 2026 00:04:43 +0800 [thread overview]
Message-ID: <autXm2MrAyFAAM1i@tzungbi-laptop> (raw)
In-Reply-To: <48d7459fc34adac1ac614e79d9930902345759d2.camel@pengutronix.de>
On Tue, Nov 03, 2026 at 11:21:53AM +0100, Philipp Zabel wrote:
> On Mo, 2026-11-02 at 23:52 +0800, Tzung-Bi Shih wrote:
> > + /* supplier0 unregisters. */
> > + complete(&ctx[0].enter);
> > + ret = read_poll_timeout(reset_control_status, val, val == -ENODEV,
> > + 1000, 100000, false, rtc->rstc);
> > + if (ret) {
> > + for (i = 2; i >= 0; --i)
> > + kthread_stop_put(ctx[i].thread);
> > + KUNIT_ASSERT_EQ(test, ret, 0);
> > + }
> > + /* supplier0 can't exit. It's waiting for all consumers. */
>
> This comment looks like an untested assertion. For all we know,
> reset_controller_unregister() may have already returned by now.
>
> How about signalling a completion "ctx->exited" after
> reset_controller_unregister() returns, calling
> wait_for_completion_timeout() here, and asserting it times out?
Fixed in v3[1].
[1] https://lore.kernel.org/all/20261104160123.6784-1-tzungbi@kernel.org
prev parent reply other threads:[~2026-11-04 16:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-02 15:52 Tzung-Bi Shih
2026-11-03 10:21 ` Philipp Zabel
2026-11-04 16:04 ` Tzung-Bi Shih [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=autXm2MrAyFAAM1i@tzungbi-laptop \
--to=tzungbi@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=p.zabel@pengutronix.de \
/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
all inboxes | Powered by JetHome®