Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp598982pxa; Tue, 4 Aug 2020 13:06:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyNx5ulkL0EZqAEbCOGNIT9ZyyuMnbAIOE224uVa56iwJG5XeyFrtrZGHYd7GhoXhslIjgg X-Received: by 2002:a17:906:f8d9:: with SMTP id lh25mr24120863ejb.458.1596571593088; Tue, 04 Aug 2020 13:06:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596571593; cv=none; d=google.com; s=arc-20160816; b=LWBzrUclC32/1Zth5CCaTrat7tMxF5FEHU36PBPGdx+woLnacPLGSkUQg6fqhR4Rin cp8DQx967y0I5dED8tYd+h4CfCXZ8RW2VqRmIUp9sBFTYFVn2nxKOomrS2/o1kiLk27g WgVHUhGy59MVhNoxJBNfGPeVzu3VSMVhiOQu/FuOyZE4Q7bJh4v2oYYiUiaT+ScArE09 NFIXALYxbn0K66oBqkP4Y8/K9xFBEtor0tP3OfywvfugJl00r4W51s2ttRpJfOhzb9zs 5GFPrn/7LABHWVY/DcBqVVjcoySdtng8W8Dq/uVz7Lufc16QeSC9FuztE+Um9pZCgctB TcOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=1tyCti51MVo3/kuT1rPkqCk0xB52TNyjHHa6DSwsUNE=; b=S6/NKv6/5PWmMsqApZD775RAlSg2E+TBD/TYVSPPcYPeJ5ANFX12rCJegu94DWTGCf yVMY9tQ3f3apgGkAMdV+xUED2HPBZt5X55jcu4b5POsYMBa9e3dyAVvywdWPFvABllq0 h4ErlO2FOUCY44U/4OtnbUMEPmZsVFFsa8N+1ChkbGAnV4iMTCXT0orCuX+8mg8B8OMX SUPcznRJA+ZYkXCxtaukSL/VgDkQPsZiMDGU8mz6AgMhAVwuPH2ytQ6fCG0iDBMUG3vX R+VLjUWfZiExBGVgsOwByI6yFvP34WC6LKCrapjjEmKX+S81tyDbta1oCnJI0JO/Wvax OKXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="BOdgCj/x"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c6si13069635ejr.345.2020.08.04.13.06.10; Tue, 04 Aug 2020 13:06:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="BOdgCj/x"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726859AbgHDUDs (ORCPT + 99 others); Tue, 4 Aug 2020 16:03:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726644AbgHDUDr (ORCPT ); Tue, 4 Aug 2020 16:03:47 -0400 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AABF2C06179E for ; Tue, 4 Aug 2020 13:03:47 -0700 (PDT) Received: by mail-pg1-x544.google.com with SMTP id z5so23046049pgb.6 for ; Tue, 04 Aug 2020 13:03:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1tyCti51MVo3/kuT1rPkqCk0xB52TNyjHHa6DSwsUNE=; b=BOdgCj/xpXMzUyWMGEdpzY6ZsQLT6U1zlPfAPITO0x8Q+IA84yaBeEIndq7bl+FiEy rVofD3aSCUoec+wrpHeiogm589AaN3VpZbkBQE7NZqI5FvytwjB1Yp60483xaA3xgLMO UBDpAP3zTIiNlOsPu1N3gKftDScSUUWDQ9W6XxffoSYkTrJT2kheOv9byV5yy13NmLug UQheG5KFf+dFlxyd3rFo+P3YzwT2ZhDOtcHr1ctJzHc/7NQO06/W4jyKBRbGazVz/3I3 IJiBkJKghWCr6TKL1uBvZlfxIjBG91lq+/qNadwzNsbGIKychykGD6Lcoc2mCDM5fqhc bcYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1tyCti51MVo3/kuT1rPkqCk0xB52TNyjHHa6DSwsUNE=; b=iIVerbuIaBf4TJwAdWQsR6UAqyIfvu8iIPyHzw5oaKAnopJ6cP3g5dXbVUaTFp3HnM XZz5vQIv/XI6K06ZBhWMcz9jnUOzt7DSKdg9eGfZxWyj1qBKqX5PFC2nlpzj4MGJ41Sv F2XQcGyvthndL9a+T+b2zNoJd+WyBxW2MNTIBHkC6vw4WIS7lkb8KRsLMSLmYH6ICf3Z zl6rA/fsk0+9TrLgDf/bC/mWzSneJ4m3+wtpw0YfAmiF3daOS3B6AwEEOPtxWkwW1eId dPV6hEQzuDPxt9KCFNEWXJDldjRdhkWTpweX3DRej3Sykyfcr9SXxmFuB/+faiSyUlTM WYiA== X-Gm-Message-State: AOAM530a4U0aGEuWyKAw2iZqoRMLweRhUXzR284JPGICy1U9uvuVptWg A9Nq8ZlEiIttTpoggkyfsAhqjV/uKC18gmvAs+eAkA== X-Received: by 2002:aa7:9e45:: with SMTP id z5mr54937pfq.166.1596571426459; Tue, 04 Aug 2020 13:03:46 -0700 (PDT) MIME-Version: 1.0 References: <20200626210917.358969-1-brendanhiggins@google.com> <20200626210917.358969-2-brendanhiggins@google.com> <202006261416.F4EAAE47E3@keescook> <20200708043128.GY4332@42.do-not-panic.com> In-Reply-To: <20200708043128.GY4332@42.do-not-panic.com> From: Brendan Higgins Date: Tue, 4 Aug 2020 13:03:35 -0700 Message-ID: Subject: Re: [PATCH v5 01/12] vmlinux.lds.h: add linker section for KUnit test suites To: Luis Chamberlain 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, Michal Simek , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Chris Zankel , 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 7, 2020 at 9:31 PM Luis Chamberlain wrote: > > 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. Sorry for the delayed response. I got pulled into some other things. > Curious, did changing it as Kees suggest fix it for m68k? It did! There are still some architectures I cannot test due to a lack of GCC or QEMU support, but it seems to work on everything else now.