Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp333317imi; Thu, 21 Jul 2022 01:35:41 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vJsbW9VXl8KNXizpe5eN70+6h+uIVgS1qbgXoVLlH+EmuGtT2QPV3lf95lilocwly4gGjw X-Received: by 2002:a17:90a:e7cd:b0:1f0:2304:f579 with SMTP id kb13-20020a17090ae7cd00b001f02304f579mr10237652pjb.212.1658392541733; Thu, 21 Jul 2022 01:35:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658392541; cv=none; d=google.com; s=arc-20160816; b=OsPWL3763ul2BixF3PF3COANL8udrab3YyUIPiRe5/nhHlhcavIp0l/LOHBuX9vXE9 vWWC4zdhqbYO98abATLP+3Sq2ho/CrPQ/RGxHUwDkARNQuPl0r8or1EomaRKed4M1hvs mes9cRfeqQx0eL4uhyS3lhIcqHJjJDeAQmfd6yWVAUQyJY1mMMpXJaAr26zShl+pkEEB Of3NDtrbVC8oCAj290qA4UCVUnkxnQ8eIbN45Kxwn0Cs5LV2ZJy8SPf8zIMJfS0hujTk L6k4chGXhkMU7AvhC5+Io9FPLXc7Q2umkSXRiTFb+V8rUx92k0ALt2aIVuSDtqXQaYr3 rRbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:mime-version:message-id:date :dkim-signature; bh=D/jsDBi2QFOs4Zs9HMSmYJI8zRXb+dPzos0HZwfSzzc=; b=IYkW/yp5xYnts+OwVGizWZKqSDhyS/71rXtTYqyMznzWCPHp3rMDPoTnpLU8KQYpzd +dTAHkioI3FzC2plAe4eWz6Lnnl7+1pjFLmo+mDgwGb6niWLXgCPefPL4lCqbih8ejZX Kk6wUNOUqH+j3OUqTp/9lF45bBO6ySR+00wTn4zxL8Nk9d4N7ptAUoEcqVokapYIeCg3 Y0i87NYmZ7NPeL55p+R5dVoH7gO57ojzG/jCDJAVc9AvogppZD1e/6s0dqVHbtpS1Xw3 4laVnl72Al/nWpITwPFWQNTxC352G/06PN35vRYXcDTuGBRObq+8LBh0gF60lvN5jE+I RT2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=hDrAMBg+; 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 s17-20020a170902ea1100b0016d0d114d30si1827762plg.360.2022.07.21.01.35.27; Thu, 21 Jul 2022 01:35:41 -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=hDrAMBg+; 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 S229875AbiGUI0J (ORCPT + 99 others); Thu, 21 Jul 2022 04:26:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231330AbiGUI0H (ORCPT ); Thu, 21 Jul 2022 04:26:07 -0400 Received: from mail-pj1-x104a.google.com (mail-pj1-x104a.google.com [IPv6:2607:f8b0:4864:20::104a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60AE42CDEF for ; Thu, 21 Jul 2022 01:26:06 -0700 (PDT) Received: by mail-pj1-x104a.google.com with SMTP id o13-20020a17090ab88d00b001f1ef2109aaso2506299pjr.2 for ; Thu, 21 Jul 2022 01:26:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:message-id:mime-version:subject:from:to:cc; bh=D/jsDBi2QFOs4Zs9HMSmYJI8zRXb+dPzos0HZwfSzzc=; b=hDrAMBg+Z58759aVRZuEyzgtEevkSBomPALCPlB5FpjqCmKg8B0/ALxrCvYQikj+H5 fxst5CjnEkashz8KaxmEkft/H1HJM0q/5JSCTEziGJVfyxDb8Tjqo1FJSXZJmHaSCFFJ Z6k161Kw/1FwBVTD39n/pntZJBIGo4dLkrk8RxqVFcKP5FVn37uScX64N3sZHH383QnV 7yjJX6A9ZpFCvoc1YqHM0qqNOuh5VMEDTbpU80qq8Gmw0u7fPJf9odGO03uIMXvljOn1 QmjxH/o8StFq9utrr0exokzUQlGoDdEjVLijTC72IRrs36dKf1irONKGhxhL94DIpx1X ZluA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=D/jsDBi2QFOs4Zs9HMSmYJI8zRXb+dPzos0HZwfSzzc=; b=CjE4bWv5P3woMm4DYTf36IgEIsO3SuJQNlq0XMkLsVFvu69pQ20eYKSWWtawak1FBQ Ow9ISTM7trBJI/bdDHCjbyBjf5MuOjpzindDwJPWyyuSgVUQEHWSbsuPKG2wJ9HVpQLz 2ODRM3gob5/CoAI1qCsMkJnl2n13DGtK2I3fRvafzHhNnmCs6yXHrFFxfIXAeRbJTC30 7uRwGR+D8BhNio8+Fr+xxtXMnHojkJ/YVS+Yr0XxawQ008FXS+8ZC2sXjiTkb1x3E3ry CoAUPiRUpe5yMyj1pvlECy5K9rtjVaS25sRuyct2Pwl5RFZwk71wo+fNE7O6KEkvsnw6 Df9Q== X-Gm-Message-State: AJIora97i3ziXLsGXX9QPBywNPsbKMHHrTgZuEpYVLHOrkM2eZQb+kvh JMihSogm8RbqgDaoyipKrtscEEI8C4W9t9nt X-Received: from skazigti.c.googlers.com ([fda3:e722:ac3:cc00:4f:4b78:c0a8:411e]) (user=sadiyakazi job=sendgmr) by 2002:a05:6a00:1a:b0:52a:dec1:308c with SMTP id h26-20020a056a00001a00b0052adec1308cmr43268981pfk.52.1658391965893; Thu, 21 Jul 2022 01:26:05 -0700 (PDT) Date: Thu, 21 Jul 2022 08:10:27 +0000 Message-Id: <20220721081026.1247067-1-sadiyakazi@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.37.0.170.g444d1eabd0-goog Subject: [PATCH v2] Documentation: kunit: Add CLI args for kunit_tool From: Sadiya Kazi To: brendanhiggins@google.com, davidgow@google.com, skhan@linuxfoundation.org, corbet@lwn.net, mairacanal@riseup.net Cc: Sadiya Kazi , linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_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 Run_wrapper.rst was missing some command line arguments. Added additional args in the file. Signed-off-by: Sadiya Kazi --- Changes since V1: https://lore.kernel.org/linux-kselftest/20220719092214.995965-1-sadiyakazi@google.com/ - Addressed most of the review comments from Maira and David, except removing the duplicate arguments as I felt its worth keeping them in the reference documentation as well as in context. We can improve them and differentiate their use cases in the future patches. --- 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 @@ -233,7 +233,7 @@ Command-Line Arguments ====================== kunit_tool has a number of other command-line arguments which can -be useful for our test environment. Below the most commonly used +be useful for our test environment. Below are the most commonly used command line arguments: - ``--help``: Lists all available options. To list common options, @@ -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``. + +- ``--arch``: Runs tests on the specified architecture. The architecture + specified must match the Kbuild ARCH environment variable. + 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. + 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. + +- ``--run_isolated``: If set, boots the kernel for each individual suite/test. + This is useful for debugging a non-hermetic test, one that + might pass/fail based on what ran before it. + +- ``--raw_output``: If set, generates unformatted output from kernel. Possible options are: + + - ``all``: To view the full kernel output, use ``--raw_output=all``. + + - ``kunit``: This is the default option and filters to KUnit output. Use ``--raw_output`` or ``--raw_output=kunit``. + +- ``--json``: If set, stores the test results in a JSON format and prints to `stdout` or + saves to a file if a filename is specified. -- 2.37.0.170.g444d1eabd0-goog