From: Javier Martinez Canillas <javierm@redhat.com>
To: Marco Pagani <marpagan@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: Marco Pagani <marpagan@redhat.com>,
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 12:15:28 +0100 [thread overview]
Message-ID: <878r6icenj.fsf@minerva.mail-host-address-is-not-set> (raw)
In-Reply-To: <20231128101627.65399-1-marpagan@redhat.com>
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;
The patch makes sense to me though and agree that is a better approach.
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
next prev parent reply other threads:[~2023-11-28 11:15 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 [this message]
2023-11-28 18:40 ` Marco Pagani
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=878r6icenj.fsf@minerva.mail-host-address-is-not-set \
--to=javierm@redhat.com \
--cc=brendan.higgins@linux.dev \
--cc=davidgow@google.com \
--cc=kunit-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=marpagan@redhat.com \
--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®