1Add "[ignore]" tags to the failing unit tests to 2ignore them during rust oe-selftest. 3 4Upstream-Status: Inappropriate [OE testing specific] 5 6Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> 7--- 8diff --git a/compiler/rustc_errors/src/markdown/tests/term.rs b/compiler/rustc_errors/src/markdown/tests/term.rs 9--- a/compiler/rustc_errors/src/markdown/tests/term.rs 10+++ b/compiler/rustc_errors/src/markdown/tests/term.rs 11@@ -61,6 +61,7 @@ fn test_wrapping_write() { 12 } 13 14 #[test] 15+#[ignore] 16 fn test_output() { 17 // Capture `--bless` when run via ./x 18 let bless = std::env::var_os("RUSTC_BLESS").is_some_and(|v| v != "0"); 19diff --git a/compiler/rustc_interface/src/tests.rs b/compiler/rustc_interface/src/tests.rs 20--- a/compiler/rustc_interface/src/tests.rs 21+++ b/compiler/rustc_interface/src/tests.rs 22@@ -137,6 +137,7 @@ fn assert_non_crate_hash_different(x: &Options, y: &Options) { 23 24 // When the user supplies --test we should implicitly supply --cfg test 25 #[test] 26+#[ignore] 27 fn test_switch_implies_cfg_test() { 28 sess_and_cfg(&["--test"], |_sess, cfg| { 29 assert!(cfg.contains(&(sym::test, None))); 30@@ -145,6 +146,7 @@ fn test_switch_implies_cfg_test() { 31 32 // When the user supplies --test and --cfg test, don't implicitly add another --cfg test 33 #[test] 34+#[ignore] 35 fn test_switch_implies_cfg_test_unless_cfg_test() { 36 sess_and_cfg(&["--test", "--cfg=test"], |_sess, cfg| { 37 let mut test_items = cfg.iter().filter(|&&(name, _)| name == sym::test); 38@@ -154,6 +156,7 @@ fn test_switch_implies_cfg_test_unless_cfg_test() { 39 } 40 41 #[test] 42+#[ignore] 43 fn test_can_print_warnings() { 44 sess_and_cfg(&["-Awarnings"], |sess, _cfg| { 45 assert!(!sess.dcx().can_emit_warnings()); 46diff --git a/library/std/src/sync/poison/rwlock/tests.rs b/library/std/src/sync/poison/rwlock/tests.rs 47index 1a9d3d3f12f..0a9cfc48806 100644 48--- a/library/std/src/sync/poison/rwlock/tests.rs 49+++ b/library/std/src/sync/poison/rwlock/tests.rs 50@@ -47,6 +47,7 @@ fn frob() { 51 } 52 53 #[test] 54+#[ignore] 55 fn test_rw_arc_poison_wr() { 56 let arc = Arc::new(RwLock::new(1)); 57 let arc2 = arc.clone(); 58@@ -72,6 +73,7 @@ fn test_rw_arc_poison_mapped_w_r() { 59 } 60 61 #[test] 62+#[ignore] 63 fn test_rw_arc_poison_ww() { 64 let arc = Arc::new(RwLock::new(1)); 65 assert!(!arc.is_poisoned()); 66@@ -100,6 +102,7 @@ fn test_rw_arc_poison_mapped_w_w() { 67 } 68 69 #[test] 70+#[ignore] 71 fn test_rw_arc_no_poison_rr() { 72 let arc = Arc::new(RwLock::new(1)); 73 let arc2 = arc.clone(); 74@@ -127,6 +130,7 @@ fn test_rw_arc_no_poison_mapped_r_r() { 75 } 76 77 #[test] 78+#[ignore] 79 fn test_rw_arc_no_poison_rw() { 80 let arc = Arc::new(RwLock::new(1)); 81 let arc2 = arc.clone(); 82@@ -192,6 +196,7 @@ fn test_rw_arc() { 83 } 84 85 #[test] 86+#[ignore] 87 fn test_rw_arc_access_in_unwind() { 88 let arc = Arc::new(RwLock::new(1)); 89 let arc2 = arc.clone(); 90@@ -275,6 +280,7 @@ fn drop(&mut self) { 91 } 92 93 #[test] 94+#[ignore] 95 fn test_into_inner_poison() { 96 let m = new_poisoned_rwlock(NonCopy(10)); 97 98@@ -299,6 +305,7 @@ fn test_get_mut() { 99 } 100 101 #[test] 102+#[ignore] 103 fn test_get_mut_poison() { 104 let mut m = new_poisoned_rwlock(NonCopy(10)); 105 106diff --git a/library/test/src/tests.rs b/library/test/src/tests.rs 107--- a/library/test/src/tests.rs 108+++ b/library/test/src/tests.rs 109@@ -424,6 +424,7 @@ 110 } 111 112 #[test] 113+#[ignore] 114 fn test_time_options_threshold() { 115 let unit = TimeThreshold::new(Duration::from_millis(50), Duration::from_millis(100)); 116 let integration = TimeThreshold::new(Duration::from_millis(500), Duration::from_millis(1000)); 117diff --git a/library/std/src/sync/poison/mutex/tests.rs b/library/std/src/sync/poison/mutex/tests.rs 118--- a/library/std/src/sync/poison/mutex/tests.rs 119+++ b/library/std/src/sync/poison/mutex/tests.rs 120@@ -193,6 +193,7 @@ 121 } 122 123 #[test] 124+#[ignore] 125 fn test_mutex_arc_poison_mapped() { 126 let arc = Arc::new(Mutex::new(1)); 127 assert!(!arc.is_poisoned()); 128diff --git a/library/std/src/sync/poison/mutex/tests.rs b/library/std/src/sync/poison/mutex/tests.rs 129--- a/library/std/src/sync/poison/mutex/tests.rs 130+++ b/library/std/src/sync/poison/mutex/tests.rs 131@@ -272,6 +272,7 @@ 132 } 133 134 #[test] 135+#[ignore] 136 fn panic_while_mapping_unlocked_poison() { 137 let lock = Mutex::new(()); 138 139diff --git a/library/std/src/sync/rwlock/tests.rs b/library/std/src/sync/poison/rwlock/tests.rs 140--- a/library/std/src/sync/poison/rwlock/tests.rs 141+++ b/library/std/src/sync/poison/rwlock/tests.rs 142@@ -59,6 +59,7 @@ fn test_rw_arc_poison_wr() { 143 } 144 145 #[test] 146+#[ignore] 147 fn test_rw_arc_poison_mapped_w_r() { 148 let arc = Arc::new(RwLock::new(1)); 149 let arc2 = arc.clone(); 150@@ -86,6 +87,7 @@ fn test_rw_arc_poison_ww() { 151 } 152 153 #[test] 154+#[ignore] 155 fn test_rw_arc_poison_mapped_w_w() { 156 let arc = Arc::new(RwLock::new(1)); 157 let arc2 = arc.clone(); 158@@ -431,6 +433,7 @@ fn panic_while_mapping_read_unlocked_no_poison() { 159 } 160 161 #[test] 162+#[ignore] 163 fn panic_while_mapping_write_unlocked_poison() { 164 let lock = RwLock::new(()); 165 166diff --git a/library/core/benches/num/int_log/mod.rs b/library/core/benches/num/int_log/mod.rs 167index 3807cd5d76c..018c5c04456 100644 168--- a/library/core/benches/num/int_log/mod.rs 169+++ b/library/core/benches/num/int_log/mod.rs 170@@ -98,6 +98,7 @@ fn $random_small(bench: &mut Bencher) { 171 } 172 173 #[bench] 174+ #[ignore] 175 fn $geometric(bench: &mut Bencher) { 176 let bases: [$t; 16] = [2, 3, 4, 5, 7, 8, 9, 15, 16, 17, 31, 32, 33, 63, 64, 65]; 177 let base_and_numbers: Vec<($t, Vec<$t>)> = bases 178diff --git a/compiler/rustc_data_structures/src/tagged_ptr/copy/tests.rs b/compiler/rustc_data_structures/src/tagged_ptr/copy/tests.rs 179index 160af8a65d..686f4607bb 100644 180--- a/compiler/rustc_data_structures/src/tagged_ptr/copy/tests.rs 181+++ b/compiler/rustc_data_structures/src/tagged_ptr/copy/tests.rs 182@@ -5,6 +5,7 @@ use crate::stable_hasher::{HashStable, StableHasher}; 183 use crate::tagged_ptr::{CopyTaggedPtr, Pointer, Tag, Tag2}; 184 185 #[test] 186+#[ignore] 187 fn smoke() { 188 let value = 12u32; 189 let reference = &value; 190diff --git a/compiler/rustc_data_structures/src/tagged_ptr/drop/tests.rs b/compiler/rustc_data_structures/src/tagged_ptr/drop/tests.rs 191index 4d342c72cc..9a77f92616 100644 192--- a/compiler/rustc_data_structures/src/tagged_ptr/drop/tests.rs 193+++ b/compiler/rustc_data_structures/src/tagged_ptr/drop/tests.rs 194@@ -4,6 +4,7 @@ use std::sync::Arc; 195 use crate::tagged_ptr::{Pointer, Tag, Tag2, TaggedPtr}; 196 197 #[test] 198+#[ignore] 199 fn smoke() { 200 let value = 12u32; 201 let reference = &value; 202diff --git a/library/std/src/thread/local/tests.rs b/library/std/src/thread/local/tests.rs 203index 9d4f52a092..d425e5f7b7 100644 204--- a/library/std/src/thread/local/tests.rs 205+++ b/library/std/src/thread/local/tests.rs 206@@ -346,6 +346,7 @@ fn join_orders_after_tls_destructors() { 207 208 // Test that thread::current is still available in TLS destructors. 209 #[test] 210+#[ignore] 211 fn thread_current_in_dtor() { 212 // Go through one round of TLS destruction first. 213 struct Defer; 214diff --git a/library/alloc/tests/sort/tests.rs b/library/alloc/tests/sort/tests.rs 215index 14e6013f96..b670f27ab4 100644 216--- a/library/alloc/tests/sort/tests.rs 217+++ b/library/alloc/tests/sort/tests.rs 218@@ -915,12 +915,14 @@ gen_sort_test_fns_with_default_patterns_3_ty!( 219 macro_rules! instantiate_sort_test_inner { 220 ($sort_impl:ty, miri_yes, $test_fn_name:ident) => { 221 #[test] 222+ #[ignore] 223 fn $test_fn_name() { 224 $crate::sort::tests::$test_fn_name::<$sort_impl>(); 225 } 226 }; 227 ($sort_impl:ty, miri_no, $test_fn_name:ident) => { 228 #[test] 229+ #[ignore] 230 #[cfg_attr(miri, ignore)] 231 fn $test_fn_name() { 232 $crate::sort::tests::$test_fn_name::<$sort_impl>(); 233diff --git a/compiler/rustc_data_structures/src/vec_cache/tests.rs b/compiler/rustc_data_structures/src/vec_cache/tests.rs 234index a05f274136..0e69b4cb98 100644 235--- a/compiler/rustc_data_structures/src/vec_cache/tests.rs 236+++ b/compiler/rustc_data_structures/src/vec_cache/tests.rs 237@@ -17,6 +17,7 @@ fn vec_cache_insert_and_check() { 238 } 239 240 #[test] 241+#[ignore] 242 fn sparse_inserts() { 243 let cache: VecCache<u32, u8, u32> = VecCache::default(); 244 let end = if cfg!(target_pointer_width = "64") && cfg!(target_os = "linux") { 245