Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp320217pxb; Mon, 8 Nov 2021 14:16:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJxRYkCUSzvF3Mb0H8R136/1+Zk9xeMDLSsLLzHp9dibH7yyDQKHqolrdblbsHkR4qiIfBoT X-Received: by 2002:a17:906:9b88:: with SMTP id dd8mr3240413ejc.467.1636409792121; Mon, 08 Nov 2021 14:16:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636409792; cv=none; d=google.com; s=arc-20160816; b=ZOWLbcl5AX7dBsuWZt+v6l/M3JTG/qc4+1+LPRHwfKgDlV1A3u9c/0vbZHNGgs8aeH xlkbAZiLJc2nKehUbKtYZNbFekuVQhzKO/cUPiAJDytgqDqbAGxSHzKciiDvApPYVhs8 Nh2hKYa3kbK+fbH6/TYYe2OGfaeztwFTFjW05ZacukCtNx6uvCrOfETCuQiBiSGNd/Ye PWznSyKCPpK2PSQqwR7ULgFTesKi1zr7H/JuPHXP2yAUiuDnNywTuzOokJrRgoiII4gw YGhp3UbrlwYNiF+zgU9AXxdiw6GjsSrKTGAqDv+jBifIoFfPfNS5hs0JgMml3b5tZHvV 1TWA== 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=ZPGKd4TGs0XA53ASidhzNrF2fiRX7U5gxFXqgn9DTGg=; b=mhaFqeyx1Z3M+XjI7isxYPz0Peir9/MmIxjKaCOoOuor8tPy4DbP0NinhfU4JTtSru cFtsHLNB5oN8QeFaqc8aKZPNVGZyt4AvceGWJhoMULgBxgqQw2udPY6Cy6qUbV6pq1nx WWU4XhWwoU9Vdv6OWR3Q3+0LorJVr+CzoNkhp6B9DQJqT7ZZ7v+tnTVRZUCCFSZQ1vqK Qo9yjVsUBQMldsufIQM3Vti4esLiDCRLESDCJhBFcHj8BnSDHE6SrQIL6mwseSsLhy6X HVj5w3mWd+35fuMVn1koRK8bXTfjYH6nvvuoo8dMk418rkRFf62boSvQ2+9sdvWgQscE qu8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=mmil4uIu; 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 qk38si20124654ejc.469.2021.11.08.14.16.06; Mon, 08 Nov 2021 14:16:32 -0800 (PST) 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=20210112 header.b=mmil4uIu; 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 S239244AbhKHR0N (ORCPT + 99 others); Mon, 8 Nov 2021 12:26:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231304AbhKHR0M (ORCPT ); Mon, 8 Nov 2021 12:26:12 -0500 Received: from mail-il1-x135.google.com (mail-il1-x135.google.com [IPv6:2607:f8b0:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 391A3C061570 for ; Mon, 8 Nov 2021 09:23:28 -0800 (PST) Received: by mail-il1-x135.google.com with SMTP id x9so17743131ilu.6 for ; Mon, 08 Nov 2021 09:23:28 -0800 (PST) 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=ZPGKd4TGs0XA53ASidhzNrF2fiRX7U5gxFXqgn9DTGg=; b=mmil4uIuW0TMFJfUrD8Awk1ufClyQY0B84wJmUVeU8dcqNzLmhiHK9a0H63pwIk8J6 SHGq4db3QsIywsTOr7SIjKJdT6gjKBvr70pW5PIt18rOxFb0DxfP8OIUbqr4gvUqALRt GnwuUBXVKJ6SuOBxIamxE1lrg9o5LM87FdRjpT1IemhJa6UXXCPZFdjZ7i3yEVZmqXF0 cZleouHPFCdQei12sI4+6ks2t9JSIR9zVLp0RZVt/cHQ9k8bd+qPcXOH1HIQOqdJ9Cmf 707/4u6rBIKlFLUqBEO4kgeb/wW87bzFpktEuOdz3qUmkwp1Uuro+FzQcNkMJTZr+dBe 5ShA== 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=ZPGKd4TGs0XA53ASidhzNrF2fiRX7U5gxFXqgn9DTGg=; b=jlzr5SYLzuKqGn0AtwMghc53LKhRHSSqkekts1t+rZD0bvvtjIF5eoxCwOxnXQwTcQ hHdB9JjSatsX8uQISX+RsJRXRXHxywg+ejKpk3kjWXsdf1EjdOpfVigUqeHRpF+JsHjK QPP4ukpEmRDhWR/IzW66dPwLKIHVep/UwBegHjJjVfjop5GtRwiB+MkZYsOqqCWyJRfR roJYsx4HpNvvgxgc+LCsGewQ8CDFMF7s3kFTq2edHldxUx/GPZagn2tiVbuAV+cZYZ8M Dr+Xya0/0TwS8Ab77l/L7odQ/Tnl/4eE+XUbrU7tzz2A9/C+ZmZx75SQSmXKRu/3Ke/Q ZxNg== X-Gm-Message-State: AOAM531LCsB8poQiKNHw/wiJNHODnWQGITyuHnGb16N4B28IvgKQLKzc 3Tsw+IVyD2pLGAjsJ4yhnr9u02GDN5128rYzK+F/MA== X-Received: by 2002:a05:6e02:20ea:: with SMTP id q10mr515654ilv.10.1636392207384; Mon, 08 Nov 2021 09:23:27 -0800 (PST) MIME-Version: 1.0 References: <20211106013058.2621799-1-dlatypov@google.com> <20211106013058.2621799-2-dlatypov@google.com> In-Reply-To: From: Daniel Latypov Date: Mon, 8 Nov 2021 09:23:16 -0800 Message-ID: Subject: Re: [PATCH 2/2] kunit: tool: add --kconfig_add to allow easily tweaking kunitconfigs To: David Gow Cc: brendanhiggins@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" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 5, 2021 at 9:07 PM David Gow wrote: > > On Sat, Nov 6, 2021 at 9:31 AM 'Daniel Latypov' via KUnit Development > wrote: > > > > E.g. run tests but with KASAN > > $ ./tools/testing/kunit/kunit.py run --arch=x86_64 --kconfig_add=CONFIG_KASAN=y > > This is very neat, thank you. I'm definitely going to use this quite a bit. > > My only real note is that we'll need to add some documentation (but > since the KUnit documentation is being reworked at the moment, I'm > okay with doing that later to avoid merge conflicts). Yeah, there's that and I was also unsure where exactly to mention it. I'd also want there to be the caveat about how removing the option won't trigger a rebuild. The part where we have that right now is really early on and doesn't need more stuff added there: https://www.kernel.org/doc/html/latest/dev-tools/kunit/start.html#creating-a-kunitconfig > > > This also works with --kunitconfig > > $ ./tools/testing/kunit/kunit.py run --arch=x86_64 --kunitconfig=fs/ext4 --kconfig_add=CONFIG_KASAN=y > > It's also worth noting that this can be appended multiple times to set > multiple options, which is useful Ah yeah, this could be called out in the commit desc if we want a v2. Checking the examples in the link down below, TuxMake doesn't actually include one with it being repeated. I had been banking on readers of this message assuming that it could be repeated either from previous familiarity with TuxMake or by clicking that link. But for tweaks that require multiple options, I'm personally going to stick with --kunitconfig and heredocs. E.g. coverage requires appending 3 kconfigs, so I'm sticking with ./tools/testing/kunit/kunit.py run --make_options=CC=/usr/bin/gcc-6 --kunitconfig /dev/stdin < > > This flag is inspired by TuxMake's --kconfig-add, see > > https://gitlab.com/Linaro/tuxmake#examples. > > > > Our version just uses "_" as the delimiter for consistency with > > pre-existing flags like --build_dir, --make_options, --kernel_args, etc. > > > > Note: this does make it easier to run into a pre-existing edge case: > > $ ./tools/testing/kunit/kunit.py run --arch=x86_64 --kconfig_add=CONFIG_KASAN=y > > $ ./tools/testing/kunit/kunit.py run --arch=x86_64 > > This second invocation ^ still has KASAN enabled! > > This behaviour is quite useful, and actually means we can turn on > individual items with > $ ./tools/testing/kunit/kunit.py config --kconfig_add=