Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp377728ybf; Thu, 27 Feb 2020 23:23:09 -0800 (PST) X-Google-Smtp-Source: APXvYqzrCRjUSaFxvolq5/6wpF3h5HTv/4Zl/6nLR/ce+uNnSCgF9ua26/eShQzBIge3yEEQBg0r X-Received: by 2002:a05:6830:1691:: with SMTP id k17mr2304686otr.282.1582874589015; Thu, 27 Feb 2020 23:23:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582874589; cv=none; d=google.com; s=arc-20160816; b=Tb2z70KOcxnh1NZDTiZfaiTZWtLJlTcOmdV5sSMmd9QS2inh/1ZXOIRy6fydXKMP5v HrQI8FXUUTqQEJo08UT7SpXzJ8EBR/q6Ag3/zAnghwOCu6Aa9r6pNBc0fU5+2jVSqcng iXiyXmlhSxTLg2ZpoR9VtizYGiSd1TZIAGxjeStIQ0FW5E7eA4ezsk+y8aR1godTkyF3 /ie/5BPkvX/D75VjL+42wgNkZxZudeSpzIlNKXBNWhbas9OIZRg1ujmvQGJ2YoqgH9GM QI0A5nP5TbeiLWHoR6nOtzGYQKiYAY0SFymciL5kH/Ld+jdh43w40YeA+EJlYFzaUtk1 AeVQ== 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=s3S+hpLp5sIHa629tQ1zsw+Nl29dkCf3S5rCd+p6od0=; b=0CA6uI6gLmwjPCfS4cooA5wjtvxCxXOHErfac/R23S5Qgv5lEzcuThsaEVc31fbCME kMjixh+MHWvnyODEgcdi+IPZfBguroGs+CNp/fBh6AsTL7qLUTriQMH6nT9xJSGwgPpV aJeQ6ds+UI0Q9WxkUOBf4zqXJsxCUZj6hfZWzX2AgQr0p2SSo6gHIivTNPWMZcOKVoEW KOQhhfrxHA5zQEF51QtI5YmeIjenHyY221YMyxlZdukbyyPpDZ5H/Z02iQ+Yq+GwVn5D ga9UiBawYjuJaBH74rrGo2CQey8YGbAPJpOQci9QBq3085qKR0+KTgxB3xClHx1E05FX Vf4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=DqCPFLqa; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id 8si1341454oix.109.2020.02.27.23.22.54; Thu, 27 Feb 2020 23:23:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=DqCPFLqa; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1726901AbgB1HWp (ORCPT + 99 others); Fri, 28 Feb 2020 02:22:45 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:45900 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726740AbgB1HWp (ORCPT ); Fri, 28 Feb 2020 02:22:45 -0500 Received: by mail-pl1-f196.google.com with SMTP id b22so882909pls.12 for ; Thu, 27 Feb 2020 23:22:43 -0800 (PST) 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=s3S+hpLp5sIHa629tQ1zsw+Nl29dkCf3S5rCd+p6od0=; b=DqCPFLqaEV3M2s53qW4elKNy8mZ/LySa/GTkoXsaZ38GB0BNEZFMAuIuyfxvFtj/fV 1g3uI/JWkqGyNoLF4Jt3NsTHuDB+RMx/j7XseHQMBe/Fo4TDmtC3fAXKshQbQFlO4I6m cfAb+BHfSIpKCiRExZ/REITPXUg8Ahf6KlY7hUZxYCbDUAGHkv2zb27FSz1461MYHIde Wq8p2AhQjWWTUZiXgUSLT2DwWlAOjA4gGIOkWQmdNpR/flJG4LDdvW+y9oOf02bqCy7e u7AnfPxh6Lw4KW1xH4BwHLfqkTQUps9lJ6oIgi+BkaAHfCRgVIu3ZC9L0DtHvm+sZdef AsMg== 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=s3S+hpLp5sIHa629tQ1zsw+Nl29dkCf3S5rCd+p6od0=; b=A0uFDIeWI+iL9KBnEOq/b+FknlTlYzk2jzeHJcIetznzJJ05Zjx9ctCoGX/d1jFFSJ ZzqeKYZhgHMTe2nkiQTmH+0W4Af6tzQxfcM4N76t0HrDwlVDJbUOv3p9sG1/yQl4AAqg RpGQm117FFGfKU3axgfqX8MDybc4vpOUZ7ifqk/yoxtozo+UUkaiDmpH8NFxcNdEQgTf EqsqQeBW1PW+TuqzIj20l2LX+7MqZ+/zDR+zGyCEsi2Gn+e70mXUpMtqkfoS9zGMQhoJ qPk65P1dMTLBAoViZrkKUXbTWvFy9WQdPqM0lJY+rOj6Z2XXOvGt7DEP+8yoIC+BCNRi GyLw== X-Gm-Message-State: APjAAAWQdG1xdusV73aBo01skST/5JDCWEEXlErd19Eyw5xWRepUJyGL t4J/ww6GQeOq4eXqwutVF/8/Li5Nt8qzv/EnKD/XHQ== X-Received: by 2002:a17:902:8ec1:: with SMTP id x1mr2808157plo.325.1582874562327; Thu, 27 Feb 2020 23:22:42 -0800 (PST) MIME-Version: 1.0 References: <20200228012036.15682-1-brendanhiggins@google.com> <20200228012036.15682-2-brendanhiggins@google.com> In-Reply-To: <20200228012036.15682-2-brendanhiggins@google.com> From: Brendan Higgins Date: Thu, 27 Feb 2020 23:22:31 -0800 Message-ID: Subject: Re: [PATCH v3 1/7] vmlinux.lds.h: add linker section for KUnit test suites To: Jeff Dike , Richard Weinberger , Anton Ivanov , Arnd Bergmann , Kees Cook , Shuah Khan , Alan Maguire , Iurii Zaikin , David Gow , Andrew Morton , rppt@linux.ibm.com, Frank Rowand Cc: Greg KH , Stephen Boyd , Logan Gunthorpe , Luis Chamberlain , linux-um , linux-arch@vger.kernel.org, "open list:KERNEL SELFTEST FRAMEWORK" , KUnit Development , Linux Kernel Mailing List , "open list:DOCUMENTATION" 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 Thu, Feb 27, 2020 at 5:20 PM 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 e00f41aa8ec4f..99a866f49cb3d 100644 > --- a/include/asm-generic/vmlinux.lds.h > +++ b/include/asm-generic/vmlinux.lds.h > @@ -856,6 +856,13 @@ > KEEP(*(.con_initcall.init)) \ > __con_initcall_end = .; > > +/* Alignment must be consistent with (kunit_suite *) in include/kunit/test.h */ > +#define KUNIT_TEST_SUITES \ > + . = ALIGN(8); \ After posting this, I saw I had gotten an email from 0day[1]. After some investigation, I discovered that this 8 byte alignment works for x86 64 bit fine, but only *sometimes* for 32 bit. 4 byte alignment seems to work in all cases (so far). I am not sure why we went with such a large alignment in hindsight. In any case, I should have a fixed revision out pretty soon. > + __kunit_suites_start = .; \ > + KEEP(*(.kunit_test_suites)) \ > + __kunit_suites_end = .; > + > #ifdef CONFIG_BLK_DEV_INITRD > #define INIT_RAM_FS \ > . = ALIGN(4); \ > @@ -1024,6 +1031,7 @@ > INIT_CALLS \ > CON_INITCALL \ > INIT_RAM_FS \ > + KUNIT_TEST_SUITES \ > } > > #define BSS_SECTION(sbss_align, bss_align, stop_align) \ > -- [1] https://lists.01.org/hyperkitty/list/lkp@lists.01.org/thread/4I4UW4OAT63ETMIEUJQTOF3BFTMO6ROD/