lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250721162437.6691-3-ignacio.pena87@gmail.com>
Date: Mon, 21 Jul 2025 12:24:34 -0400
From: Ignacio Peña <ignacio.pena87@...il.com>
To: Joe Perches <joe@...ches.com>,
	Andy Whitcroft <apw@...onical.com>
Cc: Dwaipayan Ray <dwaipayanray1@...il.com>,
	Lukas Bulwahn <lukas.bulwahn@...il.com>,
	linux-kernel@...r.kernel.org,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Ignacio Pena <ignacio.pena87@...il.com>
Subject: [PATCH 3/3] checkpatch: suggest including testing evidence

For non-trivial changes, it's valuable to know how the change was
tested. Add a gentle suggestion when commit messages don't mention
any testing, verification, or validation.

This is a CHECK level notification, not a WARNING, as testing methods
vary greatly depending on the subsystem and type of change.

The check is skipped for very short commit messages (documentation
fixes, typos) where testing information would be excessive.

Link: https://docs.kernel.org/process/submitting-patches.html
Suggested-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Signed-off-by: Ignacio Pena <ignacio.pena87@...il.com>
---
 scripts/checkpatch.pl | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 204800232..358310e6c 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3319,6 +3319,16 @@ sub process {
 		      $commit_log_possible_stack_dump)) {
 			WARN("COMMIT_LOG_LONG_LINE",
 			     "Prefer a maximum 75 chars per line (possible unwrapped commit description?)\n" . $herecurr);
+
+# Suggest including test information for non-trivial changes
+		if ($in_commit_log && !$non_utf8_charset &&
+		    $line !~ /test|verify|tried|ran|checked|confirmed/i &&
+		    $commit_log_lines > 3) {
+			if ($commit_log_long_line eq "" && $commit_log_has_diff) {
+				CHECK("NO_TEST_INFO",
+				      "Consider mentioning how this change was tested\n" . $herecurr);
+			}
+		}
 			$commit_log_long_line = 1;
 		}
 
-- 
2.50.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ