diff options
Diffstat (limited to 'patches/panic_unwind_tests.patch')
-rw-r--r-- | patches/panic_unwind_tests.patch | 83 |
1 files changed, 37 insertions, 46 deletions
diff --git a/patches/panic_unwind_tests.patch b/patches/panic_unwind_tests.patch index c11065b..845de51 100644 --- a/patches/panic_unwind_tests.patch +++ b/patches/panic_unwind_tests.patch @@ -1,53 +1,44 @@ -diff --git a/patches/panic_unwind_tests.patch b/patches/panic_unwind_tests.patch -index adf431e..e69de29 100644 ---- a/patches/panic_unwind_tests.patch -+++ b/patches/panic_unwind_tests.patch -@@ -1,24 +0,0 @@ --diff --git a/tests/sync_broadcast.rs b/tests/sync_broadcast.rs --index 9aa3484..53ee7d8 100644 ----- a/tests/sync_broadcast.rs --+++ b/tests/sync_broadcast.rs --@@ -292,6 +292,7 @@ fn capacity_too_big() { -- -- #[test] --+#[cfg(panic = "unwind")] -- #[cfg(not(tokio_wasm))] // wasm currently doesn't support unwinding -- fn panic_in_clone() { -- use std::panic::{self, AssertUnwindSafe}; -- --diff --git a/tests/sync_watch.rs b/tests/sync_watch.rs --index 34f9b78..e8eacce 100644 ----- a/tests/sync_watch.rs --+++ b/tests/sync_watch.rs --@@ -214,6 +214,7 @@ fn reopened_after_subscribe() { -- -- #[test] --+#[cfg(panic = "unwind")] -- #[cfg(not(tokio_wasm))] // wasm currently doesn't support unwinding -- fn send_modify_panic() { -- let (tx, mut rx) = watch::channel("one"); -- -diff --git a/tests/sync_broadcast.rs b/tests/sync_broadcast.rs -index 67c378b..cd66924 100644 ---- a/tests/sync_broadcast.rs -+++ b/tests/sync_broadcast.rs -@@ -291,6 +291,7 @@ fn capacity_too_big() { - } +diff --git a/tests/rt_common.rs b/tests/rt_common.rs +index f5dce54..abca8dd 100644 +--- a/tests/rt_common.rs ++++ b/tests/rt_common.rs +@@ -845,6 +845,7 @@ rt_test! { + } + #[cfg_attr(target_os = "wasi", ignore = "Wasi does not support threads or panic recovery")] ++ #[cfg(panic = "unwind")] + #[test] + fn panic_in_task() { + let rt = rt(); +diff --git a/tests/task_abort.rs b/tests/task_abort.rs +index 4798246..481cc96 100644 +--- a/tests/task_abort.rs ++++ b/tests/task_abort.rs +@@ -176,6 +176,7 @@ fn test_abort_wakes_task_3964() { + /// Checks that aborting a task whose destructor panics does not allow the + /// panic to escape the task. #[test] +#[cfg(panic = "unwind")] - #[cfg(not(tokio_wasm))] // wasm currently doesn't support unwinding - fn panic_in_clone() { - use std::panic::{self, AssertUnwindSafe}; -diff --git a/tests/sync_watch.rs b/tests/sync_watch.rs -index 34f9b78..d4f8ce8 100644 ---- a/tests/sync_watch.rs -+++ b/tests/sync_watch.rs -@@ -213,6 +213,7 @@ fn reopened_after_subscribe() { + fn test_abort_task_that_panics_on_drop_contained() { + 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. + #[test] ++#[cfg(panic = "unwind")] + fn test_abort_task_that_panics_on_drop_returned() { + let rt = Builder::new_current_thread().enable_time().build().unwrap(); + +diff --git a/tests/task_blocking.rs b/tests/task_blocking.rs +index 62e20f6..4594498 100644 +--- a/tests/task_blocking.rs ++++ b/tests/task_blocking.rs +@@ -114,6 +114,7 @@ fn can_enter_current_thread_rt_from_within_block_in_place() { } #[test] +#[cfg(panic = "unwind")] - #[cfg(not(tokio_wasm))] // wasm currently doesn't support unwinding - fn send_modify_panic() { - let (tx, mut rx) = watch::channel("one"); + fn useful_panic_message_when_dropping_rt_in_rt() { + use std::panic::{catch_unwind, AssertUnwindSafe}; + |