Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp1954623lqz; Tue, 2 Apr 2024 02:52:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW0u1LFISl+64oHpsJ3U5OxN1ttrsrXeQC2MelSVckXv5SP2bHOlI4R57oLBrMAHeS/Y+7IeiHpsSkmtaoJvWIREOq4tlWbaHHu3S1dlQ== X-Google-Smtp-Source: AGHT+IH+sOKG5S6X4E9e1ixivp3YZ+159fUG0Av5QGfTDK/o31Y/J1pMaDtNkKoFsHkC/bJpWTWj X-Received: by 2002:ac8:5909:0:b0:431:441a:c81d with SMTP id 9-20020ac85909000000b00431441ac81dmr16474896qty.10.1712051558904; Tue, 02 Apr 2024 02:52:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712051558; cv=pass; d=google.com; s=arc-20160816; b=bvTFByYWU4kOevFb+0OX6Cl3+iHztVJrv77aGgvaNeJIvRV7qzExzHXi4egmJPnliM 0xdaoU+3EDbL0GvwZxZOplRfY8rvijsOX7WgTvt81hf/oGVff+SCzqkbTCqope9KUl2Q TI0lXhgiLRSI3DZIE6KOin2tm4qWqJv3CuGLpvn0AY3fs0n+SDhsK3uVVn2SpV7migWk ZgaYTQAy8WDhIn2XwIPBsGJJVST01DBA1QhKM9BibmdmJE9zOItKkLPINUjXyq/qTn+E F1O749cTnKHC2EDhf8Rdm73NrkcSeZMEXPy/BBIYUdI+FssQduug5NGv2ukBHwB3nutN Gg+w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=WEX73cwwZrQ/BwJdhWVvfWhSUyNTeLuyTP3JLeqfiAw=; fh=XLSouyHoGWObVd6wtG7VtjT6G9LJCr56sXr2IWuFjfs=; b=GProMuBcgx52cE78khSK732HooRcxFEhJpKhfIWPb+B99fcilaDLhFDGpaJpognc6r Y42TP2DttlGi5lCYsSKLY/Nf8fBXhirA9l7HgO5e2CYq7PzASMkptv82ddzZg0Fpurqr iC299NIgF5tR6YMu7A75Br/uxK6s+Yjsg93SZJZuFk9cONn8S1FkQv8mHh9ka3dVQahh cWH1vQBktr+LBi+HVU5gZpod99roJdiJacX0keRMWKjzNEzOF1SZBEnyNQCaIdIQOHmH 9t7xKmtnBr7y3M6m3z+JFHkvHNa63tFPN5lsLAxZcOczERH41ZgHUSl1NNK6Osi14xwd mVzw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=emt2sI61; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-127664-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-127664-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id e11-20020a05622a110b00b00430d4745b22si11417126qty.717.2024.04.02.02.52.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Apr 2024 02:52:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-127664-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=emt2sI61; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-127664-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-127664-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 9AA521C20DA5 for ; Tue, 2 Apr 2024 09:52:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D9BD159163; Tue, 2 Apr 2024 09:52:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="emt2sI61" Received: from mail-qt1-f175.google.com (mail-qt1-f175.google.com [209.85.160.175]) (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 9091658AC1 for ; Tue, 2 Apr 2024 09:52:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712051547; cv=none; b=cEhmyQk4ZK0Rx++EVFFZGtwzo1cb+VZKUB+R04F99Vp8cTlzgBmGjmwr9tV8Jnw0EPCX4VpfBSbT73AMwBU4c0/cC44Cpg2KOoew/46qPcEpQYeh4PAfu73slOaD0FMDZy7EZl9GY+xDMR8gr8iDbyfknHVQz9RGlu58X496JGU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712051547; c=relaxed/simple; bh=bWtclbWQ3n4Y/lHPPnDws80AG6Kx8b+JA2wbGmJqKLQ=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=mQPTNJnd2SURlWzDeQcTp/QiGxkBGVvgH7F5PZKyFDQ5fwu0DREBYMpBlYb5r2czobPx+mrGkeyg93xv5uXHgQiS64sljtMmrKFtLtP4rtZF9iF7QSTDZC77d7O5prbMYlKg1TeUhPTccKPuv+Hzx88BhxBHbh2gwYD5zzDmC0s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=emt2sI61; arc=none smtp.client-ip=209.85.160.175 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=google.com Received: by mail-qt1-f175.google.com with SMTP id d75a77b69052e-42ee0c326e8so932011cf.0 for ; Tue, 02 Apr 2024 02:52:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1712051544; x=1712656344; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=WEX73cwwZrQ/BwJdhWVvfWhSUyNTeLuyTP3JLeqfiAw=; b=emt2sI61SknS3BQuwNdzzw8d17XUWeKcXEf/DlQAfsa1L3O4h7cfUpyP/4AjfBDDa1 TlcMBEORQFLobnjlbzxWT4ELapUJwVQJjtpzdQcZHB3Q46zxWy4Az9ugoTGQZhkhfVkK fu6q+N8M8Dd+KbY/ZNe36zz6BfcrX54ImraleFzQ0+6sFBZFnNRRKLNN52fMi8QMMsbE n4A21EyLLit6H+E2SMuJD8AYDR8r+9K5dMJZZw5BfBwiqYSktrLWA6rXlNwOXeloGmIS 5rMuDAm7UxKP2C0Wmzup7+Uo3sU7m4iY2dkiK8BrQZeppS2AaI32+KhqnmWiG/WhZ2LP TmEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712051544; x=1712656344; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=WEX73cwwZrQ/BwJdhWVvfWhSUyNTeLuyTP3JLeqfiAw=; b=dhkhA86NpZXSsKCtOBRxx5orTU8NCooWFAJUpwu3ite5AYURvRaBYj0iN6mBvw9o+2 JEVy0aIXi+7cdAUxxxMUUKoRvrJfEAIMAHtCuRKM3RCLcAc+p/tbzxSMO5uwBAyIvy3o mwIdKUKLYa62aNOZ3NTE9JnIM4kD9ZA5dnhKsgIfO1QbsTAjmuMb7T73NimN66zvOimx EFM4ZaNPEjONBwFVk97mHZdchnuHQprEPTlP/8V1cdtaHN2fxbwYqLVrFSF0U2iWKxvI 9SNb8FLMH12hZBiZKWDxMlaZTWSIFds2PUs/5pGEtsreRhVUq/dWqxfQiC5pyj6oujU1 7xjQ== X-Forwarded-Encrypted: i=1; AJvYcCW3nXY7gj8ROlCMa2w1kKejLP7J7cUj5PlgzaI84oJ+eTJe5e+c76bNN8j9HV4GIpX3Ev6YbfmJ4WKGdFTW4KSARonX6QUbIvOdLdBt X-Gm-Message-State: AOJu0Ywd99WruFpAGsvp8jMNTz7VNmYt5jS2/a1x91sEitsgiAXc1I/8 puaC9mIFMNqFoNG1O3z2koJ8Y0bKLCUnzpQ4EeIZHgVBRtGh2HxW8wQlS6fw3JNI9FRIt/bQFCR deVSIgbdK4PSP5kNBkdoGq5rMxplL/6NupuRG X-Received: by 2002:a05:622a:6188:b0:431:5dd4:a67e with SMTP id hh8-20020a05622a618800b004315dd4a67emr801320qtb.14.1712051543372; Tue, 02 Apr 2024 02:52:23 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240328142004.2144568-1-jackmanb@google.com> In-Reply-To: From: Brendan Jackman Date: Tue, 2 Apr 2024 11:52:10 +0200 Message-ID: Subject: Re: [PATCH] Documentation: kunit: Clarify test filter format To: Daniel Latypov Cc: linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Brendan Higgins , davidgow@google.com, rmoar@google.com, corbet@lwn.net Content-Type: text/plain; charset="UTF-8" On Thu, 28 Mar 2024 at 19:27, Daniel Latypov wrote: > This current wording and examples (before and after this change) might > make the user think otherwise, i.e. that it works like > effective_name = suite_name + '.' + test_name > return glob_matches(effective_name, filter_glob) > > E.g. given a test name like `suite.test_name` and glob='suite*name' > they might expect it to match, but it does *not*. > > The logic actually works like: > suite_glob, test_glob = split(filter_glob) > if not_glob_matches(suite_name, suite_glob): > return False > if test_glob and not glob_matches(test_name, test_glob): > return False > return True > > Perhaps expanding the list of examples to cover more of the edge cases > could help get the right intuition? > > E.g. perhaps these: > kunit.py run # runs all tests in a specific suite > kunit.py run . # run a specific test > > kunit.py run suite_prefix* # what the current example shows > kunit.py run *.*test_suffix # matches all suites, only tests w/ a > certain suffix > kunit.py run suite_prefix*.*test_suffix # combined version of above > > Thoughts? Thanks yeah, good point. The result is pretty verbose but it doesn't create much cognitive load for the reader so might as well just be really explicit. v2 incoming if `make htmldocs` ever finishes....