summaryrefslogtreecommitdiff
path: root/tests/checkpatch.at
diff options
context:
space:
mode:
authorIlya Maximets <i.maximets@samsung.com>2019-08-09 14:53:29 +0300
committerIlya Maximets <i.maximets@samsung.com>2019-08-12 10:56:35 +0300
commitaacad8685e3d873d15d7fc7974763655862477de (patch)
tree596b07561aa5f041a3093633dd20b814f55d9c24 /tests/checkpatch.at
parent05629ed271a67c737227a92f35bcff199648d604 (diff)
downloadopenvswitch-aacad8685e3d873d15d7fc7974763655862477de.tar.gz
checkpatch: Fix regexp for if, while, etc inside macros.
This allows to use a one-character expression inside the 'if' statement and multiple spaces before the line continuation character. Fixes false positive in case like this: #define MACRO(ARG) \ if (a) { \ do_work(ARG); \ } Fixes: 16770c6d9179 ("checkpatch: support macro continuation") Signed-off-by: Ilya Maximets <i.maximets@samsung.com> Acked-by: Aaron Conole <aconole@redhat.com>
Diffstat (limited to 'tests/checkpatch.at')
-rwxr-xr-xtests/checkpatch.at5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/checkpatch.at b/tests/checkpatch.at
index f3b26dd34..fe21acdf2 100755
--- a/tests/checkpatch.at
+++ b/tests/checkpatch.at
@@ -230,6 +230,11 @@ try_checkpatch \
"COMMON_PATCH_HEADER
+ $ctr (first_run) { \\
"
+
+try_checkpatch \
+ "COMMON_PATCH_HEADER
+ + $ctr (a) { \\
+ "
done
AT_CLEANUP