From: David Gow <davidgow@google.com>
To: Rae Moar <rmoar@google.com>
Cc: shuah@kernel.org, dlatypov@google.com, brendan.higgins@linux.dev,
sadiyakazi@google.com, keescook@chromium.org, arnd@arndb.de,
linux-kselftest@vger.kernel.org, linux-arch@vger.kernel.org,
kunit-dev@googlegroups.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/6] kunit: move KUNIT_TABLE out of INIT_DATA
Date: Sat, 9 Dec 2023 15:48:17 +0800 [thread overview]
Message-ID: <CABVgOS=5Y_CrTZ4hs57UGdR_p1aK2+1w2-aZ9EVELsbRdVvqTg@mail.gmail.com> (raw)
In-Reply-To: <20231204221932.1465004-1-rmoar@google.com>
[-- Attachment #1: Type: text/plain, Size: 2244 bytes --]
On Tue, 5 Dec 2023 at 06:19, Rae Moar <rmoar@google.com> wrote:
>
> Alter the linker section of KUNIT_TABLE to move it out of INIT_DATA and
> into DATA_DATA.
>
> Data for KUnit tests does not need to be in the init section.
>
> In order to run tests again after boot the KUnit data cannot be labeled as
> init data as the kernel could write over it.
>
> Add a KUNIT_INIT_TABLE in the next patch for KUnit tests that test init
> data/functions.
>
> Signed-off-by: Rae Moar <rmoar@google.com>
> ---
I think this actually fixes a potential bug, as we loop through the
list of suites after init has ended in the debugfs logic.
So maybe this is:
Fixes: 90a025a859a3 ("vmlinux.lds.h: add linker section for KUnit test suites")
Regardless, I'd love to get this in, even if we don't manage to get
the rest of the series in soon.
Reviewed-by: David Gow <davidgow@google.com>
Cheers,
-- David
> include/asm-generic/vmlinux.lds.h | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
> index bae0fe4d499b..1107905d37fc 100644
> --- a/include/asm-generic/vmlinux.lds.h
> +++ b/include/asm-generic/vmlinux.lds.h
> @@ -370,7 +370,8 @@
> BRANCH_PROFILE() \
> TRACE_PRINTKS() \
> BPF_RAW_TP() \
> - TRACEPOINT_STR()
> + TRACEPOINT_STR() \
> + KUNIT_TABLE()
>
> /*
> * Data section helpers
> @@ -699,8 +700,7 @@
> THERMAL_TABLE(governor) \
> EARLYCON_TABLE() \
> LSM_TABLE() \
> - EARLY_LSM_TABLE() \
> - KUNIT_TABLE()
> + EARLY_LSM_TABLE()
>
> #define INIT_TEXT \
> *(.init.text .init.text.*) \
>
> base-commit: b85ea95d086471afb4ad062012a4d73cd328fa86
> --
> 2.43.0.rc2.451.g8631bc7472-goog
>
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4003 bytes --]
next prev parent reply other threads:[~2023-12-09 7:48 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-04 22:19 [PATCH v3 1/6] kunit: move KUNIT_TABLE out of INIT_DATA Rae Moar
2023-12-04 22:19 ` [PATCH v3 2/6] kunit: add KUNIT_INIT_TABLE to init linker section Rae Moar
2023-12-09 7:57 ` David Gow
2023-12-04 22:19 ` [PATCH v3 3/6] kunit: add example suite to test init suites Rae Moar
2023-12-09 7:57 ` David Gow
2023-12-04 22:19 ` [PATCH v3 4/6] kunit: add is_init test attribute Rae Moar
2023-12-09 7:57 ` David Gow
2023-12-11 22:24 ` Rae Moar
2023-12-04 22:19 ` [PATCH v3 5/6] kunit: add ability to run tests after boot using debugfs Rae Moar
2023-12-09 7:57 ` David Gow
2023-12-04 22:19 ` [PATCH v3 6/6] Documentation: Add debugfs docs with run after boot Rae Moar
2023-12-09 7:57 ` David Gow
2023-12-11 22:16 ` Rae Moar
2023-12-09 7:48 ` David Gow [this message]
2023-12-11 22:08 ` [PATCH v3 1/6] kunit: move KUNIT_TABLE out of INIT_DATA Rae Moar
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='CABVgOS=5Y_CrTZ4hs57UGdR_p1aK2+1w2-aZ9EVELsbRdVvqTg@mail.gmail.com' \
--to=davidgow@google.com \
--cc=arnd@arndb.de \
--cc=brendan.higgins@linux.dev \
--cc=dlatypov@google.com \
--cc=keescook@chromium.org \
--cc=kunit-dev@googlegroups.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=rmoar@google.com \
--cc=sadiyakazi@google.com \
--cc=shuah@kernel.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;
as well as URLs for NNTP newsgroup(s).