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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 39C29C43334 for ; Fri, 22 Jul 2022 00:25:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229696AbiGVAZI (ORCPT ); Thu, 21 Jul 2022 20:25:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230388AbiGVAZH (ORCPT ); Thu, 21 Jul 2022 20:25:07 -0400 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6ADCB39BBC for ; Thu, 21 Jul 2022 17:25:03 -0700 (PDT) Received: by mail-ed1-x531.google.com with SMTP id w12so4057280edd.13 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=LGTb+WksoX/+2CmWy5w4V6VqxP3wru9DFF8oNK/rDKNFZhtop44S/jx6NImxCytt0h /DHhSEPm0d32OtaB2hY4FAPbdPxjAB1s4unQtIULJZEk4UdeTNdDwiWZI2W/gD2hio16 oMGQOuLJYKxhRPdW+40tF0ZLnotWLPrDU0Wrv+yj0xoDwEKzk0bwlPH2dCCNpQ5zbOu3 nSeycjvYnybX1Pu2BK6I/mFiAeC28Y4vE7ohguPxkU68aKuqc2aKrtRpMRioOifhcDDj OnmmMtmmwQIGkta0ngb3IX9mkOjWZAjxweox12PqL9G6zYgP9QN8CCGsdqZGP1QYPoWF N0qw== X-Gm-Message-State: AJIora+TPKE8E5xqfRDxayQC4CB12qlzgVlsi+zXY5TlGKxN57YmN30o IG4B/IXqf6rfI7ZsgYU6l8V62ehHJtiozArbMQIHPA== X-Google-Smtp-Source: AGRyM1sEecyNIEXWcjY+YZG5ShpQUpGqjIkWEVj6V5QstDHGZLRFssfV9P9uHVtjrqmKV1UbLeMuPVtGv+VVI7lVfVU= 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" Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@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 [...]