From mboxrd@z Thu Jan 1 00:00:00 1970 From: Luis Chamberlain Subject: Re: [PATCH v5 01/12] vmlinux.lds.h: add linker section for KUnit test suites Date: Wed, 8 Jul 2020 04:31:28 +0000 Message-ID: <20200708043128.GY4332@42.do-not-panic.com> References: <20200626210917.358969-1-brendanhiggins@google.com> <20200626210917.358969-2-brendanhiggins@google.com> <202006261416.F4EAAE47E3@keescook> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mail-pg1-f196.google.com ([209.85.215.196]:41078 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726185AbgGHEbb (ORCPT ); Wed, 8 Jul 2020 00:31:31 -0400 Content-Disposition: inline In-Reply-To: Sender: linux-arch-owner@vger.kernel.org List-ID: To: Brendan Higgins Cc: Kees Cook , Jeff Dike , Richard Weinberger , Anton Ivanov , Arnd Bergmann , Shuah Khan , Alan Maguire , Iurii Zaikin , David Gow , Andrew Morton , rppt@linux.ibm.com, Frank Rowand , catalin.marinas@arm.com, will@kernel.org, monstr@monstr.eu, Michael Ellerman , Benjamin Herrenschmidt , paulus@samba.org, chris@zankel.net, jcmvbkbc@gmail.com, Greg KH , Stephen Boyd , Logan Gunthorpe linux-um
  • On Fri, Jun 26, 2020 at 02:22:11PM -0700, Brendan Higgins wrote: > On Fri, Jun 26, 2020 at 2:20 PM Kees Cook wrote: > > > > On Fri, Jun 26, 2020 at 02:09:06PM -0700, Brendan Higgins wrote: > > > Add a linker section where KUnit can put references to its test suites. > > > This patch is the first step in transitioning to dispatching all KUnit > > > tests from a centralized executor rather than having each as its own > > > separate late_initcall. > > > > > > Co-developed-by: Iurii Zaikin > > > Signed-off-by: Iurii Zaikin > > > Signed-off-by: Brendan Higgins > > > Reviewed-by: Stephen Boyd > > > --- > > > include/asm-generic/vmlinux.lds.h | 8 ++++++++ > > > 1 file changed, 8 insertions(+) > > > > > > diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h > > > index db600ef218d7d..4f9b036fc9616 100644 > > > --- a/include/asm-generic/vmlinux.lds.h > > > +++ b/include/asm-generic/vmlinux.lds.h > > > @@ -881,6 +881,13 @@ > > > KEEP(*(.con_initcall.init)) \ > > > __con_initcall_end = .; > > > > > > +/* Alignment must be consistent with (kunit_suite *) in include/kunit/test.h */ > > > > Nit on naming: > > > > > +#define KUNIT_TEST_SUITES \ > > > > I would call this KUNIT_TABLE to maintain the same names as other things > > of this nature. > > > > > + . = ALIGN(8); \ > > > + __kunit_suites_start = .; \ > > > + KEEP(*(.kunit_test_suites)) \ > > > + __kunit_suites_end = .; > > > + > > > #ifdef CONFIG_BLK_DEV_INITRD > > > #define INIT_RAM_FS \ > > > . = ALIGN(4); \ > > > @@ -1056,6 +1063,7 @@ > > > INIT_CALLS \ > > > CON_INITCALL \ > > > INIT_RAM_FS \ > > > + KUNIT_TEST_SUITES \ > > > } > > > > Nack: this must be in INIT_DATA, not in INIT_DATA_SECTION. Not all > > architectures use the INIT_DATA_SECTION macro (e.g. arm64), but everything > > uses INIT_DATA. > > Oh, maybe that would eliminate the need for the other linkerscript > patches? That would be nice. Curious, did changing it as Kees suggest fix it for m68k? Luis From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-f196.google.com ([209.85.215.196]:41078 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726185AbgGHEbb (ORCPT ); Wed, 8 Jul 2020 00:31:31 -0400 Date: Wed, 8 Jul 2020 04:31:28 +0000 From: Luis Chamberlain Subject: Re: [PATCH v5 01/12] vmlinux.lds.h: add linker section for KUnit test suites Message-ID: <20200708043128.GY4332@42.do-not-panic.com> References: <20200626210917.358969-1-brendanhiggins@google.com> <20200626210917.358969-2-brendanhiggins@google.com> <202006261416.F4EAAE47E3@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-arch-owner@vger.kernel.org List-ID: To: Brendan Higgins Cc: Kees Cook , Jeff Dike , Richard Weinberger , Anton Ivanov , Arnd Bergmann , Shuah Khan , Alan Maguire , Iurii Zaikin , David Gow , Andrew Morton , rppt@linux.ibm.com, Frank Rowand , catalin.marinas@arm.com, will@kernel.org, monstr@monstr.eu, Michael Ellerman , Benjamin Herrenschmidt , paulus@samba.org, chris@zankel.net, jcmvbkbc@gmail.com, Greg KH , Stephen Boyd , Logan Gunthorpe , linux-um , linux-arch@vger.kernel.org, "open list:KERNEL SELFTEST FRAMEWORK" , KUnit Development , Linux Kernel Mailing List , "open list:DOCUMENTATION" , Linux ARM , linuxppc-dev@lists.ozlabs.org, linux-xtensa@linux-xtensa.org Message-ID: <20200708043128.qPsoEPohRqZl1uXx9qIFGbZGnJTtf5v8hBCILB6zf7M@z> On Fri, Jun 26, 2020 at 02:22:11PM -0700, Brendan Higgins wrote: > On Fri, Jun 26, 2020 at 2:20 PM Kees Cook wrote: > > > > On Fri, Jun 26, 2020 at 02:09:06PM -0700, Brendan Higgins wrote: > > > Add a linker section where KUnit can put references to its test suites. > > > This patch is the first step in transitioning to dispatching all KUnit > > > tests from a centralized executor rather than having each as its own > > > separate late_initcall. > > > > > > Co-developed-by: Iurii Zaikin > > > Signed-off-by: Iurii Zaikin > > > Signed-off-by: Brendan Higgins > > > Reviewed-by: Stephen Boyd > > > --- > > > include/asm-generic/vmlinux.lds.h | 8 ++++++++ > > > 1 file changed, 8 insertions(+) > > > > > > diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h > > > index db600ef218d7d..4f9b036fc9616 100644 > > > --- a/include/asm-generic/vmlinux.lds.h > > > +++ b/include/asm-generic/vmlinux.lds.h > > > @@ -881,6 +881,13 @@ > > > KEEP(*(.con_initcall.init)) \ > > > __con_initcall_end = .; > > > > > > +/* Alignment must be consistent with (kunit_suite *) in include/kunit/test.h */ > > > > Nit on naming: > > > > > +#define KUNIT_TEST_SUITES \ > > > > I would call this KUNIT_TABLE to maintain the same names as other things > > of this nature. > > > > > + . = ALIGN(8); \ > > > + __kunit_suites_start = .; \ > > > + KEEP(*(.kunit_test_suites)) \ > > > + __kunit_suites_end = .; > > > + > > > #ifdef CONFIG_BLK_DEV_INITRD > > > #define INIT_RAM_FS \ > > > . = ALIGN(4); \ > > > @@ -1056,6 +1063,7 @@ > > > INIT_CALLS \ > > > CON_INITCALL \ > > > INIT_RAM_FS \ > > > + KUNIT_TEST_SUITES \ > > > } > > > > Nack: this must be in INIT_DATA, not in INIT_DATA_SECTION. Not all > > architectures use the INIT_DATA_SECTION macro (e.g. arm64), but everything > > uses INIT_DATA. > > Oh, maybe that would eliminate the need for the other linkerscript > patches? That would be nice. Curious, did changing it as Kees suggest fix it for m68k? Luis