Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp139076imi; Thu, 21 Jul 2022 17:51:44 -0700 (PDT) X-Google-Smtp-Source: AGRyM1si1G85IOdmoj8Ro9iZJJEWY3JESvz7yFFraAmvA5KMBV3Vt1qd+YfKTvD6CUt+TgteHry4 X-Received: by 2002:a17:902:dacb:b0:16c:4f39:f846 with SMTP id q11-20020a170902dacb00b0016c4f39f846mr870907plx.169.1658451104368; Thu, 21 Jul 2022 17:51:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658451104; cv=none; d=google.com; s=arc-20160816; b=BDtCEonsKSjQoorATIcj6LJe3lo/qMOGbVepFSUq4gNBxvvQfZVrZCAgkgEdsg/TVZ 66o3XbM7Q5P+msHHizMvcc10tmwP3zmGVGq22c2quPFZxyMrBTgGOhlSoXWDm4F6+oqP izIXllY1d6i7/PIFaoV+g3nPnV6iyoKBmggysAqbk5XHdNLnsynMnZ/VlBrdPmxOxB0e vfPOOZxzOagRQv4tHoJ+NrYl/FNmtUJIdqf96HBH35Ldrmvwkr212u4duIlFoGW58duS GCRRNp4Y9YTkIbgapEI0QqViP/cxnjWwTnEC+2x/GVWVZbVlLOOvsVlaQ4JhUDVV6dPG GBPA== 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=T+jSm49KfUYG5RhGRq72Xx7Q+0SpyncIbR4IwkZUcPE=; b=XgKbcpjtF6IukYSut82oE4C2ZB3R7At7V1ThR9GENpXq0yKHayK+Yj38pXSCEPLatq cOIKh+VSc/++cdDyTTjJ8B52YxAs6d+UHJX451oipXAomPfQQiNOJNMK92UcztCciGcF zK/Ky9pqhm0SValwD6HQEeT7rDT8fo2YCUGM3wIG3u4M8KyBgD7K0iaprrdWfOcBn7Ma gNvBSw17+mADzAvWwEMFcITh/RVtx7sVoxTB/AwHKbzATBKcEess5r+WZ5f94OPc/OCa vhw6MfTbm7X5zzF2JeTwQol+4BxEIfhnpycr58Um1cljmJ/j0l9xRr0NCmu78k3ovat0 DfOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=XxZ+xsTf; 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 i20-20020a635414000000b00415d4e85e28si4175038pgb.682.2022.07.21.17.51.28; Thu, 21 Jul 2022 17:51:44 -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=XxZ+xsTf; 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 S229833AbiGVAZG (ORCPT + 99 others); Thu, 21 Jul 2022 20:25:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229696AbiGVAZF (ORCPT ); Thu, 21 Jul 2022 20:25:05 -0400 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67CD62E9D8 for ; Thu, 21 Jul 2022 17:25:03 -0700 (PDT) Received: by mail-ed1-x52d.google.com with SMTP id g1so4071249edb.12 for ; Thu, 21 Jul 2022 17:25:03 -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=T+jSm49KfUYG5RhGRq72Xx7Q+0SpyncIbR4IwkZUcPE=; b=XxZ+xsTfqHc5yjsY1Ryxp5yNP3TbAnty9tQNkC/zAyHdMw9qTL9WknfOc6BYk7CBwr Uo5E2gZzdnaIcbdWbi3Gk1TPuPkh0x9RCKMcwGsxwYKQMowSuD3E66Ou10SASq6e2GqF DXrjW9tGWfObIxDuxZ+hESxFu+/cb9K2qp+l5uoP7l1rLFwiizuxgBwmZo8yXrBYrjyN pNsTC5E0mC0XDiRjridjW023zMNF7ZZuTCTPuDMaVX6blU86/8l/lHvqxH5E6+1ZKQMX hoLWS7dlqn0QYTNkvfQrzP6W3uaFpm6VKIiOuQlePW3vjlrHENCmp9eoZPDCEjIHjftL mefw== 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=T+jSm49KfUYG5RhGRq72Xx7Q+0SpyncIbR4IwkZUcPE=; b=svlGtZ/E0MI+cdlzdsQSCjcgf6SxtFMvooskvc+aodlx9SaHTU02zGMi/WEdXCf/Xx YwrRHUzz5MVpwgFSe3tqS1XtwWerIXVjBA9PwTDAW4RdF2qIJB9g2cms6Prs7Xh817rA YhEUxtxlIkHms1MY2SzDZAg4wCmMVJjX4PYBjeA3w301Dn8k4y8ejVtZfUizX8339ELZ 6DYt6p09S0aUVlUi1lSZ3ojugs8YkhLEotZ4vMCrcv/BkHxNqNL8EimeW5HVqWeeohUg LOMdLbONwJKsY2NN3g9W+PYhe/EzpjlJoNvwmqXsSnJFgLkCaL/QiKGOmvNjUxoxTLlq 666Q== X-Gm-Message-State: AJIora9ET4rMXkKgvO5NCmEtaMqc4kRKb/JqVo8b1xjmqLo9bMeKd/b2 ufzV2zKO4bswwg8oPQ5J1tVJ8L2eteunwWGWpik7ig== X-Received: by 2002:a05:6402:2997:b0:43b:247b:89cb with SMTP id eq23-20020a056402299700b0043b247b89cbmr905683edb.91.1658449501795; Thu, 21 Jul 2022 17:25:01 -0700 (PDT) MIME-Version: 1.0 References: <20220721081026.1247067-1-sadiyakazi@google.com> In-Reply-To: From: Brendan Higgins Date: Thu, 21 Jul 2022 20:24:50 -0400 Message-ID: Subject: Re: [PATCH v2] Documentation: kunit: Add CLI args for kunit_tool To: David Gow Cc: Sadiya Kazi , Shuah Khan , Jonathan Corbet , =?UTF-8?B?TWHDrXJhIENhbmFs?= , "open list:KERNEL SELFTEST FRAMEWORK" , KUnit Development , "open list:DOCUMENTATION" , Linux Kernel Mailing List 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, 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 Thu, Jul 21, 2022 at 7:54 PM David Gow wrote: > > On Thu, Jul 21, 2022 at 4:26 PM Sadiya Kazi wrote: [...] > > Documentation/dev-tools/kunit/run_wrapper.rst | 60 ++++++++++++++++++- > > 1 file changed, 59 insertions(+), 1 deletion(-) > > > > diff --git a/Documentation/dev-tools/kunit/run_wrapper.rst b/Documentation/dev-tools/kunit/run_wrapper.rst > > index 5e560f2c5fca..600af7ac5f88 100644 > > --- a/Documentation/dev-tools/kunit/run_wrapper.rst > > +++ b/Documentation/dev-tools/kunit/run_wrapper.rst [...] > > @@ -257,3 +257,61 @@ command line arguments: > > added or modified. Instead, enable all tests > > which have satisfied dependencies by adding > > ``CONFIG_KUNIT_ALL_TESTS=y`` to your ``.kunitconfig``. > > + > > +- ``--kunitconfig``: Specifies the path or the directory of the ``.kunitconfig`` > > + file. For example: > > + > > + - ``lib/kunit/.kunitconfig`` can be the path of the file. > > + > > + - ``lib/kunit`` can be the directory in which the file is located. > > + > > + This file is used to build and run with a predefined set of tests > > + and their dependencies. For example, to run tests for a given subsystem. > > + > > +- ``--kconfig_add``: Specifies additional configuration options to be > > + appended to the ``.kunitconfig`` file. > > + For example, ``./tools/testing/kunit/kunit.py run --kconfig_add CONFIG_KASAN=y``. > > + > > Just FYI, this example won't work as-is until KASAN for UML is merged. > It's already sitting in uml/next, so this shouldn't be a problem: > https://git.kernel.org/pub/scm/linux/kernel/git/uml/linux.git/commit/?h=next&id=5b301409e8bc5d7fad2ee138be44c5c529dd0874 > > But if you want to try it on 5.19 or the current kunit branch, you'll > need to add, e.g., --arch=x86_64 > > > +- ``--arch``: Runs tests on the specified architecture. The architecture > > + specified must match the Kbuild ARCH environment variable. > > I'm not quite sold on 'must match the Kbuild ARCH environment > variable'. That seems to imply to me that you need to set ARCH= _and_ > use --arch. Instead, --arch itself sets ARCH=, so the values use the > same names. Agreed, I was just about to reply with a comment to the same effect. > > + For example, i386, x86_64, arm, um, etc. Non-UML architectures run on QEMU. > > + Default is `um`. > > + > > +- ``--cross_compile``: Specifies the Kbuild toolchain. It passes the > > + same argument as passed to the ``CROSS_COMPILE`` variable used by > > + Kbuild. This will be the prefix for the toolchain > > + binaries such as GCC. For example: > > + > > + - ``sparc64-linux-gnu-`` if we have the sparc toolchain installed on > > + our system. > > + > > + - ``$HOME/toolchains/microblaze/gcc-9.2.0-nolibc/microblaze-linux/bin/microblaze-linux`` > > + if we have downloaded the microblaze toolchain from the 0-day > > + website to a specified path in our home directory called toolchains. > > + > > +- ``--qemu_config``: Specifies the path to a file containing a > > + custom qemu architecture definition. This should be a python file > > + containing a `QemuArchParams` object. > > + > > +- ``--qemu_args``: Specifies additional QEMU arguments, for example, "-smp 8". > > + > > +- ``--jobs``: Specifies the number of jobs (commands) to run simultaneously.4 > > + By default, this is set to the number of cores on your system. > > + > > +- ``--timeout``: Specifies the maximum number of seconds allowed for all tests to run. > > + This does not include the time taken to build the tests. > > + > > +- ``--kernel_args``: Specifies additional kernel command-line arguments. Might be repeated. > > Nit: maybe "can be repeated"? As it's the reader of this documentation > who will likely be doing the repeating. Or "may be repeated"? +1 [...]