Skip to contentSkip to conversation

rust: restore unit tests that were marked as ignored

PATCH In review [email protected] 2 participants 4 messages Apr 23, 2025 – Apr 29, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rust: restore unit tests that were marked as ignored

From: Deepesh Varatharajan <[email protected]>

Some unit tests were previously marked as ignored due to failures in earlier Rust versions. Following the upgrade to Rust 1.85.1, these tests now pass reliably and have been re-enabled. They have been verified to run successfully on the latest version.

---
 .../rust/files/rust-oe-selftest.patch         | 93 -------------------
 1 file changed, 93 deletions(-)
meta/recipes-devtools/rust/files/rust-oe-selftest.patch +0 -93
index 909bc971db..43a849dc8e 100644
@@ -43,66 +43,6 @@ diff --git a/compiler/rustc_interface/src/tests.rs b/compiler/rustc_interface/sr
  fn test_can_print_warnings() {
      sess_and_cfg(&["-Awarnings"], |sess, _cfg| {
          assert!(!sess.dcx().can_emit_warnings());
-diff --git a/library/std/src/sync/poison/rwlock/tests.rs b/library/std/src/sync/poison/rwlock/tests.rs
-index 1a9d3d3f12f..0a9cfc48806 100644
---- a/library/std/src/sync/poison/rwlock/tests.rs
-+++ b/library/std/src/sync/poison/rwlock/tests.rs
-@@ -47,6 +47,7 @@ fn frob() {
- }
-
- #[test]
-+#[ignore]
- fn test_rw_arc_poison_wr() {
-     let arc = Arc::new(RwLock::new(1));
-     let arc2 = arc.clone();
-@@ -72,6 +73,7 @@ fn test_rw_arc_poison_mapped_w_r() {
- }
-
- #[test]
-+#[ignore]
- fn test_rw_arc_poison_ww() {
-     let arc = Arc::new(RwLock::new(1));
-     assert!(!arc.is_poisoned());
-@@ -100,6 +102,7 @@ fn test_rw_arc_poison_mapped_w_w() {
- }
-
- #[test]
-+#[ignore]
- fn test_rw_arc_no_poison_rr() {
-     let arc = Arc::new(RwLock::new(1));
-     let arc2 = arc.clone();
-@@ -127,6 +130,7 @@ fn test_rw_arc_no_poison_mapped_r_r() {
- }
-
- #[test]
-+#[ignore]
- fn test_rw_arc_no_poison_rw() {
-     let arc = Arc::new(RwLock::new(1));
-     let arc2 = arc.clone();
-@@ -192,6 +196,7 @@ fn test_rw_arc() {
- }
-
- #[test]
-+#[ignore]
- fn test_rw_arc_access_in_unwind() {
-     let arc = Arc::new(RwLock::new(1));
-     let arc2 = arc.clone();
-@@ -275,6 +280,7 @@ fn drop(&mut self) {
- }
-
- #[test]
-+#[ignore]
- fn test_into_inner_poison() {
-     let m = new_poisoned_rwlock(NonCopy(10));
-
-@@ -299,6 +305,7 @@ fn test_get_mut() {
- }
-
- #[test]
-+#[ignore]
- fn test_get_mut_poison() {
-     let mut m = new_poisoned_rwlock(NonCopy(10));
-
 diff --git a/library/std/src/thread/tests.rs b/library/std/src/thread/tests.rs
 index 5d6b9e94ee9..a5aacb2eb87 100644
 --- a/library/std/src/thread/tests.rs
@@ -147,39 +87,6 @@ index 5d6b9e94ee9..a5aacb2eb87 100644
  fn test_try_panic_any_message_unit_struct() {
      struct Juju;
 
-diff --git a/library/test/src/tests.rs b/library/test/src/tests.rs
---- a/library/test/src/tests.rs
-+++ b/library/test/src/tests.rs
-@@ -424,6 +424,7 @@
- }
-
- #[test]
-+#[ignore]
- fn test_time_options_threshold() {
-     let unit = TimeThreshold::new(Duration::from_millis(50), Duration::from_millis(100));
-     let integration = TimeThreshold::new(Duration::from_millis(500), Duration::from_millis(1000));
-diff --git a/library/std/src/sync/poison/mutex/tests.rs b/library/std/src/sync/poison/mutex/tests.rs
---- a/library/std/src/sync/poison/mutex/tests.rs
-+++ b/library/std/src/sync/poison/mutex/tests.rs
-@@ -193,6 +193,7 @@
- }
-
- #[test]
-+#[ignore]
- fn test_mutex_arc_poison_mapped() {
-     let arc = Arc::new(Mutex::new(1));
-     assert!(!arc.is_poisoned());
-diff --git a/library/std/src/sync/poison/mutex/tests.rs b/library/std/src/sync/poison/mutex/tests.rs
---- a/library/std/src/sync/poison/mutex/tests.rs
-+++ b/library/std/src/sync/poison/mutex/tests.rs
-@@ -272,6 +272,7 @@
- }
-
- #[test]
-+#[ignore]
- fn panic_while_mapping_unlocked_poison() {
-     let lock = Mutex::new(());
-
 diff --git a/library/std/src/sync/rwlock/tests.rs b/library/std/src/sync/poison/rwlock/tests.rs
 --- a/library/std/src/sync/poison/rwlock/tests.rs
 +++ b/library/std/src/sync/poison/rwlock/tests.rs
Signature · 1 line
2.43.0
#1 lore raw
Quoted 9 lines · Deepesh via lists.openembedded.org Varatharajan

From: Deepesh Varatharajan <[email protected]>

Some unit tests were previously marked as ignored due to failures in earlier Rust versions. Following the upgrade to Rust 1.85.1, these tests now pass reliably and have been re-enabled. They have been verified to run successfully on the latest version.

---

Hi Deepesh,

Thanks for your patch.

I believe we can still see some test failures on the autobuilder:

2025-04-24 08:28:31,576 - oe-selftest - INFO - rust.RustSelfTestSystemEmulated.test_rust (subunit.RemotedTestCase)
2025-04-24 08:28:31,590 - oe-selftest - INFO -  ... FAIL

...
test fs::tests::file_lock_drop ... FAILED

https://autobuilder.yoctoproject.org/valkyrie/#/builders/42/builds/1422

Can you have a look at this issue please?

Best regards,
Mathieu

Signature · 3 lines
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw

Hi Mathew,

I attempted to reproduce this failure locally on two different servers using qemuarm as the machine, but I was unable to replicate the issue. Additionally, I observed that the failing unit test had not been previously ignored and it was not part of the unit tests I re-enabled for execution. Do you think I should investigate with any additional configurations?

Regards,
Deepesh

Quoted 36 lines · Mathieu Dubois-Briand

CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe.

Quoted 9 lines · Deepesh via lists.openembedded.org Varatharajan

From: Deepesh Varatharajan <[email protected]>

Some unit tests were previously marked as ignored due to failures in earlier Rust versions. Following the upgrade to Rust 1.85.1, these tests now pass reliably and have been re-enabled. They have been verified to run successfully on the latest version.

---

Hi Deepesh,

Thanks for your patch.

I believe we can still see some test failures on the autobuilder:

2025-04-24 08:28:31,576 - oe-selftest - INFO - rust.RustSelfTestSystemEmulated.test_rust (subunit.RemotedTestCase)
2025-04-24 08:28:31,590 - oe-selftest - INFO -  ... FAIL

...
test fs::tests::file_lock_drop ... FAILED

https://autobuilder.yoctoproject.org/valkyrie/#/builders/42/builds/1422

Can you have a look at this issue please?

Best regards,
Mathieu

--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

#3 lore raw
Quoted 10 lines · Deepesh Varatharajan

Hi Mathew,

I attempted to reproduce this failure locally on two different servers using qemuarm as the machine,
but I was unable to replicate the issue. Additionally, I observed that the failing unit test had not been
previously ignored and it was not part of the unit tests I re-enabled for execution. Do you think I should
investigate with any additional configurations?

Hi Deepesh,

I was able to reproduce it locally with
https://web.git.yoctoproject.org/poky-ci-archive/tag/?h=autobuilder.yoctoproject.org/valkyrie/a-full-1453
and following commands

. oe-init-build-env
echo 'MACHINE = "qemuarm"' >> conf/local.conf echo 'SANITY_TESTED_DISTROS = ""' >> conf/local.conf oe-selftest -r rust.RustSelfTestSystemEmulated.test_rust

Signature · 3 lines
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com