From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Shameerali Kolothum Thodi"
<shameerali.kolothum.thodi@huawei.com>,
"Stefan Hajnoczi" <stefanha@redhat.com>,
"Igor Mammedov" <imammedo@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: [PATCH 2/2] checkpatch: ignore allowed diff list
Date: Mon, 4 May 2020 07:59:00 -0400 [thread overview]
Message-ID: <20200504115848.34410-3-mst@redhat.com> (raw)
In-Reply-To: <20200504115848.34410-1-mst@redhat.com>
Allow changing allowed diff list at any point:
- when changing code under test
- when adding expected files
It's just a list of files so easy to review and merge anyway.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
scripts/checkpatch.pl | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index c3d08aa99f..0ba213e9f2 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1261,12 +1261,13 @@ sub WARN {
sub checkfilename {
my ($name, $acpi_testexpected, $acpi_nontestexpected) = @_;
- if ($name =~ m#^tests/data/acpi/# and
- # make exception for a shell script that rebuilds the files
- not $name =~ m#^\.sh$# or
- $name =~ m#^tests/qtest/bios-tables-test-allowed-diff.h$#) {
+ # Note: shell script that rebuilds the expected files is in the same
+ # directory as files themselves.
+ # Note: allowed diff list can be changed both when changing expected
+ # files and when changing tests.
+ if ($name =~ m#^tests/data/acpi/# and not $name =~ m#^\.sh$#) {
$$acpi_testexpected = $name;
- } else {
+ } elsif ($name =~ m#^tests/qtest/bios-tables-test-allowed-diff.h$#) {
$$acpi_nontestexpected = $name;
}
if (defined $$acpi_testexpected and defined $$acpi_nontestexpected) {
--
MST
next prev parent reply other threads:[~2020-05-04 12:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-04 11:58 [PATCH 0/2] checkpatch: fix handling of acpi expected files Michael S. Tsirkin
2020-05-04 11:58 ` [PATCH 1/2] checkpatch: fix acpi check with multiple file name Michael S. Tsirkin
2020-05-04 11:59 ` Michael S. Tsirkin [this message]
2020-05-05 5:08 ` [PATCH 0/2] checkpatch: fix handling of acpi expected files no-reply
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=20200504115848.34410-3-mst@redhat.com \
--to=mst@redhat.com \
--cc=imammedo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=shameerali.kolothum.thodi@huawei.com \
--cc=stefanha@redhat.com \
/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;
as well as URLs for NNTP newsgroup(s).