diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2020-05-04 07:47:17 -0400 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2020-05-04 10:25:02 -0400 |
commit | e11b06a880caa1630fcfdca7d2fc3c9e597792a1 (patch) | |
tree | e883d77c19cbd9a48e514225622551615a90c176 /scripts/checkpatch.pl | |
parent | e625ba2a413f2bfdbb71c71008b627fede20fcbb (diff) | |
download | qemu-e11b06a880caa1630fcfdca7d2fc3c9e597792a1.zip qemu-e11b06a880caa1630fcfdca7d2fc3c9e597792a1.tar.gz qemu-e11b06a880caa1630fcfdca7d2fc3c9e597792a1.tar.bz2 |
checkpatch: ignore allowed diff list
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>
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-x | scripts/checkpatch.pl | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index c3d08aa..0ba213e 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) { |