mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf.git
synced 2026-04-18 06:34:27 -04:00
rust: kunit: use kernel::{fmt,prelude::fmt!}
Reduce coupling to implementation details of the formatting machinery by avoiding direct use for `core`'s formatting traits and macros. Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Reviewed-by: Benno Lossin <lossin@kernel.org> Signed-off-by: Tamir Duberstein <tamird@gmail.com> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
This commit is contained in:
committed by
Miguel Ojeda
parent
e6aedde22d
commit
aa2417c1a5
@@ -202,7 +202,7 @@ pub extern "C" fn {kunit_name}(__kunit_test: *mut ::kernel::bindings::kunit) {{
|
||||
// This follows the syntax for declaring test metadata in the proposed KTAP v2 spec, which may
|
||||
// be used for the proposed KUnit test attributes API. Thus hopefully this will make migration
|
||||
// easier later on.
|
||||
::kernel::kunit::info(format_args!(" # {kunit_name}.location: {real_path}:{line}\n"));
|
||||
::kernel::kunit::info(fmt!(" # {kunit_name}.location: {real_path}:{line}\n"));
|
||||
|
||||
/// The anchor where the test code body starts.
|
||||
#[allow(unused)]
|
||||
|
||||
Reference in New Issue
Block a user