Bug 15275

Summary: rust: oe-selftest issues with 1.73.0 upgrade
Product: [QA/Testing] Functional (self) Testing Reporter: Yash Shinde <Yash.Shinde>
Component: oe-selftestAssignee: Yash Shinde <Yash.Shinde>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: alex.kiernan, randy.macleod, sundeep.kokkonda
Version: unspecified   
Target Milestone: 5.0 M3   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
Rust 1.73 upgrade patch
none
Assert.patch file to pass assertion check
none
Detailed summary log of failure none

Description Yash Shinde 2023-11-07 08:22:06 UTC
Created attachment 4985 [details]
Rust 1.73 upgrade patch

The Rust Oe-selftest fails after upgarding from Rust 1.70 to 1.73(including 1.71 and 1.72) versions.

Steps to reproduce-
1. Clone poky sources
2. Apply rust-1.73.patch.
3. Add assert.patch for rust under meta/recipes-devtools/rust/files/
4. Add "file://assert.patch;patchdir=${RUSTSRC} \" in meta/recipes-devtools/rust/rust-source.inc file 	
3. source oe-init-build-env & set SANITY_TESTED_DISTROS="" in local.conf
4. oe-selftest -r rust.RustSelfTestSystemEmulated.test_rust

The failure log is 

At first, there's an assertion failure causing the failure-

thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `x86_64-unknown-linux-gnu`,
 right: `x86_64-poky-linux-gnu`: Cannot obtain compiler for non-native build triple at stage 0', compile.rs:1474:13
Build completed unsuccessfully in 0:04:38

This assertion check can be by-passed by the assert.patch file.
After this, the build the oe-selftest proceeds untill it encounters other panics-

thread 'main' panicked at src/tools/compiletest/src/common.rs:499:23:                                                          
no entry found for key                                                                                                         
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 
and
 
thread 'main' panicked at 'client.read_exact(&mut buf) failed with Connection reset by peer (os error 104)', src/tools/remote-test-client/src/main.rs:254:5                                                                                                   
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace 
Build completed unsuccessfully in 0:07:57
 
Please find attached the Rust 1.73 upgrade patch and assert.patch files.
Comment 1 Yash Shinde 2023-11-07 08:23:21 UTC
Created attachment 4986 [details]
Assert.patch file to pass assertion check
Comment 2 Yash Shinde 2023-11-07 08:30:58 UTC
Created attachment 4987 [details]
Detailed summary log of failure
Comment 4 Yash Shinde 2023-12-04 05:40:54 UTC
Also, I had raised https://github.com/rust-lang/rust/issues/115642 but not much updates.