rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Boqun Feng <boqun.feng@gmail.com>
To: David Gow <davidgow@google.com>
Cc: "Miguel Ojeda" <ojeda@kernel.org>,
	"José Expósito" <jose.exposito89@gmail.com>,
	"Brendan Higgins" <brendan.higgins@linux.dev>,
	"Rae Moar" <rmoar@google.com>,
	"Alex Gaynor" <alex.gaynor@gmail.com>,
	"Gary Guo" <gary@garyguo.net>,
	"Benno Lossin" <benno.lossin@proton.me>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Matt Gilbride" <mattgilbride@google.com>,
	kunit-dev@googlegroups.com, linux-kselftest@vger.kernel.org,
	rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 2/3] rust: macros: add macro to easily run KUnit tests
Date: Fri, 1 Nov 2024 14:38:16 -0700	[thread overview]
Message-ID: <ZyVKSKUq_bKH5jn_@Boquns-Mac-mini.local> (raw)
In-Reply-To: <20241101064505.3820737-3-davidgow@google.com>

On Fri, Nov 01, 2024 at 02:45:01PM +0800, David Gow wrote:
[...]
> @@ -273,3 +275,11 @@ macro_rules! kunit_unsafe_test_suite {
>          };
>      };
>  }
> +
> +#[kunit_tests(rust_kernel_kunit)]
> +mod tests {
> +    #[test]
> +    fn rust_test_kunit_example_test() {
> +        assert_eq!(1 + 1, 2);

Clippy reported:

ERROR:root:error: identical args used in this `assert_eq!` macro call
   --> ../rust/kernel/kunit.rs:348:20
    |
348 |         assert_eq!(1 + 1, 2);
    |                    ^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#eq_op
    = note: `-D clippy::eq-op` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::eq_op)]`

but this lint doesn't make sense to me, I would say we just drop this
lint?

Regards,
Boqun

> +    }
> +}
[...]

  reply	other threads:[~2024-11-01 21:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-01  6:44 [PATCH v4 0/3] rust: kunit: Support KUnit tests with a user-space like syntax David Gow
2024-11-01  6:45 ` [PATCH v4 1/3] rust: kunit: add KUnit case and suite macros David Gow
2024-11-01 17:47   ` Boqun Feng
2024-11-09  8:18     ` David Gow
2024-11-09 20:32       ` Miguel Ojeda
2024-11-01  6:45 ` [PATCH v4 2/3] rust: macros: add macro to easily run KUnit tests David Gow
2024-11-01 21:38   ` Boqun Feng [this message]
2024-11-01 22:12     ` Miguel Ojeda
2024-11-02  0:08       ` Boqun Feng
2024-11-03 15:41         ` Miguel Ojeda
2024-11-01  6:45 ` [PATCH v4 3/3] rust: kunit: allow to know if we are in a test David Gow
2024-11-01 21:29   ` Boqun Feng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZyVKSKUq_bKH5jn_@Boquns-Mac-mini.local \
    --to=boqun.feng@gmail.com \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=benno.lossin@proton.me \
    --cc=bjorn3_gh@protonmail.com \
    --cc=brendan.higgins@linux.dev \
    --cc=davidgow@google.com \
    --cc=gary@garyguo.net \
    --cc=jose.exposito89@gmail.com \
    --cc=kunit-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=mattgilbride@google.com \
    --cc=ojeda@kernel.org \
    --cc=rmoar@google.com \
    --cc=rust-for-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).