Re: error[E0560]: struct `kunit_suite` has no field named `suite_init`

2 views
Skip to first unread message

David Gow

unread,
Dec 3, 2025, 7:58:57 AMDec 3
to kernel test robot, oe-k...@lists.linux.dev, Thomas Weißschuh, Linux Kernel Mailing List, Daniel Gomez, kuni...@googlegroups.com
Hi all,

Le 03/12/2025 à 7:45 PM, kernel test robot a écrit :
> ::::::
> :::::: Manual check reason: "arm-randconfig-r121-20251201 results in various rust failures"
> ::::::
>
> BCC: l...@intel.com
> CC: oe-kbu...@lists.linux.dev
> CC: linux-...@vger.kernel.org
> TO: "Thomas Weißschuh" <thomas.w...@linutronix.de>
> CC: Daniel Gomez <da.g...@samsung.com>
>
> Hi Thomas,
>
> FYI, the error/warning still remains.
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: 3f9f0252130e7dd60d41be0802bf58f6471c691d
> commit: 818783c804bc051f7faf0ac226b5597f8259c6f8 module: make structure definitions always visible
> date: 4 months ago
> :::::: branch date: 9 hours ago
> :::::: commit date: 4 months ago
> config: arm-randconfig-r121-20251201 (https://download.01.org/0day-ci/archive/20251203/202512031957...@intel.com/config)
> compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project b3428bb966f1de8aa48375ffee0eba04ede133b7)
> rustc: rustc 1.88.0 (6b00bc388 2025-06-23)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251203/202512031957...@intel.com/reproduce)
>

The current best theory for the cause of these errors (which, alas, I've
still not been able to reproduce locally) is the following bindgen bug:
https://github.com/rust-lang/rust-bindgen/issues/3264

bindgen 0.72.1 has been released to fix this issue:
https://github.com/rust-lang/rust-bindgen/releases/tag/v0.72.1

It looks like all of the test robot failures are from builds using both
clang 22 and bindgen 0.72.0, which would meet the criteria for that bug.
Is there any chance you could upgrade the bindgen version used and see
if that makes the issues go away?

> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <l...@intel.com>
> | Closes: https://lore.kernel.org/r/202512031957...@intel.com/
>
> All errors (new ones prefixed by >>):
>
>>> error[E0560]: struct `kunit_suite` has no field named `suite_init`
> --> rust/kernel/kunit.rs:291:21
> |
> 291 | suite_init: None,
> | ^^^^^^^^^^ `kunit_suite` does not have this field
> |
> ::: rust/kernel/alloc/kvec.rs:1244:1
> |
> 1244 | #[macros::kunit_tests(rust_kvec_kunit)]
> | --------------------------------------- in this procedural macro expansion
> |
> = note: all struct fields are already assigned
> = note: this error originates in the macro `::kernel::kunit_unsafe_test_suite` which comes from the expansion of the attribute macro `macros::kunit_tests` (in Nightly builds, run with -Z macro-backtrace for more info)
> --
>>> error[E0560]: struct `kunit_suite` has no field named `suite_exit`
> --> rust/kernel/kunit.rs:292:21
> |
> 292 | suite_exit: None,
> | ^^^^^^^^^^ `kunit_suite` does not have this field
> |
> ::: rust/kernel/alloc/kvec.rs:1244:1
> |
> 1244 | #[macros::kunit_tests(rust_kvec_kunit)]
> | --------------------------------------- in this procedural macro expansion
> |
> = note: all struct fields are already assigned
> = note: this error originates in the macro `::kernel::kunit_unsafe_test_suite` which comes from the expansion of the attribute macro `macros::kunit_tests` (in Nightly builds, run with -Z macro-backtrace for more info)
> --

(...)

Cheers,
-- David

Philip Li

unread,
Dec 3, 2025, 9:24:11 AMDec 3
to David Gow, kernel test robot, oe-k...@lists.linux.dev, Thomas Weißschuh, Linux Kernel Mailing List, Daniel Gomez, kuni...@googlegroups.com
Thanks for the information, I will update bot logic to use 0.72.1 from now on
to avoid these kind of false positives.
Reply all
Reply to author
Forward
0 new messages