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>] [day] [month] [year] [list]
Message-ID: <20250228170530.950268-2-guillaume1.gomez@gmail.com>
Date: Fri, 28 Feb 2025 18:05:31 +0100
From: Guillaume Gomez <guillaume1.gomez@...il.com>
To: ojeda@...nel.org,
	rust-for-linux@...r.kernel.org,
	linux-kernel@...r.kernel.org
Cc: Guillaume Gomez <guillaume1.gomez@...il.com>
Subject: [PATCH 1/1] Improve error message in case the original file name from which the doctest was generated from to mention the doctest file path.

In case the conversion fail, it will allow to get directly the file name
triggering this bug, making the bug fixing process faster.

Signed-off-by: Guillaume Gomez <guillaume1.gomez@...il.com>
---
 scripts/rustdoc_test_gen.rs | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/scripts/rustdoc_test_gen.rs b/scripts/rustdoc_test_gen.rs
index 5ebd42ae4..12115979e 100644
--- a/scripts/rustdoc_test_gen.rs
+++ b/scripts/rustdoc_test_gen.rs
@@ -87,8 +87,8 @@ fn find_candidates(
 
     assert!(
         valid_paths.len() > 0,
-        "No path candidates found. This is likely a bug in the build system, or some files went \
-        away while compiling."
+        "No path candidates found for `{file}`. This is likely a bug in the build system, or some \
+        files went away while compiling.",
     );
 
     if valid_paths.len() > 1 {
@@ -97,8 +97,8 @@ fn find_candidates(
             eprintln!("    {path:?}");
         }
         panic!(
-            "Several path candidates found, please resolve the ambiguity by renaming a file or \
-            folder."
+            "Several path candidates found for `{file}`, please resolve the ambiguity by renaming \
+            a file or folder."
         );
     }
 
-- 
2.48.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ