From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 385E8C433E0 for ; Wed, 8 Jul 2020 04:33:16 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E38F920720 for ; Wed, 8 Jul 2020 04:33:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E38F920720 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4B1mdQ00sbzDr2w for ; Wed, 8 Jul 2020 14:33:14 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=209.85.210.194; helo=mail-pf1-f194.google.com; envelope-from=mcgrof@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=fail (p=none dis=none) header.from=kernel.org Received: from mail-pf1-f194.google.com (mail-pf1-f194.google.com [209.85.210.194]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4B1mbW0z9PzDqw0 for ; Wed, 8 Jul 2020 14:31:32 +1000 (AEST) Received: by mail-pf1-f194.google.com with SMTP id z3so10109501pfn.12 for ; Tue, 07 Jul 2020 21:31:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=w74eNERLG2pgyjUdSRcYW9SUoyc7gG8Z+LPaMqm+zH4=; b=nq2uutGielqEygv+Vpjv98RtcEBi+psOwFAzQaUcWpJBsIaFPNhAtVHXPIGG7rAASN OkZuRM47bzJhkB3kBUDXkOSOSLcN6z1/Bu8MKI1Cs0L3BSDPqsNkLJ5fX7p7VXuFG1my 83ScxPJI5O+N34O/lXcoSF4bZQ2O8LVm2xadimjayjdIHPGqRj/MmDMCi0LlQSV/7Jwg YronBYyoOmmZ0ePYzgBy3NSDq5Ag8rvYejr8WT26Oh2i1l+uIgZeUDUVf2EL670kYPPo 3F/86xSHc493ODFhG9lx/qtTmVqKMnqsrowzSzci8qBv+95qGC4Iv4adV8gHJEaG0Lxt SXqA== X-Gm-Message-State: AOAM530UkSlFD8iNZXnKC6bAAvrLynMvo/ZjjtSRVmW4q8j8jOwR7GlU d8PeULjKtJC3TqXvx03iX2I= X-Google-Smtp-Source: ABdhPJxHZU8n57bHyUA87/h7IOAVFo14RjremkjbHa0piNVeEl4DjqKtxGu5JTtc4Tf00fVU/dHDDQ== X-Received: by 2002:a05:6a00:2c1:: with SMTP id b1mr40074651pft.159.1594182690346; Tue, 07 Jul 2020 21:31:30 -0700 (PDT) Received: from 42.do-not-panic.com (42.do-not-panic.com. [157.230.128.187]) by smtp.gmail.com with ESMTPSA id w9sm3745302pja.39.2020.07.07.21.31.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jul 2020 21:31:29 -0700 (PDT) Received: by 42.do-not-panic.com (Postfix, from userid 1000) id A30C1400DB; Wed, 8 Jul 2020 04:31:28 +0000 (UTC) Date: Wed, 8 Jul 2020 04:31:28 +0000 From: Luis Chamberlain To: Brendan Higgins 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: X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "open list:DOCUMENTATION" , catalin.marinas@arm.com, jcmvbkbc@gmail.com, will@kernel.org, paulus@samba.org, "open list:KERNEL SELFTEST FRAMEWORK" , Frank Rowand , Anton Ivanov , linux-arch@vger.kernel.org, Richard Weinberger , rppt@linux.ibm.com, Iurii Zaikin , linux-xtensa@linux-xtensa.org, Kees Cook , Arnd Bergmann , Jeff Dike , linux-um , linuxppc-dev@lists.ozlabs.org, David Gow , Shuah Khan , Linux ARM , KUnit Development , chris@zankel.net, monstr@monstr.eu, Stephen Boyd , Greg KH , Linux Kernel Mailing List , Logan Gunthorpe , Andrew Morton , Alan Maguire Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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