Re: [ovs-dev] [PATCH v2 2/2] checkpatch.at: Add cases to verify skip committer check.

2023-11-16 Thread Eelco Chaudron



On 5 Nov 2023, at 9:38, Roi Dayan wrote:

> First case without the skip flag should fail.
> Second case uses the skip flag and should pass.
>
> Signed-off-by: Roi Dayan 
> ---

Thanks for adding the testcase.

Acked-by: Eelco Chaudron 

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH v2 2/2] checkpatch.at: Add cases to verify skip committer check.

2023-11-05 Thread Roi Dayan via dev
First case without the skip flag should fail.
Second case uses the skip flag and should pass.

Signed-off-by: Roi Dayan 
---
 tests/checkpatch.at | 26 +++---
 1 file changed, 23 insertions(+), 3 deletions(-)

diff --git a/tests/checkpatch.at b/tests/checkpatch.at
index 4f6b0c7b36bf..caab2817bd94 100755
--- a/tests/checkpatch.at
+++ b/tests/checkpatch.at
@@ -1,7 +1,7 @@
 AT_BANNER([checkpatch])
 
 OVS_START_SHELL_HELPERS
-# try_checkpatch PATCH [ERRORS]
+# try_checkpatch PATCH [ERRORS] [checkpatch-args]
 #
 # Runs checkpatch, if installed, on the given PATCH, expecting the
 # specified set of ERRORS (and warnings).
@@ -29,11 +29,11 @@ Subject: Patch this is.
 fi
 
 if test -s expout; then
-AT_CHECK([$PYTHON3 $top_srcdir/utilities/checkpatch.py -q test.patch],
+AT_CHECK([$PYTHON3 $top_srcdir/utilities/checkpatch.py $3 -q 
test.patch],
  [1], [stdout])
 AT_CHECK([sed '/^Lines checked:/,$d' stdout], [0], [expout])
 else
-AT_CHECK([$PYTHON3 $top_srcdir/utilities/checkpatch.py -q test.patch])
+AT_CHECK([$PYTHON3 $top_srcdir/utilities/checkpatch.py $3 -q 
test.patch])
 fi
 }
 OVS_END_SHELL_HELPERS
@@ -589,3 +589,23 @@ try_checkpatch \
 Subject: netdev: This is a way to long commit summary and therefor it 
should report a WARNING!"
 
 AT_CLEANUP
+
+AT_SETUP([checkpatch - ignore committer as signoff])
+try_checkpatch \
+   "Author: A
+Commit: B
+Subject: netdev: Subject.
+
+Signed-off-by: A" \
+"ERROR: Committer B needs to sign off."
+
+try_checkpatch \
+   "Author: A
+Commit: B
+Subject: netdev: Subject.
+
+Signed-off-by: A" \
+"" \
+"--skip-committer-signoff"
+
+AT_CLEANUP
-- 
2.40.1

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev