Re: [PATCH v4 2/3] rust: macros: add macro to easily run KUnit tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

> +    }
> +}
[...]




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux