@@ -671,7 +671,39 @@ fn test_kill_rekillable_task() {
671671 }
672672}
673673
674- #[ test] #[ should_fail]
674+ #[ test]
675+ #[ ignore( cfg( windows) ) ]
676+ #[ should_fail]
677+ fn test_rekillable_not_nested ( ) {
678+ do rekillable {
679+ // This should fail before
680+ // receiving anything since
681+ // this block should be nested
682+ // into a unkillable block.
683+ yield( ) ;
684+ }
685+ }
686+
687+
688+ #[ test]
689+ #[ ignore( cfg( windows) ) ]
690+ fn test_rekillable_nested_failure ( ) {
691+
692+ let result = do task:: try {
693+ do unkillable {
694+ do rekillable {
695+ let ( port, chan) = comm:: stream ( ) ;
696+ do task:: spawn { chan. send ( ( ) ) ; fail ! ( ) ; }
697+ port. recv ( ) ; // wait for child to exist
698+ port. recv ( ) ; // block forever, expect to get killed.
699+ }
700+ }
701+ } ;
702+ assert ! ( result. is_err( ) ) ;
703+ }
704+
705+
706+ #[ test] #[ should_fail] #[ ignore( cfg( windows) ) ]
675707fn test_cant_dup_task_builder ( ) {
676708 let mut builder = task ( ) ;
677709 builder. unlinked ( ) ;
@@ -1239,20 +1271,6 @@ fn test_unkillable_nested() {
12391271 po. recv ( ) ;
12401272}
12411273
1242- #[ ignore( reason = "linked failure" ) ]
1243- #[ test]
1244- #[ ignore( cfg( windows) ) ]
1245- #[ should_fail]
1246- fn test_rekillable_not_nested ( ) {
1247- do rekillable {
1248- // This should fail before
1249- // receiving anything since
1250- // this block should be nested
1251- // into a unkillable block.
1252- yield( ) ;
1253- }
1254- }
1255-
12561274#[ test]
12571275fn test_child_doesnt_ref_parent ( ) {
12581276 // If the child refcounts the parent task, this will stack overflow when
0 commit comments