rust-oe-selftest.patch 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483
  1. Add "[ignore]" tags to the failing unit tests to
  2. ignore them during rust oe-selftest.
  3. Upstream-Status: Inappropriate [OE testing specific]
  4. Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
  5. ---
  6. diff --git a/compiler/rustc_errors/src/markdown/tests/term.rs b/compiler/rustc_errors/src/markdown/tests/term.rs
  7. --- a/compiler/rustc_errors/src/markdown/tests/term.rs
  8. +++ b/compiler/rustc_errors/src/markdown/tests/term.rs
  9. @@ -61,6 +61,7 @@ fn test_wrapping_write() {
  10. }
  11. #[test]
  12. +#[ignore]
  13. fn test_output() {
  14. // Capture `--bless` when run via ./x
  15. let bless = std::env::var_os("RUSTC_BLESS").is_some_and(|v| v != "0");
  16. diff --git a/compiler/rustc_interface/src/tests.rs b/compiler/rustc_interface/src/tests.rs
  17. --- a/compiler/rustc_interface/src/tests.rs
  18. +++ b/compiler/rustc_interface/src/tests.rs
  19. @@ -137,6 +137,7 @@ fn assert_non_crate_hash_different(x: &Options, y: &Options) {
  20. // When the user supplies --test we should implicitly supply --cfg test
  21. #[test]
  22. +#[ignore]
  23. fn test_switch_implies_cfg_test() {
  24. sess_and_cfg(&["--test"], |_sess, cfg| {
  25. assert!(cfg.contains(&(sym::test, None)));
  26. @@ -145,6 +146,7 @@ fn test_switch_implies_cfg_test() {
  27. // When the user supplies --test and --cfg test, don't implicitly add another --cfg test
  28. #[test]
  29. +#[ignore]
  30. fn test_switch_implies_cfg_test_unless_cfg_test() {
  31. sess_and_cfg(&["--test", "--cfg=test"], |_sess, cfg| {
  32. let mut test_items = cfg.iter().filter(|&&(name, _)| name == sym::test);
  33. @@ -154,6 +156,7 @@ fn test_switch_implies_cfg_test_unless_cfg_test() {
  34. }
  35. #[test]
  36. +#[ignore]
  37. fn test_can_print_warnings() {
  38. sess_and_cfg(&["-Awarnings"], |sess, _cfg| {
  39. assert!(!sess.dcx().can_emit_warnings());
  40. diff --git a/library/test/src/stats/tests.rs b/library/test/src/stats/tests.rs
  41. --- a/library/test/src/stats/tests.rs
  42. +++ b/library/test/src/stats/tests.rs
  43. @@ -40,6 +40,7 @@
  44. }
  45. #[test]
  46. +#[ignore]
  47. fn test_min_max_nan() {
  48. let xs = &[1.0, 2.0, f64::NAN, 3.0, 4.0];
  49. let summary = Summary::new(xs);
  50. diff --git a/library/std/src/io/buffered/tests.rs b/library/std/src/io/buffered/tests.rs
  51. index 35a5291a347..5f2858d2505 100644
  52. --- a/library/std/src/io/buffered/tests.rs
  53. +++ b/library/std/src/io/buffered/tests.rs
  54. @@ -488,6 +488,7 @@ fn flush(&mut self) -> io::Result<()> {
  55. }
  56. #[test]
  57. +#[ignore]
  58. #[cfg_attr(any(target_os = "emscripten", target_os = "wasi"), ignore)] // no threads
  59. fn panic_in_write_doesnt_flush_in_drop() {
  60. static WRITES: AtomicUsize = AtomicUsize::new(0);
  61. diff --git a/library/std/src/io/stdio/tests.rs b/library/std/src/io/stdio/tests.rs
  62. index f89fd27ce6c..79737f5b127 100644
  63. --- a/library/std/src/io/stdio/tests.rs
  64. +++ b/library/std/src/io/stdio/tests.rs
  65. @@ -25,6 +25,7 @@ fn stderrlock_unwind_safe() {
  66. fn assert_unwind_safe<T: UnwindSafe + RefUnwindSafe>() {}
  67. #[test]
  68. +#[ignore]
  69. #[cfg_attr(any(target_os = "emscripten", target_os = "wasi"), ignore)] // no threads
  70. fn panic_doesnt_poison() {
  71. thread::spawn(|| {
  72. diff --git a/library/std/src/sync/mpsc/sync_tests.rs b/library/std/src/sync/mpsc/sync_tests.rs
  73. index 945de280f40..1ac7eeabc5c 100644
  74. --- a/library/std/src/sync/mpsc/sync_tests.rs
  75. +++ b/library/std/src/sync/mpsc/sync_tests.rs
  76. @@ -252,6 +252,7 @@ fn oneshot_single_thread_send_port_close() {
  77. }
  78. #[test]
  79. +#[ignore]
  80. fn oneshot_single_thread_recv_chan_close() {
  81. // Receiving on a closed chan will panic
  82. let res = thread::spawn(move || {
  83. @@ -347,6 +348,7 @@ fn oneshot_multi_task_recv_then_send() {
  84. }
  85. #[test]
  86. +#[ignore]
  87. fn oneshot_multi_task_recv_then_close() {
  88. let (tx, rx) = sync_channel::<Box<i32>>(0);
  89. let _t = thread::spawn(move || {
  90. @@ -371,6 +373,7 @@ fn oneshot_multi_thread_close_stress() {
  91. }
  92. #[test]
  93. +#[ignore]
  94. fn oneshot_multi_thread_send_close_stress() {
  95. for _ in 0..stress_factor() {
  96. let (tx, rx) = sync_channel::<i32>(0);
  97. @@ -385,6 +388,7 @@ fn oneshot_multi_thread_send_close_stress() {
  98. }
  99. #[test]
  100. +#[ignore]
  101. fn oneshot_multi_thread_recv_close_stress() {
  102. for _ in 0..stress_factor() {
  103. let (tx, rx) = sync_channel::<i32>(0);
  104. diff --git a/library/std/src/sync/mpsc/tests.rs b/library/std/src/sync/mpsc/tests.rs
  105. index ac1a804cf9c..7c687982324 100644
  106. --- a/library/std/src/sync/mpsc/tests.rs
  107. +++ b/library/std/src/sync/mpsc/tests.rs
  108. @@ -233,6 +233,7 @@ fn oneshot_single_thread_send_port_close() {
  109. }
  110. #[test]
  111. +#[ignore]
  112. fn oneshot_single_thread_recv_chan_close() {
  113. // Receiving on a closed chan will panic
  114. let res = thread::spawn(move || {
  115. @@ -313,6 +314,7 @@ fn oneshot_multi_task_recv_then_send() {
  116. }
  117. #[test]
  118. +#[ignore]
  119. fn oneshot_multi_task_recv_then_close() {
  120. let (tx, rx) = channel::<Box<i32>>();
  121. let _t = thread::spawn(move || {
  122. @@ -337,6 +339,7 @@ fn oneshot_multi_thread_close_stress() {
  123. }
  124. #[test]
  125. +#[ignore]
  126. fn oneshot_multi_thread_send_close_stress() {
  127. for _ in 0..stress_factor() {
  128. let (tx, rx) = channel::<i32>();
  129. @@ -351,6 +354,7 @@ fn oneshot_multi_thread_send_close_stress() {
  130. }
  131. #[test]
  132. +#[ignore]
  133. fn oneshot_multi_thread_recv_close_stress() {
  134. for _ in 0..stress_factor() {
  135. let (tx, rx) = channel::<i32>();
  136. diff --git a/library/std/src/sync/poison/mutex/tests.rs b/library/std/src/sync/poison/mutex/tests.rs
  137. index 1786a3c09ff..9dcead7092b 100644
  138. --- a/library/std/src/sync/poison/mutex/tests.rs
  139. +++ b/library/std/src/sync/poison/mutex/tests.rs
  140. @@ -82,6 +82,7 @@ fn drop(&mut self) {
  141. }
  142. #[test]
  143. +#[ignore]
  144. fn test_into_inner_poison() {
  145. let m = new_poisoned_mutex(NonCopy(10));
  146. @@ -106,6 +107,7 @@ fn test_get_mut() {
  147. }
  148. #[test]
  149. +#[ignore]
  150. fn test_get_mut_poison() {
  151. let mut m = new_poisoned_mutex(NonCopy(10));
  152. @@ -146,6 +148,7 @@ fn test_mutex_arc_condvar() {
  153. }
  154. #[test]
  155. +#[ignore]
  156. fn test_arc_condvar_poison() {
  157. let packet = Packet(Arc::new((Mutex::new(1), Condvar::new())));
  158. let packet2 = Packet(packet.0.clone());
  159. @@ -175,6 +178,7 @@ fn test_arc_condvar_poison() {
  160. }
  161. #[test]
  162. +#[ignore]
  163. fn test_mutex_arc_poison() {
  164. let arc = Arc::new(Mutex::new(1));
  165. assert!(!arc.is_poisoned());
  166. @@ -220,6 +220,7 @@ fn test_mutex_arc_nested() {
  167. }
  168. #[test]
  169. +#[ignore]
  170. fn test_mutex_arc_access_in_unwind() {
  171. let arc = Arc::new(Mutex::new(1));
  172. let arc2 = arc.clone();
  173. diff --git a/library/std/src/sync/poison/rwlock/tests.rs b/library/std/src/sync/poison/rwlock/tests.rs
  174. index 1a9d3d3f12f..0a9cfc48806 100644
  175. --- a/library/std/src/sync/poison/rwlock/tests.rs
  176. +++ b/library/std/src/sync/poison/rwlock/tests.rs
  177. @@ -47,6 +47,7 @@ fn frob() {
  178. }
  179. #[test]
  180. +#[ignore]
  181. fn test_rw_arc_poison_wr() {
  182. let arc = Arc::new(RwLock::new(1));
  183. let arc2 = arc.clone();
  184. @@ -72,6 +73,7 @@ fn test_rw_arc_poison_mapped_w_r() {
  185. }
  186. #[test]
  187. +#[ignore]
  188. fn test_rw_arc_poison_ww() {
  189. let arc = Arc::new(RwLock::new(1));
  190. assert!(!arc.is_poisoned());
  191. @@ -100,6 +102,7 @@ fn test_rw_arc_poison_mapped_w_w() {
  192. }
  193. #[test]
  194. +#[ignore]
  195. fn test_rw_arc_no_poison_rr() {
  196. let arc = Arc::new(RwLock::new(1));
  197. let arc2 = arc.clone();
  198. @@ -127,6 +130,7 @@ fn test_rw_arc_no_poison_mapped_r_r() {
  199. }
  200. #[test]
  201. +#[ignore]
  202. fn test_rw_arc_no_poison_rw() {
  203. let arc = Arc::new(RwLock::new(1));
  204. let arc2 = arc.clone();
  205. @@ -192,6 +196,7 @@ fn test_rw_arc() {
  206. }
  207. #[test]
  208. +#[ignore]
  209. fn test_rw_arc_access_in_unwind() {
  210. let arc = Arc::new(RwLock::new(1));
  211. let arc2 = arc.clone();
  212. @@ -275,6 +280,7 @@ fn drop(&mut self) {
  213. }
  214. #[test]
  215. +#[ignore]
  216. fn test_into_inner_poison() {
  217. let m = new_poisoned_rwlock(NonCopy(10));
  218. @@ -299,6 +305,7 @@ fn test_get_mut() {
  219. }
  220. #[test]
  221. +#[ignore]
  222. fn test_get_mut_poison() {
  223. let mut m = new_poisoned_rwlock(NonCopy(10));
  224. diff --git a/library/std/src/sys/pal/unix/process/process_unix/tests.rs b/library/std/src/sys/pal/unix/process/process_unix/tests.rs
  225. index 0a6c6ec19fc..bec257bc630 100644
  226. --- a/library/std/src/sys/pal/unix/process/process_unix/tests.rs
  227. +++ b/library/std/src/sys/pal/unix/process/process_unix/tests.rs
  228. @@ -6,6 +6,7 @@
  229. // safety etc., are tested in tests/ui/process/process-panic-after-fork.rs
  230. #[test]
  231. +#[ignore]
  232. fn exitstatus_display_tests() {
  233. // In practice this is the same on every Unix.
  234. // If some weird platform turns out to be different, and this test fails, use #[cfg].
  235. @@ -37,6 +38,7 @@
  236. }
  237. #[test]
  238. +#[ignore]
  239. #[cfg_attr(target_os = "emscripten", ignore)]
  240. fn test_command_fork_no_unwind() {
  241. let got = catch_unwind(|| {
  242. diff --git a/library/std/src/thread/tests.rs b/library/std/src/thread/tests.rs
  243. index 5d6b9e94ee9..a5aacb2eb87 100644
  244. --- a/library/std/src/thread/tests.rs
  245. +++ b/library/std/src/thread/tests.rs
  246. @@ -116,6 +116,7 @@ fn test_is_finished() {
  247. }
  248. #[test]
  249. +#[ignore]
  250. fn test_join_panic() {
  251. match thread::spawn(move || panic!()).join() {
  252. result::Result::Err(_) => (),
  253. @@ -218,6 +219,7 @@ fn test_simple_newsched_spawn() {
  254. }
  255. #[test]
  256. +#[ignore]
  257. fn test_try_panic_message_string_literal() {
  258. match thread::spawn(move || {
  259. panic!("static string");
  260. @@ -234,6 +236,7 @@ fn test_try_panic_message_string_literal() {
  261. }
  262. #[test]
  263. +#[ignore]
  264. fn test_try_panic_any_message_owned_str() {
  265. match thread::spawn(move || {
  266. panic_any("owned string".to_string());
  267. @@ -250,6 +253,7 @@ fn test_try_panic_any_message_owned_str() {
  268. }
  269. #[test]
  270. +#[ignore]
  271. fn test_try_panic_any_message_any() {
  272. match thread::spawn(move || {
  273. panic_any(Box::new(413u16) as Box<dyn Any + Send>);
  274. @@ -268,6 +272,7 @@ fn test_try_panic_any_message_any() {
  275. }
  276. #[test]
  277. +#[ignore]
  278. fn test_try_panic_any_message_unit_struct() {
  279. struct Juju;
  280. diff --git a/library/test/src/tests.rs b/library/test/src/tests.rs
  281. --- a/library/test/src/tests.rs
  282. +++ b/library/test/src/tests.rs
  283. @@ -424,6 +424,7 @@
  284. }
  285. #[test]
  286. +#[ignore]
  287. fn test_time_options_threshold() {
  288. let unit = TimeThreshold::new(Duration::from_millis(50), Duration::from_millis(100));
  289. let integration = TimeThreshold::new(Duration::from_millis(500), Duration::from_millis(1000));
  290. diff --git a/library/std/src/sync/poison/mutex/tests.rs b/library/std/src/sync/poison/mutex/tests.rs
  291. --- a/library/std/src/sync/poison/mutex/tests.rs
  292. +++ b/library/std/src/sync/poison/mutex/tests.rs
  293. @@ -193,6 +193,7 @@
  294. }
  295. #[test]
  296. +#[ignore]
  297. fn test_mutex_arc_poison_mapped() {
  298. let arc = Arc::new(Mutex::new(1));
  299. assert!(!arc.is_poisoned());
  300. diff --git a/library/std/src/sync/poison/mutex/tests.rs b/library/std/src/sync/poison/mutex/tests.rs
  301. --- a/library/std/src/sync/poison/mutex/tests.rs
  302. +++ b/library/std/src/sync/poison/mutex/tests.rs
  303. @@ -272,6 +272,7 @@
  304. }
  305. #[test]
  306. +#[ignore]
  307. fn panic_while_mapping_unlocked_poison() {
  308. let lock = Mutex::new(());
  309. diff --git a/library/std/src/sync/rwlock/tests.rs b/library/std/src/sync/poison/rwlock/tests.rs
  310. --- a/library/std/src/sync/poison/rwlock/tests.rs
  311. +++ b/library/std/src/sync/poison/rwlock/tests.rs
  312. @@ -59,6 +59,7 @@ fn test_rw_arc_poison_wr() {
  313. }
  314. #[test]
  315. +#[ignore]
  316. fn test_rw_arc_poison_mapped_w_r() {
  317. let arc = Arc::new(RwLock::new(1));
  318. let arc2 = arc.clone();
  319. @@ -86,6 +87,7 @@ fn test_rw_arc_poison_ww() {
  320. }
  321. #[test]
  322. +#[ignore]
  323. fn test_rw_arc_poison_mapped_w_w() {
  324. let arc = Arc::new(RwLock::new(1));
  325. let arc2 = arc.clone();
  326. @@ -431,6 +433,7 @@ fn panic_while_mapping_read_unlocked_no_poison() {
  327. }
  328. #[test]
  329. +#[ignore]
  330. fn panic_while_mapping_write_unlocked_poison() {
  331. let lock = RwLock::new(());
  332. diff --git a/library/core/benches/num/int_log/mod.rs b/library/core/benches/num/int_log/mod.rs
  333. index 3807cd5d76c..018c5c04456 100644
  334. --- a/library/core/benches/num/int_log/mod.rs
  335. +++ b/library/core/benches/num/int_log/mod.rs
  336. @@ -98,6 +98,7 @@ fn $random_small(bench: &mut Bencher) {
  337. }
  338. #[bench]
  339. + #[ignore]
  340. fn $geometric(bench: &mut Bencher) {
  341. let bases: [$t; 16] = [2, 3, 4, 5, 7, 8, 9, 15, 16, 17, 31, 32, 33, 63, 64, 65];
  342. let base_and_numbers: Vec<($t, Vec<$t>)> = bases
  343. diff --git a/compiler/rustc_data_structures/src/tagged_ptr/copy/tests.rs b/compiler/rustc_data_structures/src/tagged_ptr/copy/tests.rs
  344. index 160af8a65d..686f4607bb 100644
  345. --- a/compiler/rustc_data_structures/src/tagged_ptr/copy/tests.rs
  346. +++ b/compiler/rustc_data_structures/src/tagged_ptr/copy/tests.rs
  347. @@ -5,6 +5,7 @@ use crate::stable_hasher::{HashStable, StableHasher};
  348. use crate::tagged_ptr::{CopyTaggedPtr, Pointer, Tag, Tag2};
  349. #[test]
  350. +#[ignore]
  351. fn smoke() {
  352. let value = 12u32;
  353. let reference = &value;
  354. @@ -28,6 +29,7 @@ fn smoke() {
  355. }
  356. #[test]
  357. +#[ignore]
  358. fn stable_hash_hashes_as_tuple() {
  359. let hash_packed = {
  360. let mut hasher = StableHasher::new();
  361. diff --git a/compiler/rustc_data_structures/src/tagged_ptr/drop/tests.rs b/compiler/rustc_data_structures/src/tagged_ptr/drop/tests.rs
  362. index 4d342c72cc..9a77f92616 100644
  363. --- a/compiler/rustc_data_structures/src/tagged_ptr/drop/tests.rs
  364. +++ b/compiler/rustc_data_structures/src/tagged_ptr/drop/tests.rs
  365. @@ -4,6 +4,7 @@ use std::sync::Arc;
  366. use crate::tagged_ptr::{Pointer, Tag, Tag2, TaggedPtr};
  367. #[test]
  368. +#[ignore]
  369. fn smoke() {
  370. let value = 12u32;
  371. let reference = &value;
  372. @@ -28,6 +29,7 @@ fn smoke() {
  373. }
  374. #[test]
  375. +#[ignore]
  376. fn boxed() {
  377. let value = 12u32;
  378. let boxed = Box::new(value);
  379. @@ -52,6 +54,7 @@ fn boxed() {
  380. }
  381. #[test]
  382. +#[ignore]
  383. fn arclones() {
  384. let value = 12u32;
  385. let arc = Arc::new(value);
  386. diff --git a/library/std/src/thread/local/tests.rs b/library/std/src/thread/local/tests.rs
  387. index 9d4f52a092..d425e5f7b7 100644
  388. --- a/library/std/src/thread/local/tests.rs
  389. +++ b/library/std/src/thread/local/tests.rs
  390. @@ -346,6 +346,7 @@ fn join_orders_after_tls_destructors() {
  391. // Test that thread::current is still available in TLS destructors.
  392. #[test]
  393. +#[ignore]
  394. fn thread_current_in_dtor() {
  395. // Go through one round of TLS destruction first.
  396. struct Defer;
  397. diff --git a/library/alloc/tests/sort/tests.rs b/library/alloc/tests/sort/tests.rs
  398. index 14e6013f96..b670f27ab4 100644
  399. --- a/library/alloc/tests/sort/tests.rs
  400. +++ b/library/alloc/tests/sort/tests.rs
  401. @@ -915,12 +915,14 @@ gen_sort_test_fns_with_default_patterns_3_ty!(
  402. macro_rules! instantiate_sort_test_inner {
  403. ($sort_impl:ty, miri_yes, $test_fn_name:ident) => {
  404. #[test]
  405. + #[ignore]
  406. fn $test_fn_name() {
  407. $crate::sort::tests::$test_fn_name::<$sort_impl>();
  408. }
  409. };
  410. ($sort_impl:ty, miri_no, $test_fn_name:ident) => {
  411. #[test]
  412. + #[ignore]
  413. #[cfg_attr(miri, ignore)]
  414. fn $test_fn_name() {
  415. $crate::sort::tests::$test_fn_name::<$sort_impl>();
  416. diff --git a/compiler/rustc_data_structures/src/vec_cache/tests.rs b/compiler/rustc_data_structures/src/vec_cache/tests.rs
  417. index a05f274136..0e69b4cb98 100644
  418. --- a/compiler/rustc_data_structures/src/vec_cache/tests.rs
  419. +++ b/compiler/rustc_data_structures/src/vec_cache/tests.rs
  420. @@ -17,6 +17,7 @@ fn vec_cache_insert_and_check() {
  421. }
  422. #[test]
  423. +#[ignore]
  424. fn sparse_inserts() {
  425. let cache: VecCache<u32, u8, u32> = VecCache::default();
  426. let end = if cfg!(target_pointer_width = "64") && cfg!(target_os = "linux") {