mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-10-01 12:20:39 +00:00
tokio: gate some panicking tests with #[cfg(panic = "unwind")]
(#6110)
This commit is contained in:
parent
f3949cc56d
commit
cc86fef9c0
@ -845,6 +845,7 @@ rt_test! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg_attr(target_os = "wasi", ignore = "Wasi does not support threads or panic recovery")]
|
#[cfg_attr(target_os = "wasi", ignore = "Wasi does not support threads or panic recovery")]
|
||||||
|
#[cfg(panic = "unwind")]
|
||||||
#[test]
|
#[test]
|
||||||
fn panic_in_task() {
|
fn panic_in_task() {
|
||||||
let rt = rt();
|
let rt = rt();
|
||||||
|
@ -176,6 +176,7 @@ fn test_abort_wakes_task_3964() {
|
|||||||
/// Checks that aborting a task whose destructor panics does not allow the
|
/// Checks that aborting a task whose destructor panics does not allow the
|
||||||
/// panic to escape the task.
|
/// panic to escape the task.
|
||||||
#[test]
|
#[test]
|
||||||
|
#[cfg(panic = "unwind")]
|
||||||
fn test_abort_task_that_panics_on_drop_contained() {
|
fn test_abort_task_that_panics_on_drop_contained() {
|
||||||
let rt = Builder::new_current_thread().enable_time().build().unwrap();
|
let rt = Builder::new_current_thread().enable_time().build().unwrap();
|
||||||
|
|
||||||
@ -199,6 +200,7 @@ fn test_abort_task_that_panics_on_drop_contained() {
|
|||||||
|
|
||||||
/// Checks that aborting a task whose destructor panics has the expected result.
|
/// Checks that aborting a task whose destructor panics has the expected result.
|
||||||
#[test]
|
#[test]
|
||||||
|
#[cfg(panic = "unwind")]
|
||||||
fn test_abort_task_that_panics_on_drop_returned() {
|
fn test_abort_task_that_panics_on_drop_returned() {
|
||||||
let rt = Builder::new_current_thread().enable_time().build().unwrap();
|
let rt = Builder::new_current_thread().enable_time().build().unwrap();
|
||||||
|
|
||||||
|
@ -114,6 +114,7 @@ fn can_enter_current_thread_rt_from_within_block_in_place() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
#[cfg(panic = "unwind")]
|
||||||
fn useful_panic_message_when_dropping_rt_in_rt() {
|
fn useful_panic_message_when_dropping_rt_in_rt() {
|
||||||
use std::panic::{catch_unwind, AssertUnwindSafe};
|
use std::panic::{catch_unwind, AssertUnwindSafe};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user