diff mbox series

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

Message ID 20231105083810.797749-3-roid@nvidia.com
State Accepted, archived
Delegated to: Simon Horman
Headers show
Series Add argument to skip committer signoff check | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/intel-ovs-compilation success test: success

Commit Message

Roi Dayan Nov. 5, 2023, 8:38 a.m. UTC
First case without the skip flag should fail.
Second case uses the skip flag and should pass.

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

Comments

Eelco Chaudron Nov. 16, 2023, 8:45 a.m. UTC | #1
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 <roid@nvidia.com>
> ---

Thanks for adding the testcase.

Acked-by: Eelco Chaudron <echaudro@redhat.com>
diff mbox series

Patch

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