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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 891D0C433EF for ; Sat, 2 Oct 2021 03:10:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 63ABB61A8F for ; Sat, 2 Oct 2021 03:10:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229953AbhJBDMi (ORCPT ); Fri, 1 Oct 2021 23:12:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229752AbhJBDMi (ORCPT ); Fri, 1 Oct 2021 23:12:38 -0400 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1DCC0C061775 for ; Fri, 1 Oct 2021 20:10:53 -0700 (PDT) Received: by mail-wr1-x433.google.com with SMTP id r7so2827038wrc.10 for ; Fri, 01 Oct 2021 20:10:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Tfz8zmQgeO1eggWVGFY1FGxn/XYdmF/KfNMWX/AEGxQ=; b=GTqZL9MOhbBTOD0ec9QBdNPCu79/gtZOF+SKRjFS2ZlYTTyPffJJOMMNW+ePcHAg6f wyd3K9Yxfo0daM/xzvQny+MuugYDL+32Qcr8+6Zff+rHgl0bspub1NibX10/UsjMYYme 4iWAYqt2TsiQD2uge5E9yTTrPbyjgtK7LlMCPWXAWm0TKf3nahvuXLI1zSYjMp58X3oP LDVI0TzX0kIMMALqBB8VzDnoo3PUCKFPviBg2EvM1BdHVNpXHskpuTR/0oEdbIJ6soNg 1DEXrkdbeB4dfwOCeXpwtkk4dZYpzmqxCHyN0bpiDwALOgE7RbdPrT8Y6tXOKT7cwsBO otBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Tfz8zmQgeO1eggWVGFY1FGxn/XYdmF/KfNMWX/AEGxQ=; b=8NTHTjf5n4TUurElCcKKJ6/EA1WipDETSaeupIP+9p8zncdpEYIQz6UJzdUaq3mKIt /KiKwAndVAH3Z3JDe4HA/7HSHzRGCvHVBSaoXZNazfoJuWwz3XfNIAxRnOqbG/OG6ofC WGqDHXN4IvSdEZmnLdN1RfszTeeSe/mY11jcDFD3qiouhApuog2g9UDhnvAgMdz80rHO Bo2wNeJuhbdJrOH1ZfcIVKVXmoPLL6sh92ZpHFuGNs/AHoE1SbZOwE7gw/ki0EoSR8zS PY/Sl0FqTzMnJ3D15p5TTq2Y+29wOxHrdqqlPL4HNwTpg7MFaxPxW+HU+ibz8F36AtkI baBg== X-Gm-Message-State: AOAM530rnjMNSK9i5OhCyHS2gXiBS1lFNaqbVryjmTQ/7NZs6XfPBsWC kByr15bCEQ69pPPKtO1MPXaPnwuUwB6aAbLPNER8kQ== X-Google-Smtp-Source: ABdhPJyaIkAOm3BnAWyosEiZJMwTdQYdQp9/7bq81nO8G/hxv8QddOqP70ufQI/iVglTD+4bAxm828ZPARQ0IQXMq1s= X-Received: by 2002:adf:f6c7:: with SMTP id y7mr1301103wrp.44.1633144251572; Fri, 01 Oct 2021 20:10:51 -0700 (PDT) MIME-Version: 1.0 References: <20211002022656.1681956-1-jk@codeconstruct.com.au> In-Reply-To: <20211002022656.1681956-1-jk@codeconstruct.com.au> From: David Gow Date: Sat, 2 Oct 2021 11:10:40 +0800 Message-ID: Subject: Re: [PATCH net-next 1/2] mctp: test: disallow MCTP_TEST when building as a module To: Jeremy Kerr Cc: Networking , "David S. Miller" , Jakub Kicinski , Matt Johnston , Brendan Higgins , "open list:KERNEL SELFTEST FRAMEWORK" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org On Sat, Oct 2, 2021 at 10:27 AM Jeremy Kerr wrote: > > The current kunit infrastructure defines its own module_init() when > built as a module, which conflicts with the mctp core's own. > > So, only allow MCTP_TEST when both MCTP and KUNIT are built-in. > > Reported-by: kernel test robot > Signed-off-by: Jeremy Kerr > --- This looks good to me. I don't think you'll be the only person to hit this issue, so -- while it's probably overall nicer if tests can sit in their own module -- we'll look into finding a way of supporting this with KUnit at some point. In the meantime, though, this is a reasonable workaround. Reviewed-by: David Gow -- David > net/mctp/Kconfig | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/net/mctp/Kconfig b/net/mctp/Kconfig > index 15267a5043d9..868c92272cbd 100644 > --- a/net/mctp/Kconfig > +++ b/net/mctp/Kconfig > @@ -13,6 +13,6 @@ menuconfig MCTP > channel. > > config MCTP_TEST > - tristate "MCTP core tests" if !KUNIT_ALL_TESTS > - depends on MCTP && KUNIT > + bool "MCTP core tests" if !KUNIT_ALL_TESTS > + depends on MCTP=y && KUNIT=y > default KUNIT_ALL_TESTS > -- > 2.30.2 >