Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2041781lqz; Tue, 2 Apr 2024 05:51:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVNTd9NO9ir+SgeHtHqGlrswsAkqlRW6ZyRx8dKLDD6k/8/Vc9ypX2+mpYR01GfnrW+1AWY9euQ1C9Gk1mZi9+816FNxe34gy551V9Xqg== X-Google-Smtp-Source: AGHT+IFkxLqPG5+o60C3mHTPcH0y5bVIWX1QA0OZErfF9NRObGF5tjuygKCG5YyRfXJZbikbW5uT X-Received: by 2002:a17:90a:2d89:b0:29b:7206:7023 with SMTP id p9-20020a17090a2d8900b0029b72067023mr9205805pjd.12.1712062288041; Tue, 02 Apr 2024 05:51:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712062288; cv=pass; d=google.com; s=arc-20160816; b=bi3oSmMPUXN3poW+PRVHVayEVqHDCmCkhtdKzL8qXBYlNE+irQ1LElSHMun7LJmrJh NHTkm4H2mHhTGbjnwE0rz1p8QkBCLot70poIeKajLIodz7A1M2c0vbqoH5xdwrGcV0/Z 15E7MMinpTn8Qb5vWzG2JuBa+w/LCz3LrrscFqTLM+tU58OQZBWmq+cxYFyjL16Aj/iz lDOXLonHL/BM6Uzq5EmF8vuYUPgRrK/E0RE+ctBOzNSYr28MgDIr9AZlC9vrbN9+u3QF ROm3AQkttBgcz9scOb6WuEF3BV/1HuiN755LGDwju0Zm3PX4ClBgmRtimT9uOz5mUEBk RE5A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:dkim-signature; bh=OP/IorpMEPaYCSeI9noOVqFaOql+UUAA/5aBbuRUBgs=; fh=pU/YQDpoPCd9QNe7O05so17AZ7n5roNZPbL29ASaKFY=; b=Iop0JVXE9dsjvOFAp0JKhi3VKTCymTLGMqFK6GSPxaLzv3qnYfujVCWF/qTkWGNxrA X4mCVDYHVDTYI44ZmdT5kDy+Y9yAuh3dImDen34FYE63zYgsCuW+uxaLhR2VgSh0WfLX thIljUXLYYLQEbIcwammesqpfarZV5MMF8AkYY/1TvXulMOvIDSnJhnf52fLIj0LANOi OIE9gl7bGk4Ngnxjnwp+qskAGjijwdqVlvcGOvTO0iOAWqaKBfUDIU2Dq85Xc3HsB/QG lV4/9OifoWQ9sjCRIakM0bw9KbcgC5MfGYi7Em9mqh7Sf6uCk5rUbWD9gD8rUnzXLGbi w5og==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=WhPGom5Q; arc=pass (i=1 spf=pass spfdomain=flex--jackmanb.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-127972-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-127972-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id g12-20020a17090adb0c00b002a20c1d99b0si9885139pjv.26.2024.04.02.05.51.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Apr 2024 05:51:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-127972-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=WhPGom5Q; arc=pass (i=1 spf=pass spfdomain=flex--jackmanb.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-127972-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-127972-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id A7F3F2842DA for ; Tue, 2 Apr 2024 12:51:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0C4C47E796; Tue, 2 Apr 2024 12:51:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="WhPGom5Q" Received: from mail-wr1-f74.google.com (mail-wr1-f74.google.com [209.85.221.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7F94F2A8E5 for ; Tue, 2 Apr 2024 12:51:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.74 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712062280; cv=none; b=CNOT6vIMBnTvQsyqDITZFjFSQXvISngOv7GCFQeRTVvR+GCClZa+oBbe/Nb6iKCT58rREwISZmIaykTIt9JZPhC+TYniX76jSYRAx/LXiy/ulLKg48anj6/0fsfjhe5GcXuhvzqE/NJpyRHJDHK4qKeN104LPBXuJrKaKekopxY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712062280; c=relaxed/simple; bh=oElAllZ5P13j3PQNwwFCGQdwmNrFpD3NdwRGZk5W9/I=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=GqxeP+556Na+jNelgZdYN/3d/t0cWDT1/cleWJTtLYP6r+U7UMwYsOG4rgAQrlC+3AZ5pysDnLv6aKhdansSuFWb72wblc4GAOMaBMs91kMpV5pO4VJLMylgbvazDfLn0ZUCZcMwTiTUNfNM3W72Dn11HuexiVLqGEsX2OPDFiw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--jackmanb.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=WhPGom5Q; arc=none smtp.client-ip=209.85.221.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--jackmanb.bounces.google.com Received: by mail-wr1-f74.google.com with SMTP id ffacd0b85a97d-34368c5cadfso331903f8f.3 for ; Tue, 02 Apr 2024 05:51:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1712062277; x=1712667077; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=OP/IorpMEPaYCSeI9noOVqFaOql+UUAA/5aBbuRUBgs=; b=WhPGom5Qr05vODwOwaTYza70q//55pTRbPI01HS8jbimMeTxtWmnoS+wa3UUP1vfxy yjcglvuj33MbRRaOQ4vNvnz+Ogdgo92XuhJnsVJusT6ja+5zZUo4ZKifDjzGq84KdFVg O5lYvddvGLi38WF6OGEoQUzipfE+p3CjRRlskuQUdur07wzgw2VBZxvN5pereZaO+kcX toOUvA3rvvXqMcBcW+UhWMvJ1Ae+EPNaAb7c8qFGwL927A9Dfe+K0iP6M0QdE+XWyPg+ +/WpFfj5/Y1bgoRrRtYPdhD1WQukpLbEwyejUfDeCk3/T4GQaiE1izvbNZV9r1ytRtT7 Ip9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712062277; x=1712667077; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=OP/IorpMEPaYCSeI9noOVqFaOql+UUAA/5aBbuRUBgs=; b=jjHEfq4xPsWi8hGnp3NuKm7GN7s+ixp92X0cbIRw9ASqOghewDJ/dhN2Cq9xBHb2uk k2A8wG2XlYC4EXnjR6Gb0c9PMEAuHqlansqkMl2U7DMB2OwJOc5WspZT9t6ESNMHM2Az Zz02r0aOzQeOgLaX40pdMHNC1HgSZXYhbt2aPI0BLRMHrQZpHux4D7luUUZD5qozY0y/ aW2cLD05GScsF1k0ffIavsUYhJVyTfkQ82lMCEjkyeBPOPIGxLjxmgvcFM6sezXbqAzD sOt1q070ggsefV10lSazpirJhSVWbwrxds3/4eDa+9102hpFfV42n1VbMnEAMgBkjMjb q+YA== X-Forwarded-Encrypted: i=1; AJvYcCWSI5fQmX3Jhka2HIKDmULSfYNCTpL45wM75Hn1K6aNlLx8gt9IH0Qbx0oHSYPU7HX4iZlZZv7XRd1gx6vDl2CViGyvczw1/DViSwsc X-Gm-Message-State: AOJu0YwJsHSNrlj3mWt7J49yPvVsiFCAQmzZrBI3/MDpRb8L7cu444kr sOb7IQ5yb5CX+ij4LpHbomETINnieWx/w6vqnG1MTRDBnZJ12IYEcpke+o/FZm2s5DHwHtZ6Ns1 wmG4ekc1nwQ== X-Received: from beeg.c.googlers.com ([fda3:e722:ac3:cc00:28:9cb1:c0a8:11db]) (user=jackmanb job=sendgmr) by 2002:a5d:6608:0:b0:33e:d4b6:eac3 with SMTP id n8-20020a5d6608000000b0033ed4b6eac3mr28105wru.6.1712062276866; Tue, 02 Apr 2024 05:51:16 -0700 (PDT) Date: Tue, 2 Apr 2024 12:51:09 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog Message-ID: <20240402125109.1251232-1-jackmanb@google.com> Subject: [PATCH v2] Documentation: kunit: Clarify test filter format From: Brendan Jackman To: linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Daniel Latypov Cc: Brendan Higgins , davidgow@google.com, rmoar@google.com, corbet@lwn.net, Brendan Jackman Content-Type: text/plain; charset="UTF-8" It seems obvious once you know, but at first I didn't realise that the suite name is part of this format. Document it and add some examples. Signed-off-by: Brendan Jackman --- v1->v2: Expanded to clarify that suite_glob and test_glob are two separate patterns. Also made some other trivial changes to formatting etc. Documentation/dev-tools/kunit/run_wrapper.rst | 33 +++++++++++++++++-- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/Documentation/dev-tools/kunit/run_wrapper.rst b/Documentation/dev-tools/kunit/run_wrapper.rst index 19ddf5e07013..b07252d3fa9d 100644 --- a/Documentation/dev-tools/kunit/run_wrapper.rst +++ b/Documentation/dev-tools/kunit/run_wrapper.rst @@ -156,12 +156,39 @@ Filtering tests =============== By passing a bash style glob filter to the ``exec`` or ``run`` -commands, we can run a subset of the tests built into a kernel . For -example: if we only want to run KUnit resource tests, use: +commands, we can run a subset of the tests built into a kernel, +identified by a string like ``[.]``. + +For example, to run the ``kunit-resource-test`` suite: + +.. code-block:: + + ./tools/testing/kunit/kunit.py run kunit-resource-test + +To run a specific test from that suite: + +.. code-block:: + + ./tools/testing/kunit/kunit.py run kunit-resource-test.kunit_resource_test + +To run all tests from suites whose names start with ``kunit``: + +.. code-block:: + + ./tools/testing/kunit/kunit.py run 'kunit*' + +To run all tests whose name ends with ``remove_resource``: + +.. code-block:: + + ./tools/testing/kunit/kunit.py run '*.*remove_resource' + +To run all tests whose name ends with ``remove_resource``, from suites whose +names start with ``kunit``: .. code-block:: - ./tools/testing/kunit/kunit.py run 'kunit-resource*' + ./tools/testing/kunit/kunit.py run 'kunit*.*remove_resource' This uses the standard glob format with wildcard characters. -- 2.44.0.478.gd926399ef9-goog