mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: error[E0560]: struct `kunit_suite` has no field named `suite_init`
       [not found] <202512031957.BoFx2PMx-lkp@intel.com>
@ 2025-12-03 12:58 ` David Gow
  2025-12-03 14:23   ` Philip Li
  0 siblings, 1 reply; 2+ messages in thread
From: David Gow @ 2025-12-03 12:58 UTC (permalink / raw)
  To: kernel test robot, oe-kbuild, Thomas Weißschuh
  Cc: Linux Kernel Mailing List, Daniel Gomez, kunit-dev

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: lkp@intel.com
> CC: oe-kbuild-all@lists.linux.dev
> CC: linux-kernel@vger.kernel.org
> TO: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>
> CC: Daniel Gomez <da.gomez@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.BoFx2PMx-lkp@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.BoFx2PMx-lkp@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 <lkp@intel.com>
> | Closes: https://lore.kernel.org/r/202512031957.BoFx2PMx-lkp@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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: error[E0560]: struct `kunit_suite` has no field named `suite_init`
  2025-12-03 12:58 ` error[E0560]: struct `kunit_suite` has no field named `suite_init` David Gow
@ 2025-12-03 14:23   ` Philip Li
  0 siblings, 0 replies; 2+ messages in thread
From: Philip Li @ 2025-12-03 14:23 UTC (permalink / raw)
  To: David Gow
  Cc: kernel test robot, oe-kbuild, Thomas Weißschuh,
	Linux Kernel Mailing List, Daniel Gomez, kunit-dev

On Wed, Dec 03, 2025 at 08:58:48PM +0800, David Gow wrote:
> 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: lkp@intel.com
> > CC: oe-kbuild-all@lists.linux.dev
> > CC: linux-kernel@vger.kernel.org
> > TO: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>
> > CC: Daniel Gomez <da.gomez@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.BoFx2PMx-lkp@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.BoFx2PMx-lkp@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?

Thanks for the information, I will update bot logic to use 0.72.1 from now on
to avoid these kind of false positives.

> 
> > 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 <lkp@intel.com>
> > | Closes: https://lore.kernel.org/r/202512031957.BoFx2PMx-lkp@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
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-12-03 14:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <202512031957.BoFx2PMx-lkp@intel.com>
2025-12-03 12:58 ` error[E0560]: struct `kunit_suite` has no field named `suite_init` David Gow
2025-12-03 14:23   ` Philip Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®