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=-8.4 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no 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 13574C33CB2 for ; Tue, 28 Jan 2020 19:54:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DCE8124692 for ; Tue, 28 Jan 2020 19:54:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="V3FY0oe6" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726467AbgA1TyB (ORCPT ); Tue, 28 Jan 2020 14:54:01 -0500 Received: from mail-pj1-f68.google.com ([209.85.216.68]:51630 "EHLO mail-pj1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726192AbgA1TyA (ORCPT ); Tue, 28 Jan 2020 14:54:00 -0500 Received: by mail-pj1-f68.google.com with SMTP id fa20so1532464pjb.1 for ; Tue, 28 Jan 2020 11:54:00 -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=V/f5zRc++UUEl2oF7a/v6c3iW8+A1FaOUHgeSr1YnVs=; b=V3FY0oe6cawkXOzECXYXusqM1m9RESvFiJ318Zd1jyxpfbejY+CSUTAG0yDVae+gh7 pYc3vMUzJ+h98Raq2Mf3MaJlkPS3Tq1kTEaVxRYxNtvNYvMIFeOQhAHA2IdylHb12t4O /Xyz1C6esVXDMnLz/jxMeZ051W5J+xMFr/TVseT7PIJ1Ykuj8JtuXkbEyg471Cv3xiyo IBdrZrDnfkkfbBfGnUduk8UZwMsrIx5XW2N13A4UEIBDsoED3fGtcpdZwubSJZPxsIvU K2iZbZPxbx7ZMoe/+aDnxn5RQhf9IVAHuYIr3D6N8L7T+IJ1VEFDze2+++I3nOi8MZ31 WG2w== 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=V/f5zRc++UUEl2oF7a/v6c3iW8+A1FaOUHgeSr1YnVs=; b=TfUmMFBJflyU5Ig0zfd/sIf50QuPB0cv4v9wzRb+cVBJoK8tJ2UFdVnnJRjOoaZ4Vm gL/21KhnHggCFho5ahX395fRERbmIdGPK4OZHajV0ZpiAdrBsJbTdJ/2Dp1Sz56//wXB cp8K71mQlOJ/+Qm6k5SP0q7GXekKH3fL7LLgR1k9ILvxgucxx+ce3TgjVx5Z1iWxRPUI PtRAa4pAx1NKCbO0MT+PIbiLP8AjnPLvpJGfnbljaes7RtGwu++xEtiM5r/mkwUt85ON SYNhOZB6MrxVdcF341KCoknFHU3R8aptxOAKyy03Auwqdfonvp0H2/81UyH2Q80WuclI W3jQ== X-Gm-Message-State: APjAAAV/s5MBIIVtkMHN9KMsgqEoan8sl84ll9Y/kEmYw5kDdkLXL8CL 7di2N7irf5sGu87BgfBR1tjvXZTlJrADBvhl801uPw== X-Google-Smtp-Source: APXvYqwsSX23sWF/7Cv3Xx+gB6ffHVSnTl6Sr/scnY3zT8fQnBaaunzuRNN1mXGoW9KHCLqS7PSV7ksn+8m5qxFFXXI= X-Received: by 2002:a17:90a:858a:: with SMTP id m10mr6625852pjn.117.1580241239520; Tue, 28 Jan 2020 11:53:59 -0800 (PST) MIME-Version: 1.0 References: <20191216220555.245089-1-brendanhiggins@google.com> <20200106224022.GX11244@42.do-not-panic.com> <594b7815-0611-34ea-beb5-0642114b5d82@gmail.com> In-Reply-To: From: Brendan Higgins Date: Tue, 28 Jan 2020 11:53:48 -0800 Message-ID: Subject: Re: [RFC v1 0/6] kunit: create a centralized executor to dispatch all KUnit tests To: "Bird, Timothy" , Frank Rowand , Alan Maguire Cc: Luis Chamberlain , Jeff Dike , Richard Weinberger , Anton Ivanov , Arnd Bergmann , Kees Cook , Shuah Khan , Iurii Zaikin , David Gow , Andrew Morton , rppt@linux.ibm.com, Greg KH , Stephen Boyd , Logan Gunthorpe , Knut Omang , linux-um , linux-arch@vger.kernel.org, "open list:KERNEL SELFTEST FRAMEWORK" , KUnit Development , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org On Tue, Jan 28, 2020 at 11:35 AM wrote: > > > -----Original Message----- > > From: Frank Rowand on January 28, 2020 11:37 AM > > > > On 1/28/20 1:19 AM, Brendan Higgins wrote: > > > On Mon, Jan 27, 2020 at 9:40 AM Frank Rowand wrote: > ... > > > we could add Kconfigs to control this, but the compiler nevertheless > > > complains because it doesn't know what phase KUnit runs in. > > > > > > Is there any way to tell the compiler that it is okay for non __init > > > code to call __init code? I would prefer not to have a duplicate > > > version of all the KUnit libraries with all the symbols marked __init. > > > > I'm not sure. The build messages have always been useful and valid in > > my context, so I never thought to consider that possibility. > > > > > Thoughts? > > I'm not sure there's a restriction on non __init code calling __init > code. In init/main.c arch_call_reset_init() is in __init, and it calls > rest_init which is non __init, without any special handling. > > Is the compiler complaint mentioned above related to calling > into __init code, or with some other issue? I distinctly remember having the compiler complain at me when I was messing around with the device tree unit tests because of KUnit calling code marked as __init. Maybe it's time to start converting those to KUnit to force the issue? Frank, does that work for you?