@@ -401,6 +401,7 @@ macro_rules! function {
401
401
} } ;
402
402
}
403
403
404
+ #[ cfg( not( any( target_env = "musl" , target_os = "macos" , target_os = "windows" ) ) ) ]
404
405
#[ test]
405
406
fn test_snapshot_condvar ( ) {
406
407
let snapshot = TestBuilder :: new ( )
@@ -411,6 +412,7 @@ fn test_snapshot_condvar() {
411
412
}
412
413
413
414
// Test that the expected default directories are present.
415
+ #[ cfg( not( any( target_env = "musl" , target_os = "macos" , target_os = "windows" ) ) ) ]
414
416
#[ test]
415
417
fn test_snapshot_default_file_system_tree ( ) {
416
418
let snapshot = TestBuilder :: new ( )
@@ -422,6 +424,7 @@ fn test_snapshot_default_file_system_tree() {
422
424
423
425
// TODO: figure out why this hangs on Windows and Mac OS
424
426
#[ cfg( target_os = "linux" ) ]
427
+ #[ cfg( not( any( target_env = "musl" , target_os = "macos" , target_os = "windows" ) ) ) ]
425
428
#[ test]
426
429
fn test_snapshot_stdin_stdout_stderr ( ) {
427
430
let snapshot = TestBuilder :: new ( )
@@ -433,6 +436,7 @@ fn test_snapshot_stdin_stdout_stderr() {
433
436
}
434
437
435
438
// Piping to cowsay should, well.... display a cow that says something
439
+ #[ cfg( not( any( target_env = "musl" , target_os = "macos" , target_os = "windows" ) ) ) ]
436
440
#[ test]
437
441
fn test_snapshot_cowsay ( ) {
438
442
let snapshot = TestBuilder :: new ( )
@@ -442,6 +446,7 @@ fn test_snapshot_cowsay() {
442
446
assert_json_snapshot ! ( snapshot) ;
443
447
}
444
448
449
+ #[ cfg( not( any( target_env = "musl" , target_os = "macos" , target_os = "windows" ) ) ) ]
445
450
#[ test]
446
451
fn test_snapshot_epoll ( ) {
447
452
let snapshot = TestBuilder :: new ( )
@@ -450,6 +455,7 @@ fn test_snapshot_epoll() {
450
455
assert_json_snapshot ! ( snapshot) ;
451
456
}
452
457
458
+ #[ cfg( not( any( target_env = "musl" , target_os = "macos" , target_os = "windows" ) ) ) ]
453
459
#[ test]
454
460
fn test_snapshot_file_copy ( ) {
455
461
let snapshot = TestBuilder :: new ( )
@@ -462,6 +468,7 @@ fn test_snapshot_file_copy() {
462
468
assert_json_snapshot ! ( snapshot) ;
463
469
}
464
470
471
+ #[ cfg( not( any( target_env = "musl" , target_os = "macos" , target_os = "windows" ) ) ) ]
465
472
#[ test]
466
473
fn test_snapshot_execve ( ) {
467
474
let snapshot = TestBuilder :: new ( )
@@ -471,6 +478,7 @@ fn test_snapshot_execve() {
471
478
assert_json_snapshot ! ( snapshot) ;
472
479
}
473
480
481
+ #[ cfg( not( any( target_env = "musl" , target_os = "macos" , target_os = "windows" ) ) ) ]
474
482
#[ test]
475
483
fn test_snapshot_web_server ( ) {
476
484
let with_inner = || {
@@ -567,6 +575,7 @@ rm -f /cfg/config.toml
567
575
// The ability to fork the current process and run a different image but retain
568
576
// the existing open file handles (which is needed for stdin and stdout redirection)
569
577
#[ cfg( not( target_os = "windows" ) ) ]
578
+ #[ cfg( not( any( target_env = "musl" , target_os = "macos" , target_os = "windows" ) ) ) ]
570
579
#[ test]
571
580
fn test_snapshot_fork_and_exec ( ) {
572
581
let snapshot = TestBuilder :: new ( )
@@ -578,6 +587,7 @@ fn test_snapshot_fork_and_exec() {
578
587
579
588
// longjmp is used by C programs that save and restore the stack at specific
580
589
// points - this functionality is often used for exception handling
590
+ #[ cfg( not( any( target_env = "musl" , target_os = "macos" , target_os = "windows" ) ) ) ]
581
591
#[ test]
582
592
fn test_snapshot_longjump ( ) {
583
593
let snapshot = TestBuilder :: new ( )
@@ -589,6 +599,7 @@ fn test_snapshot_longjump() {
589
599
590
600
// Another longjump test.
591
601
// This one is initiated from `rust` code and thus has the risk of leaking memory but uses different interfaces
602
+ #[ cfg( not( any( target_env = "musl" , target_os = "macos" , target_os = "windows" ) ) ) ]
592
603
#[ test]
593
604
fn test_snapshot_longjump2 ( ) {
594
605
let snapshot = TestBuilder :: new ( )
@@ -599,6 +610,7 @@ fn test_snapshot_longjump2() {
599
610
}
600
611
601
612
// Simple fork example that is a crude multi-threading implementation - used by `dash`
613
+ #[ cfg( not( any( target_env = "musl" , target_os = "macos" , target_os = "windows" ) ) ) ]
602
614
#[ test]
603
615
fn test_snapshot_fork ( ) {
604
616
let snapshot = TestBuilder :: new ( )
@@ -610,6 +622,7 @@ fn test_snapshot_fork() {
610
622
611
623
// Uses the `fd_pipe` syscall to create a bidirection pipe with two file
612
624
// descriptors then forks the process to write and read to this pipe.
625
+ #[ cfg( not( any( target_env = "musl" , target_os = "macos" , target_os = "windows" ) ) ) ]
613
626
#[ test]
614
627
fn test_snapshot_pipes ( ) {
615
628
let snapshot = TestBuilder :: new ( )
@@ -623,6 +636,7 @@ fn test_snapshot_pipes() {
623
636
// This test ensures that the stacks that have been recorded are preserved
624
637
// after a fork.
625
638
// The behavior is needed for `dash`
639
+ #[ cfg( not( any( target_env = "musl" , target_os = "macos" , target_os = "windows" ) ) ) ]
626
640
#[ test]
627
641
fn test_snapshot_longjump_fork ( ) {
628
642
let snapshot = TestBuilder :: new ( )
@@ -632,6 +646,7 @@ fn test_snapshot_longjump_fork() {
632
646
}
633
647
634
648
// full multi-threading with shared memory and shared compiled modules
649
+ #[ cfg( not( any( target_env = "musl" , target_os = "macos" , target_os = "windows" ) ) ) ]
635
650
#[ test]
636
651
fn test_snapshot_multithreading ( ) {
637
652
let snapshot = TestBuilder :: new ( )
@@ -643,6 +658,7 @@ fn test_snapshot_multithreading() {
643
658
644
659
// full multi-threading with shared memory and shared compiled modules
645
660
#[ cfg( target_os = "linux" ) ]
661
+ #[ cfg( not( any( target_env = "musl" , target_os = "macos" , target_os = "windows" ) ) ) ]
646
662
#[ test]
647
663
fn test_snapshot_sleep ( ) {
648
664
let snapshot = TestBuilder :: new ( )
@@ -653,6 +669,7 @@ fn test_snapshot_sleep() {
653
669
654
670
// Uses `posix_spawn` to launch a sub-process and wait on it to exit
655
671
#[ cfg( not( target_os = "windows" ) ) ]
672
+ #[ cfg( not( any( target_env = "musl" , target_os = "macos" , target_os = "windows" ) ) ) ]
656
673
#[ test]
657
674
fn test_snapshot_process_spawn ( ) {
658
675
let snapshot = TestBuilder :: new ( )
@@ -675,6 +692,7 @@ fn test_snapshot_process_spawn() {
675
692
676
693
// Tests that thread local variables work correctly
677
694
#[ cfg( target_os = "linux" ) ]
695
+ #[ cfg( not( any( target_env = "musl" , target_os = "macos" , target_os = "windows" ) ) ) ]
678
696
#[ test]
679
697
fn test_snapshot_thread_locals ( ) {
680
698
let mut snapshot = TestBuilder :: new ( )
@@ -696,6 +714,7 @@ fn test_snapshot_thread_locals() {
696
714
697
715
// Tests that lightweight forking that does not copy the memory but retains the
698
716
// open file descriptors works correctly.
717
+ #[ cfg( not( any( target_env = "musl" , target_os = "macos" , target_os = "windows" ) ) ) ]
699
718
#[ test]
700
719
fn test_snapshot_vfork ( ) {
701
720
let snapshot = TestBuilder :: new ( )
@@ -705,6 +724,7 @@ fn test_snapshot_vfork() {
705
724
assert_json_snapshot ! ( snapshot) ;
706
725
}
707
726
727
+ #[ cfg( not( any( target_env = "musl" , target_os = "macos" , target_os = "windows" ) ) ) ]
708
728
#[ test]
709
729
fn test_snapshot_signals ( ) {
710
730
let snapshot = TestBuilder :: new ( )
@@ -714,6 +734,7 @@ fn test_snapshot_signals() {
714
734
}
715
735
716
736
#[ cfg( target_os = "linux" ) ]
737
+ #[ cfg( not( any( target_env = "musl" , target_os = "macos" , target_os = "windows" ) ) ) ]
717
738
#[ test]
718
739
fn test_snapshot_dash_echo ( ) {
719
740
let snapshot = TestBuilder :: new ( )
@@ -723,6 +744,7 @@ fn test_snapshot_dash_echo() {
723
744
assert_json_snapshot ! ( snapshot) ;
724
745
}
725
746
747
+ #[ cfg( not( any( target_env = "musl" , target_os = "macos" , target_os = "windows" ) ) ) ]
726
748
#[ test]
727
749
fn test_snapshot_dash_echo_to_cat ( ) {
728
750
let snapshot = TestBuilder :: new ( )
@@ -733,6 +755,7 @@ fn test_snapshot_dash_echo_to_cat() {
733
755
assert_json_snapshot ! ( snapshot) ;
734
756
}
735
757
758
+ #[ cfg( not( any( target_env = "musl" , target_os = "macos" , target_os = "windows" ) ) ) ]
736
759
#[ test]
737
760
fn test_snapshot_dash_python ( ) {
738
761
let snapshot = TestBuilder :: new ( )
@@ -744,6 +767,7 @@ fn test_snapshot_dash_python() {
744
767
assert_json_snapshot ! ( snapshot) ;
745
768
}
746
769
770
+ #[ cfg( not( any( target_env = "musl" , target_os = "macos" , target_os = "windows" ) ) ) ]
747
771
#[ test]
748
772
fn test_snapshot_dash_dev_zero ( ) {
749
773
let snapshot = TestBuilder :: new ( )
@@ -754,6 +778,7 @@ fn test_snapshot_dash_dev_zero() {
754
778
assert_json_snapshot ! ( snapshot) ;
755
779
}
756
780
781
+ #[ cfg( not( any( target_env = "musl" , target_os = "macos" , target_os = "windows" ) ) ) ]
757
782
#[ test]
758
783
fn test_snapshot_dash_dev_urandom ( ) {
759
784
let snapshot = TestBuilder :: new ( )
@@ -764,6 +789,7 @@ fn test_snapshot_dash_dev_urandom() {
764
789
assert_json_snapshot ! ( snapshot) ;
765
790
}
766
791
792
+ #[ cfg( not( any( target_env = "musl" , target_os = "macos" , target_os = "windows" ) ) ) ]
767
793
#[ test]
768
794
fn test_snapshot_dash_dash ( ) {
769
795
let snapshot = TestBuilder :: new ( )
@@ -774,6 +800,7 @@ fn test_snapshot_dash_dash() {
774
800
assert_json_snapshot ! ( snapshot) ;
775
801
}
776
802
803
+ #[ cfg( not( any( target_env = "musl" , target_os = "macos" , target_os = "windows" ) ) ) ]
777
804
#[ test]
778
805
fn test_snapshot_dash_bash ( ) {
779
806
let snapshot = TestBuilder :: new ( )
@@ -784,6 +811,7 @@ fn test_snapshot_dash_bash() {
784
811
assert_json_snapshot ! ( snapshot) ;
785
812
}
786
813
814
+ #[ cfg( not( any( target_env = "musl" , target_os = "macos" , target_os = "windows" ) ) ) ]
787
815
#[ test]
788
816
fn test_snapshot_bash_echo ( ) {
789
817
let snapshot = TestBuilder :: new ( )
@@ -793,6 +821,7 @@ fn test_snapshot_bash_echo() {
793
821
assert_json_snapshot ! ( snapshot) ;
794
822
}
795
823
824
+ #[ cfg( not( any( target_env = "musl" , target_os = "macos" , target_os = "windows" ) ) ) ]
796
825
#[ test]
797
826
fn test_snapshot_bash_ls ( ) {
798
827
let snapshot = TestBuilder :: new ( )
@@ -803,6 +832,7 @@ fn test_snapshot_bash_ls() {
803
832
assert_json_snapshot ! ( snapshot) ;
804
833
}
805
834
835
+ #[ cfg( not( any( target_env = "musl" , target_os = "macos" , target_os = "windows" ) ) ) ]
806
836
#[ test]
807
837
fn test_snapshot_bash_pipe ( ) {
808
838
let snapshot = TestBuilder :: new ( )
@@ -813,6 +843,7 @@ fn test_snapshot_bash_pipe() {
813
843
assert_json_snapshot ! ( snapshot) ;
814
844
}
815
845
846
+ #[ cfg( not( any( target_env = "musl" , target_os = "macos" , target_os = "windows" ) ) ) ]
816
847
#[ test]
817
848
fn test_snapshot_bash_python ( ) {
818
849
let snapshot = TestBuilder :: new ( )
@@ -824,6 +855,7 @@ fn test_snapshot_bash_python() {
824
855
assert_json_snapshot ! ( snapshot) ;
825
856
}
826
857
858
+ #[ cfg( not( any( target_env = "musl" , target_os = "macos" , target_os = "windows" ) ) ) ]
827
859
#[ test]
828
860
fn test_snapshot_bash_bash ( ) {
829
861
let snapshot = TestBuilder :: new ( )
@@ -834,6 +866,7 @@ fn test_snapshot_bash_bash() {
834
866
assert_json_snapshot ! ( snapshot) ;
835
867
}
836
868
869
+ #[ cfg( not( any( target_env = "musl" , target_os = "macos" , target_os = "windows" ) ) ) ]
837
870
#[ test]
838
871
fn test_snapshot_bash_dash ( ) {
839
872
let snapshot = TestBuilder :: new ( )
@@ -844,6 +877,7 @@ fn test_snapshot_bash_dash() {
844
877
assert_json_snapshot ! ( snapshot) ;
845
878
}
846
879
880
+ #[ cfg( not( any( target_env = "musl" , target_os = "macos" , target_os = "windows" ) ) ) ]
847
881
#[ test]
848
882
fn test_snapshot_catsay ( ) {
849
883
let snapshot = TestBuilder :: new ( )
@@ -853,6 +887,7 @@ fn test_snapshot_catsay() {
853
887
assert_json_snapshot ! ( snapshot) ;
854
888
}
855
889
890
+ #[ cfg( not( any( target_env = "musl" , target_os = "macos" , target_os = "windows" ) ) ) ]
856
891
#[ test]
857
892
fn test_snapshot_quickjs ( ) {
858
893
let snapshot = TestBuilder :: new ( )
0 commit comments