summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rust/files/rust-oe-selftest.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/rust/files/rust-oe-selftest.patch')
-rw-r--r--meta/recipes-devtools/rust/files/rust-oe-selftest.patch282
1 files changed, 282 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rust/files/rust-oe-selftest.patch b/meta/recipes-devtools/rust/files/rust-oe-selftest.patch
new file mode 100644
index 0000000000..b7ef806e65
--- /dev/null
+++ b/meta/recipes-devtools/rust/files/rust-oe-selftest.patch
@@ -0,0 +1,282 @@
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/tests/sync/rwlock.rs b/library/std/tests/sync/rwlock.rs
47index 1a9d3d3f12f..0a9cfc48806 100644
48--- a/library/std/tests/sync/rwlock.rs
49+++ b/library/std/tests/sync/rwlock.rs
50@@ -74,6 +74,7 @@
51
52 #[test]
53 #[cfg_attr(not(panic = "unwind"), ignore = "test requires unwinding support")]
54+#[ignore]
55 fn test_rw_arc_poison_wr() {
56 let arc = Arc::new(RwLock::new(1));
57 let arc2 = arc.clone();
58@@ -87,6 +88,7 @@
59
60 #[test]
61 #[cfg_attr(not(panic = "unwind"), ignore = "test requires unwinding support")]
62+#[ignore]
63 fn test_rw_arc_poison_mapped_w_r() {
64 let arc = Arc::new(RwLock::new(1));
65 let arc2 = arc.clone();
66@@ -101,6 +103,7 @@
67
68 #[test]
69 #[cfg_attr(not(panic = "unwind"), ignore = "test requires unwinding support")]
70+#[ignore]
71 fn test_rw_arc_poison_ww() {
72 let arc = Arc::new(RwLock::new(1));
73 assert!(!arc.is_poisoned());
74@@ -115,6 +118,7 @@
75 }
76
77 #[test]
78+#[ignore]
79 #[cfg_attr(not(panic = "unwind"), ignore = "test requires unwinding support")]
80 fn test_rw_arc_poison_mapped_w_w() {
81 let arc = Arc::new(RwLock::new(1));
82@@ -131,6 +135,7 @@
83
84 #[test]
85 #[cfg_attr(not(panic = "unwind"), ignore = "test requires unwinding support")]
86+#[ignore]
87 fn test_rw_arc_no_poison_rr() {
88 let arc = Arc::new(RwLock::new(1));
89 let arc2 = arc.clone();
90@@ -160,6 +165,7 @@
91
92 #[test]
93 #[cfg_attr(not(panic = "unwind"), ignore = "test requires unwinding support")]
94+#[ignore]
95 fn test_rw_arc_no_poison_rw() {
96 let arc = Arc::new(RwLock::new(1));
97 let arc2 = arc.clone();
98@@ -227,6 +233,7 @@
99
100 #[test]
101 #[cfg_attr(not(panic = "unwind"), ignore = "test requires unwinding support")]
102+#[ignore]
103 fn test_rw_arc_access_in_unwind() {
104 let arc = Arc::new(RwLock::new(1));
105 let arc2 = arc.clone();
106@@ -326,6 +333,7 @@
107
108 #[test]
109 #[cfg_attr(not(panic = "unwind"), ignore = "test requires unwinding support")]
110+#[ignore]
111 fn test_into_inner_poison() {
112 let m = new_poisoned_rwlock(NonCopy(10));
113
114@@ -362,6 +370,7 @@
115
116 #[test]
117 #[cfg_attr(not(panic = "unwind"), ignore = "test requires unwinding support")]
118+#[ignore]
119 fn test_get_mut_poison() {
120 let mut m = new_poisoned_rwlock(NonCopy(10));
121
122@@ -567,6 +576,7 @@
123
124 #[test]
125 #[cfg_attr(not(panic = "unwind"), ignore = "test requires unwinding support")]
126+#[ignore]
127 fn panic_while_mapping_write_unlocked_poison() {
128 let lock = RwLock::new(());
129
130diff --git a/library/test/src/tests.rs b/library/test/src/tests.rs
131--- a/library/test/src/tests.rs
132+++ b/library/test/src/tests.rs
133@@ -424,6 +424,7 @@
134 }
135
136 #[test]
137+#[ignore]
138 fn test_time_options_threshold() {
139 let unit = TimeThreshold::new(Duration::from_millis(50), Duration::from_millis(100));
140 let integration = TimeThreshold::new(Duration::from_millis(500), Duration::from_millis(1000));
141diff --git a/library/std/tests/sync/mutex.rs b/library/std/tests/sync/mutex.rs
142--- a/library/std/tests/sync/mutex.rs
143+++ b/library/std/tests/sync/mutex.rs
144@@ -312,6 +312,7 @@
145
146 #[test]
147 #[cfg_attr(not(panic = "unwind"), ignore = "test requires unwinding support")]
148+#[ignore]
149 fn test_mutex_arc_poison_mapped() {
150 let arc = Arc::new(Mutex::new(1));
151 assert!(!arc.is_poisoned());
152@@ -391,6 +392,7 @@
153
154 #[test]
155 #[cfg_attr(not(panic = "unwind"), ignore = "test requires unwinding support")]
156+#[ignore]
157 fn panic_while_mapping_unlocked_poison() {
158 let lock = Mutex::new(());
159
160diff --git a/library/coretests/benches/num/int_log/mod.rs b/library/coretests/benches/num/int_log/mod.rs
161index 3807cd5d76c..018c5c04456 100644
162--- a/library/coretests/benches/num/int_log/mod.rs
163+++ b/library/coretests/benches/num/int_log/mod.rs
164@@ -98,6 +98,7 @@ fn $random_small(bench: &mut Bencher) {
165 }
166
167 #[bench]
168+ #[ignore]
169 fn $geometric(bench: &mut Bencher) {
170 let bases: [$t; 16] = [2, 3, 4, 5, 7, 8, 9, 15, 16, 17, 31, 32, 33, 63, 64, 65];
171 let base_and_numbers: Vec<($t, Vec<$t>)> = bases
172diff --git a/compiler/rustc_data_structures/src/tagged_ptr/tests.rs b/compiler/rustc_data_structures/src/tagged_ptr/tests.rs
173index 160af8a65d..686f4607bb 100644
174--- a/compiler/rustc_data_structures/src/tagged_ptr/tests.rs
175+++ b/compiler/rustc_data_structures/src/tagged_ptr/tests.rs
176@@ -5,6 +5,7 @@ use crate::stable_hasher::{HashStable, StableHasher};
177 }
178
179 #[test]
180+#[ignore]
181 fn smoke() {
182 let value = 12u32;
183 let reference = &value;
184diff --git a/library/std/tests/thread_local/tests.rs b/library/std/tests/thread_local/tests.rs
185index 9d4f52a092..d425e5f7b7 100644
186--- a/library/std/tests/thread_local/tests.rs
187+++ b/library/std/tests/thread_local/tests.rs
188@@ -346,6 +346,7 @@ fn join_orders_after_tls_destructors() {
189
190 // Test that thread::current is still available in TLS destructors.
191 #[test]
192+#[ignore]
193 fn thread_current_in_dtor() {
194 // Go through one round of TLS destruction first.
195 struct Defer;
196diff --git a/library/alloctests/tests/sort/tests.rs b/library/alloctests/tests/sort/tests.rs
197index 14e6013f96..b670f27ab4 100644
198--- a/library/alloctests/tests/sort/tests.rs
199+++ b/library/alloctests/tests/sort/tests.rs
200@@ -915,12 +915,14 @@ gen_sort_test_fns_with_default_patterns_3_ty!(
201 macro_rules! instantiate_sort_test_inner {
202 ($sort_impl:ty, miri_yes, $test_fn_name:ident) => {
203 #[test]
204+ #[ignore]
205 fn $test_fn_name() {
206 $crate::sort::tests::$test_fn_name::<$sort_impl>();
207 }
208 };
209 ($sort_impl:ty, miri_no, $test_fn_name:ident) => {
210 #[test]
211+ #[ignore]
212 #[cfg_attr(miri, ignore)]
213 fn $test_fn_name() {
214 $crate::sort::tests::$test_fn_name::<$sort_impl>();
215diff --git a/compiler/rustc_data_structures/src/vec_cache/tests.rs b/compiler/rustc_data_structures/src/vec_cache/tests.rs
216index a05f274136..0e69b4cb98 100644
217--- a/compiler/rustc_data_structures/src/vec_cache/tests.rs
218+++ b/compiler/rustc_data_structures/src/vec_cache/tests.rs
219@@ -17,6 +17,7 @@ fn vec_cache_insert_and_check() {
220 }
221
222 #[test]
223+#[ignore]
224 fn sparse_inserts() {
225 let cache: VecCache<u32, u8, u32> = VecCache::default();
226 let end = if cfg!(target_pointer_width = "64") && cfg!(target_os = "linux") {
227diff --git a/tests/assembly/dwarf-mixed-versions-lto.rs b/tests/assembly/dwarf-mixed-versions-lto.rs
228index 5b8e5ff4f4a..e558fbd7bd7 100644
229--- a/tests/assembly/dwarf-mixed-versions-lto.rs
230+++ b/tests/assembly/dwarf-mixed-versions-lto.rs
231@@ -2,6 +2,11 @@
232 // will choose the highest DWARF version for the final binary. This matches Clang's behavior.
233 // Note: `.2byte` directive is used on MIPS.
234
235+//@ only-x86
236+//@ only-x86_64
237+//@ only-arm
238+//@ only-aarch64
239+
240 //@ only-linux
241 //@ aux-build:dwarf-mixed-versions-lto-aux.rs
242 //@ compile-flags: -C lto -g -Zdwarf-version=5
243diff --git a/tests/codegen/dont-shuffle-bswaps.rs b/tests/codegen/dont-shuffle-bswaps.rs
244index 0e712bc3a4e..93965d990d0 100644
245--- a/tests/codegen/dont-shuffle-bswaps.rs
246+++ b/tests/codegen/dont-shuffle-bswaps.rs
247@@ -1,3 +1,8 @@
248+//@ only-x86
249+//@ only-x86_64
250+//@ only-arm
251+//@ only-aarch64
252+
253 //@ revisions: OPT2 OPT3
254 //@[OPT2] compile-flags: -Copt-level=2
255 //@[OPT3] compile-flags: -C opt-level=3
256diff --git a/tests/codegen/uninhabited-transparent-return-abi.rs b/tests/codegen/uninhabited-transparent-return-abi.rs
257index face1577c3f..d69e5e34a7b 100644
258--- a/tests/codegen/uninhabited-transparent-return-abi.rs
259+++ b/tests/codegen/uninhabited-transparent-return-abi.rs
260@@ -1,4 +1,8 @@
261 //@ compile-flags: -Copt-level=3
262+//@ only-x86
263+//@ only-x86_64
264+//@ only-arm
265+//@ only-aarch64
266
267 // See https://github.com/rust-lang/rust/issues/135802
268
269diff --git a/tests/ui/abi/rust-cold-works-with-rustic-args.rs b/tests/ui/abi/rust-cold-works-with-rustic-args.rs
270index 57027364699..3faa7ea035e 100644
271--- a/tests/ui/abi/rust-cold-works-with-rustic-args.rs
272+++ b/tests/ui/abi/rust-cold-works-with-rustic-args.rs
273@@ -1,5 +1,9 @@
274 //@build-pass
275 //@compile-flags: -Clink-dead-code=true --crate-type lib
276+//@ only-x86
277+//@ only-x86_64
278+//@ only-arm
279+//@ only-aarch64
280 // We used to not handle all "rustic" ABIs in a (relatively) uniform way,
281 // so we failed to fix up arguments for actually passing through the ABI...
282 #![feature(rust_cold_cc)]