From: Marco Pagani <marpagan@redhat.com>
To: Javier Martinez Canillas <javierm@redhat.com>,
Brendan Higgins <brendan.higgins@linux.dev>,
David Gow <davidgow@google.com>, Rae Moar <rmoar@google.com>,
Jinjie Ruan <ruanjinjie@huawei.com>,
Shuah Khan <skhan@linuxfoundation.org>
Cc: linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] kunit: run test suites only after module initialization completes
Date: Tue, 28 Nov 2023 19:40:49 +0100 [thread overview]
Message-ID: <d6e92498-1784-48f5-904c-8bd37770c206@redhat.com> (raw)
In-Reply-To: <878r6icenj.fsf@minerva.mail-host-address-is-not-set>
On 28/11/23 12:15, Javier Martinez Canillas wrote:
> Marco Pagani <marpagan@redhat.com> writes:
>
> Hello Marco,
>
> [...]
>
>> @@ -737,12 +738,14 @@ static void kunit_module_exit(struct module *mod)
>> };
>> const char *action = kunit_action();
>>
>> + if (!suite_set.start || !virt_addr_valid(suite_set.start))
>> + return;
>> +
>
> I would add a comment here explaining why this condition is checked and
> what it means. Maybe something like the following ?
>
> + /*
> + * Check if the kunit test suite start address is a virtual
> + * address or a direct mapping address. This is used as an
> + * indication of whether the kunit_filter_suites() was used
> + * to filter the kunit test suite or not.
> + *
> + * If is not a virtual address, then this means that the
> + * kunit_module_init() function was not called and the kunit
> + * suite was not filtered. Let's just bail out in that case.
> + */
> + if (!suite_set.start || !virt_addr_valid(suite_set.start))
> + return;
Good point. I'll add a comment in v3.
>
> The patch makes sense to me though and agree that is a better approach.
>
> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
>
Thanks,
Marco
next prev parent reply other threads:[~2023-11-28 18:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-28 10:16 Marco Pagani
2023-11-28 11:15 ` Javier Martinez Canillas
2023-11-28 18:40 ` Marco Pagani [this message]
2023-12-06 13:09 ` Richard Fitzgerald
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=d6e92498-1784-48f5-904c-8bd37770c206@redhat.com \
--to=marpagan@redhat.com \
--cc=brendan.higgins@linux.dev \
--cc=davidgow@google.com \
--cc=javierm@redhat.com \
--cc=kunit-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=rmoar@google.com \
--cc=ruanjinjie@huawei.com \
--cc=skhan@linuxfoundation.org \
/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®