From: Nikolai Kondrashov <Nikolai.Kondrashov@redhat.com>
To: workflows@vger.kernel.org, Jonathan Corbet <corbet@lwn.net>,
Joe Perches <joe@perches.com>, Andy Whitcroft <apw@canonical.com>,
Theodore Ts'o <tytso@mit.edu>, David Gow <davidgow@google.com>,
Steven Rostedt <rostedt@goodmis.org>,
Mark Brown <broonie@kernel.org>,
Shuah Khan <skhan@linuxfoundation.org>,
"Darrick J . Wong" <djwong@kernel.org>
Cc: kunit-dev@googlegroups.com, linux-kselftest@vger.kernel.org,
Veronika Kabatova <vkabatov@redhat.com>,
CKI <cki-project@redhat.com>,
kernelci@lists.linux.dev,
Nikolai Kondrashov <Nikolai.Kondrashov@redhat.com>
Subject: [RFC PATCH v2 02/10] MAINTAINERS: Introduce V: entry for tests
Date: Tue, 5 Dec 2023 20:02:58 +0200 [thread overview]
Message-ID: <20231205184503.79769-3-Nikolai.Kondrashov@redhat.com> (raw)
In-Reply-To: <20231205184503.79769-1-Nikolai.Kondrashov@redhat.com>
Introduce a new 'V:' ("Verify") entry to MAINTAINERS. The entry accepts
a test suite command which is proposed to be executed for each
contribution to the subsystem.
Extend scripts/get_maintainer.pl to support retrieving the V: entries
when '--test' option is specified.
Require the entry values to not contain the '@' character, so they could
be distinguished from emails (always) output by get_maintainer.pl. Make
scripts/checkpatch.pl check that they don't.
Update entry ordering in both scripts/checkpatch.pl and
scripts/parse-maintainers.pl.
Signed-off-by: Nikolai Kondrashov <Nikolai.Kondrashov@redhat.com>
---
Documentation/process/submitting-patches.rst | 18 ++++++++++++++++++
MAINTAINERS | 7 +++++++
scripts/checkpatch.pl | 10 +++++++++-
scripts/get_maintainer.pl | 17 +++++++++++++++--
scripts/parse-maintainers.pl | 3 ++-
5 files changed, 51 insertions(+), 4 deletions(-)
diff --git a/Documentation/process/submitting-patches.rst b/Documentation/process/submitting-patches.rst
index 86d346bcb8ef0..f034feaf1369e 100644
--- a/Documentation/process/submitting-patches.rst
+++ b/Documentation/process/submitting-patches.rst
@@ -228,6 +228,24 @@ You should be able to justify all violations that remain in your
patch.
+Test your changes
+-----------------
+
+Test the patch to the best of your ability. Check the MAINTAINERS file for the
+subsystem(s) you are changing to see if there are any **V:** entries
+proposing particular test suite commands. E.g.::
+
+ V: tools/testing/kunit/run_checks.py
+
+Supplying the ``--test`` option to ``scripts/get_maintainer.pl`` adds **V:**
+entries to its output.
+
+Execute the commands, if any, to test your changes.
+
+All commands must be executed from the root of the source tree. Each command
+outputs usage information, if an -h/--help option is specified.
+
+
Select the recipients for your patch
------------------------------------
diff --git a/MAINTAINERS b/MAINTAINERS
index 788be9ab5b733..e6d0777e21657 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -59,6 +59,13 @@ Descriptions of section entries and preferred order
matches patches or files that contain one or more of the words
printk, pr_info or pr_err
One regex pattern per line. Multiple K: lines acceptable.
+ V: *Test suite* proposed for execution. The command that could be
+ executed to verify changes to the maintained subsystem.
+ Must be executed from the root of the source tree.
+ Must support the -h/--help option.
+ Cannot contain '@' character.
+ V: tools/testing/kunit/run_checks.py
+ One test suite per line.
Maintainers List
----------------
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 25fdb7fda1128..a184e576c980b 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3657,7 +3657,7 @@ sub process {
}
}
# check MAINTAINERS entries for the right ordering too
- my $preferred_order = 'MRLSWQBCPTFXNK';
+ my $preferred_order = 'MRLSWQBCPVTFXNK';
if ($rawline =~ /^\+[A-Z]:/ &&
$prevrawline =~ /^[\+ ][A-Z]:/) {
$rawline =~ /^\+([A-Z]):\s*(.*)/;
@@ -3683,6 +3683,14 @@ sub process {
}
}
}
+# check MAINTAINERS V: entries are valid
+ if ($rawline =~ /^\+V:\s*(.*)/) {
+ my $name = $1;
+ if ($name =~ /@/) {
+ ERROR("TEST_PROPOSAL_INVALID",
+ "Test proposal cannot contain '\@' character\n" . $herecurr);
+ }
+ }
}
if (($realfile =~ /Makefile.*/ || $realfile =~ /Kbuild.*/) &&
diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index 37901c2298388..804215a7477db 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -53,6 +53,7 @@ my $output_section_maxlen = 50;
my $scm = 0;
my $tree = 1;
my $web = 0;
+my $test = 0;
my $subsystem = 0;
my $status = 0;
my $letters = "";
@@ -270,6 +271,7 @@ if (!GetOptions(
'scm!' => \$scm,
'tree!' => \$tree,
'web!' => \$web,
+ 'test!' => \$test,
'letters=s' => \$letters,
'pattern-depth=i' => \$pattern_depth,
'k|keywords!' => \$keywords,
@@ -319,13 +321,14 @@ if ($sections || $letters ne "") {
$status = 0;
$subsystem = 0;
$web = 0;
+ $test = 0;
$keywords = 0;
$keywords_in_file = 0;
$interactive = 0;
} else {
- my $selections = $email + $scm + $status + $subsystem + $web;
+ my $selections = $email + $scm + $status + $subsystem + $web + $test;
if ($selections == 0) {
- die "$P: Missing required option: email, scm, status, subsystem or web\n";
+ die "$P: Missing required option: email, scm, status, subsystem, web or test\n";
}
}
@@ -634,6 +637,7 @@ my %hash_list_to;
my @list_to = ();
my @scm = ();
my @web = ();
+my @test = ();
my @subsystem = ();
my @status = ();
my %deduplicate_name_hash = ();
@@ -665,6 +669,11 @@ if ($web) {
output(@web);
}
+if ($test) {
+ @test = uniq(@test);
+ output(@test);
+}
+
exit($exit);
sub self_test {
@@ -850,6 +859,7 @@ sub get_maintainers {
@list_to = ();
@scm = ();
@web = ();
+ @test = ();
@subsystem = ();
@status = ();
%deduplicate_name_hash = ();
@@ -1072,6 +1082,7 @@ MAINTAINER field selection options:
--status => print status if any
--subsystem => print subsystem name if any
--web => print website(s) if any
+ --test => print test(s) if any
Output type options:
--separator [, ] => separator for multiple entries on 1 line
@@ -1382,6 +1393,8 @@ sub add_categories {
push(@scm, $pvalue . $suffix);
} elsif ($ptype eq "W") {
push(@web, $pvalue . $suffix);
+ } elsif ($ptype eq "V") {
+ push(@test, $pvalue . $suffix);
} elsif ($ptype eq "S") {
push(@status, $pvalue . $suffix);
}
diff --git a/scripts/parse-maintainers.pl b/scripts/parse-maintainers.pl
index 2ca4eb3f190d6..dbc2b79bcaa46 100755
--- a/scripts/parse-maintainers.pl
+++ b/scripts/parse-maintainers.pl
@@ -44,6 +44,7 @@ usage: $P [options] <pattern matching regexes>
B: URI for bug tracking/submission
C: URI for chat
P: URI or file for subsystem specific coding styles
+ V: Test suite name
T: SCM tree type and location
F: File and directory pattern
X: File and directory exclusion pattern
@@ -73,7 +74,7 @@ sub by_category($$) {
sub by_pattern($$) {
my ($a, $b) = @_;
- my $preferred_order = 'MRLSWQBCPTFXNK';
+ my $preferred_order = 'MRLSWQBCPVTFXNK';
my $a1 = uc(substr($a, 0, 1));
my $b1 = uc(substr($b, 0, 1));
--
2.42.0
next prev parent reply other threads:[~2023-12-05 18:45 UTC|newest]
Thread overview: 72+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-15 17:43 [RFC PATCH 0/3] MAINTAINERS: Introduce V: field for required tests Nikolai Kondrashov
2023-11-15 17:43 ` [PATCH 1/3] " Nikolai Kondrashov
2023-11-15 18:31 ` Joe Perches
2023-11-15 20:01 ` Mark Brown
2023-11-16 12:00 ` Nikolai Kondrashov
2023-11-15 20:14 ` Mark Brown
2023-11-16 12:09 ` Nikolai Kondrashov
2023-11-15 20:38 ` Konstantin Ryabitsev
2023-11-16 12:14 ` Nikolai Kondrashov
2023-11-16 13:26 ` Mark Brown
2023-11-16 13:52 ` Nikolai Kondrashov
2023-11-20 12:40 ` Gustavo Padovan
2023-11-20 13:31 ` Mark Brown
2023-11-22 17:41 ` Nikolai Kondrashov
2023-11-16 13:20 ` Bagas Sanjaya
2023-11-16 13:41 ` Nikolai Kondrashov
2023-11-16 13:43 ` Bagas Sanjaya
2023-11-16 13:59 ` Greg Kroah-Hartman
2023-11-16 14:21 ` Geert Uytterhoeven
2023-11-20 13:30 ` Ricardo Cañuelo
2023-11-20 20:51 ` Theodore Ts'o
2023-11-20 22:27 ` Mark Brown
2023-11-21 6:04 ` Theodore Ts'o
2023-11-21 10:37 ` David Gow
2023-11-21 13:27 ` Mark Brown
2023-11-22 16:16 ` Theodore Ts'o
2023-11-21 18:24 ` Nikolai Kondrashov
2023-11-21 18:02 ` Nikolai Kondrashov
2023-11-21 10:36 ` David Gow
2023-11-21 20:48 ` Mark Brown
2023-11-22 17:19 ` Nikolai Kondrashov
2023-11-22 1:08 ` kernel test robot
2023-11-15 17:43 ` [PATCH 2/3] MAINTAINERS: Require kvm-xfstests smoke for ext4 Nikolai Kondrashov
2023-11-15 18:58 ` Darrick J. Wong
2023-11-16 16:33 ` Nikolai Kondrashov
2023-11-17 7:09 ` Chandan Babu R
2023-11-19 22:54 ` Theodore Ts'o
2023-11-22 14:44 ` Nikolai Kondrashov
2023-11-22 16:17 ` Darrick J. Wong
2023-11-22 17:44 ` Nikolai Kondrashov
2023-11-22 20:51 ` Dave Chinner
2023-11-15 17:43 ` [PATCH 3/3] MAINTAINERS: Require kunit core tests for framework changes Nikolai Kondrashov
2023-11-20 18:48 ` Daniel Latypov
2023-11-22 17:38 ` Nikolai Kondrashov
2023-12-05 18:02 ` [RFC PATCH v2 00/10] MAINTAINERS: Introduce V: entry for tests Nikolai Kondrashov
2023-12-05 18:02 ` [RFC PATCH v2 01/10] get_maintainer: Survive querying missing files Nikolai Kondrashov
2023-12-05 18:55 ` Joe Perches
2023-12-06 16:16 ` Nikolai Kondrashov
2024-01-31 13:55 ` Nikolai Kondrashov
2023-12-05 18:02 ` Nikolai Kondrashov [this message]
2023-12-05 18:58 ` [RFC PATCH v2 02/10] MAINTAINERS: Introduce V: entry for tests Joe Perches
2023-12-06 16:21 ` Nikolai Kondrashov
2023-12-06 8:12 ` David Gow
2023-12-06 16:23 ` Nikolai Kondrashov
2023-12-06 16:38 ` Joe Perches
2023-12-06 16:57 ` Nikolai Kondrashov
2023-12-05 18:02 ` [RFC PATCH v2 03/10] MAINTAINERS: Propose kunit core tests for framework changes Nikolai Kondrashov
2023-12-05 18:03 ` [RFC PATCH v2 04/10] docs: submitting-patches: Introduce Tested-with: Nikolai Kondrashov
2023-12-05 18:59 ` Jonathan Corbet
2023-12-05 19:07 ` Joe Perches
2023-12-06 10:07 ` Geert Uytterhoeven
2023-12-06 16:46 ` Nikolai Kondrashov
2023-12-06 16:31 ` Nikolai Kondrashov
2023-12-05 18:03 ` [RFC PATCH v2 05/10] checkpatch: Propose tests to execute Nikolai Kondrashov
2023-12-05 18:03 ` [RFC PATCH v2 06/10] MAINTAINERS: Support referencing test docs in V: Nikolai Kondrashov
2023-12-06 8:03 ` David Gow
2023-12-06 16:54 ` Nikolai Kondrashov
2023-12-05 18:03 ` [RFC PATCH v2 07/10] MAINTAINERS: Propose kvm-xfstests smoke for ext4 Nikolai Kondrashov
2023-12-05 18:03 ` [RFC PATCH v2 08/10] docs: tests: Document kunit in general Nikolai Kondrashov
2023-12-05 18:03 ` [RFC PATCH v2 09/10] MAINTAINERS: Propose kunit tests for regmap Nikolai Kondrashov
2023-12-05 18:03 ` [RFC PATCH v2 10/10] MAINTAINERS: Add proposal strength to V: entries Nikolai Kondrashov
2024-01-08 10:42 ` [RFC PATCH v2 00/10] MAINTAINERS: Introduce V: entry for tests Nikolai Kondrashov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231205184503.79769-3-Nikolai.Kondrashov@redhat.com \
--to=nikolai.kondrashov@redhat.com \
--cc=apw@canonical.com \
--cc=broonie@kernel.org \
--cc=cki-project@redhat.com \
--cc=corbet@lwn.net \
--cc=davidgow@google.com \
--cc=djwong@kernel.org \
--cc=joe@perches.com \
--cc=kernelci@lists.linux.dev \
--cc=kunit-dev@googlegroups.com \
--cc=linux-kselftest@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=skhan@linuxfoundation.org \
--cc=tytso@mit.edu \
--cc=vkabatov@redhat.com \
--cc=workflows@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox