Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp2897851imw; Wed, 6 Jul 2022 13:41:38 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sp2Z1lYTpEAp3544zYD58oQ7AvVEgmo0QgAN4dwQrGyl1x0HWU5wNLC5ltgg2ej/KJJTPW X-Received: by 2002:a17:902:f609:b0:168:dcbe:7c4d with SMTP id n9-20020a170902f60900b00168dcbe7c4dmr25600748plg.169.1657140098444; Wed, 06 Jul 2022 13:41:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657140098; cv=none; d=google.com; s=arc-20160816; b=d8Rta7jN88MHifEHJLXfgYMqo0YdhPy6YYkQep1rmH5YQ8cxy1kdSFPLRTY05FrprG 1TlF9U2o1VEIZnALe7WHqs0HSsJDZROXx41bpqWeSKhLO7jwK4Apq2SOLqX0bGdvUZnZ KOWu9StNaQgoan0TNRZUH7SFBNMxIMCGXEn9c0Bs3kd+OQn/ocQHzQtC0rUvn/wwCVBg +Hb10q1FM5govUr3juLAO0sOt+iSP7K+i0tJGXX6WJXP0gPca7bHU6md+lmVxJmYdPW4 fVTe02bpNyxApniDitH8QgwIHh7OHZivA+AGL54z1oem35FRNZbqCNvzGir468fUj+Gb QYXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Ome3WV2zqgpoz6nNvDZ5tdpmyA06nr+gyTTqL4RUa1Y=; b=uQy0Ty1mfK5wWqFNBEbtDt+C6BNF8Jn+RVG/6GNBqp67yOvj+SsY202WeN2FEHkNQg z+SAmBuINNigICjIIU01CTRVpDNQov6h6grO4sZSjK/gHrJSXvmeHSfGeiKq+nPyS7ny +y6lrKNYyxLJQckLYQIzBrTENuwzDV+5tvd0EYpTGYLHDq2F66ly0Ekxv0fjuEZh6EnI uU6PHDtrx/fu+OqOXN4+R7splKj5tw4CWUN4ZUOSqmHIaohzvjC5qXBAhjs+NlcZmDQo PGhhsSPTOHFdC7mHI6ci7V2rcpvfZoiAiQdmsOp+YucVKEqYehQ6+78MDucP4sDpiEtB dxDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=dGPHJYDY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i16-20020aa79090000000b005251a325ea0si1893928pfa.269.2022.07.06.13.41.25; Wed, 06 Jul 2022 13:41:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=dGPHJYDY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S233999AbiGFUa1 (ORCPT + 99 others); Wed, 6 Jul 2022 16:30:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232460AbiGFUaZ (ORCPT ); Wed, 6 Jul 2022 16:30:25 -0400 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A283523146 for ; Wed, 6 Jul 2022 13:30:24 -0700 (PDT) Received: by mail-ej1-x62d.google.com with SMTP id dn9so23728064ejc.7 for ; Wed, 06 Jul 2022 13:30:24 -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=Ome3WV2zqgpoz6nNvDZ5tdpmyA06nr+gyTTqL4RUa1Y=; b=dGPHJYDYBYSWeHXfrzUTPGHm+/9Y/wG6x2JFcNxydb3lhzUQmgBIVLXE/ATZjAODNt d8V4dc40KhU3cCopsYwoT9aRB2Goj8PqlcQrq56fSKI14AehA2DIPlCHp13fWgsLqrxI /BQRB1sc6ZzzdyFNaDuCffblFf0HHnyoLBskvSfV6XjU587xk2GEqp9eyHM3aHofwAQC zeAtesQVATHBqbRqvE5GuuyDqGLddl0FhlcjsB5j9T72bd7ZEc6oPApUY+SrcB9zjlZi zDxoMQIiYNb1muQd8Ize97vYw84eA7OpV3U07JBPbykqgkeGb4oeEdqeKBm6uWG3u6oD 3sbQ== 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=Ome3WV2zqgpoz6nNvDZ5tdpmyA06nr+gyTTqL4RUa1Y=; b=rN3y+YEGAnjwV7jgraPbotHj5zosQ3CQepUkiwJ4Dz6WkHZGIc1GYBmgCRhYCDzSR+ XxTep1IFjNE7/eByUuZqZ6fAF3BjPZMQrRCJ9yLqXFT4xgGx6LMkzlGQfiH5d+i/2bnL JLeHiNvb7IIf26i/7hjcL4CMrPmliFPvlXvtRiynYl5GjCPW6b8gBWVDtuE3T7WxK7NM 5y3a20LQqt3dCfEUe0vh4P+ngM0barC79yNhjxQh82nqonALQCWYNDsh5KC2Dln3hXNu kTww23F7YuTLCqFziUbt4sjW6KQB156O2PhVLTBFEDGyFYL1Lz6zV9G2sY8LKjDWU1yI F+tA== X-Gm-Message-State: AJIora/SSjotfo7B5pcEX6z2Q3vO49pZDJLp2OlvTuGOAfx8exOxi8/7 9gA0oD4ZNE4eZoQbukxtCxMiQpiNYlaehRKumUKV8y5QQEhCpc+9 X-Received: by 2002:a17:907:168c:b0:726:c521:25aa with SMTP id hc12-20020a170907168c00b00726c52125aamr40617053ejc.46.1657139423066; Wed, 06 Jul 2022 13:30:23 -0700 (PDT) MIME-Version: 1.0 References: <20220627221446.82157-1-dlatypov@google.com> <20220627221446.82157-2-dlatypov@google.com> In-Reply-To: <20220627221446.82157-2-dlatypov@google.com> From: Brendan Higgins Date: Wed, 6 Jul 2022 16:30:11 -0400 Message-ID: Subject: Re: [PATCH v3 2/3] kunit: tool: make --kunitconfig repeatable, blindly concat To: Daniel Latypov Cc: davidgow@google.com, linux-kernel@vger.kernel.org, kunit-dev@googlegroups.com, linux-kselftest@vger.kernel.org, skhan@linuxfoundation.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 27, 2022 at 6:14 PM 'Daniel Latypov' via KUnit Development wrote: > > It's come up a few times that it would be useful to have --kunitconfig > be repeatable [1][2]. > > This could be done before with a bit of shell-fu, e.g. > $ find fs/ -name '.kunitconfig' -exec cat {} + | \ > ./tools/testing/kunit/kunit.py run --kunitconfig=/dev/stdin > or equivalently: > $ cat fs/ext4/.kunitconfig fs/fat/.kunitconfig | \ > ./tools/testing/kunit/kunit.py run --kunitconfig=/dev/stdin > > But this can be fairly clunky to use in practice. > > And having explicit support in kunit.py opens the door to having more > config fragments of interest, e.g. options for PCI on UML [1], UML > coverage [2], variants of tests [3]. > There's another argument to be made that users can just use multiple > --kconfig_add's, but this gets very clunky very fast (e.g. [2]). > > Note: there's a big caveat here that some kconfig options might be > incompatible. We try to give a clearish error message in the simple case > where the same option appears multiple times with conflicting values, > but more subtle ones (e.g. mutually exclusive options) will be > potentially very confusing for the user. I don't know we can do better. > > Note 2: if you want to combine a --kunitconfig with the default, you > either have to do to specify the current build_dir > > --kunitconfig=.kunit --kunitconfig=additional.config > or > > --kunitconfig=tools/testing/kunit/configs/default.config --kunitconifg=additional.config > each of which have their downsides (former depends on --build_dir, > doesn't work if you don't have a .kunitconfig yet), etc. > > Example with conflicting values: > > $ ./tools/testing/kunit/kunit.py config --kunitconfig=lib/kunit --kunitconfig=/dev/stdin < > CONFIG_KUNIT_TEST=n > > CONFIG_KUNIT=m > > EOF > > ... > > kunit_kernel.ConfigError: Multiple values specified for 2 options in kunitconfig: > > CONFIG_KUNIT=y > > vs from /dev/stdin > > CONFIG_KUNIT=m > > > > CONFIG_KUNIT_TEST=y > > vs from /dev/stdin > > # CONFIG_KUNIT_TEST is not set > > [1] https://lists.freedesktop.org/archives/dri-devel/2022-June/357616.html > [2] https://lore.kernel.org/linux-kselftest/CAFd5g45f3X3xF2vz2BkTHRqOC4uW6GZxtUUMaP5mwwbK8uNVtA@mail.gmail.com/ > [3] https://lore.kernel.org/linux-kselftest/CANpmjNOdSy6DuO6CYZ4UxhGxqhjzx4tn0sJMbRqo2xRFv9kX6Q@mail.gmail.com/ > > Signed-off-by: Daniel Latypov Reviewed-by: Brendan Higgins