@@ -288,9 +288,9 @@ mod recvfrom {
288
288
use nix:: sys:: socket:: sockopt:: { UdpGroSegment , UdpGsoSegment } ;
289
289
290
290
#[ test]
291
- // Disable the test on emulated platforms because it fails in Cirrus-CI. Lack of QEMU
292
- // support is suspected.
293
- #[ cfg_attr( not ( any ( target_arch = "x86_64" , target_arch= "i686" ) ) , ignore) ]
291
+ // Disable the test under emulation because it fails in Cirrus-CI. Lack
292
+ // of QEMU support is suspected.
293
+ #[ cfg_attr( qemu , ignore) ]
294
294
pub fn gso ( ) {
295
295
require_kernel_version ! ( udp_offload:: gso, ">= 4.18" ) ;
296
296
@@ -342,9 +342,9 @@ mod recvfrom {
342
342
}
343
343
344
344
#[ test]
345
- // Disable the test on emulated platforms because it fails in Cirrus-CI. Lack of QEMU
346
- // support is suspected.
347
- #[ cfg_attr( not ( any ( target_arch = "x86_64" , target_arch= "i686" ) ) , ignore) ]
345
+ // Disable the test on emulated platforms because it fails in Cirrus-CI.
346
+ // Lack of QEMU support is suspected.
347
+ #[ cfg_attr( qemu , ignore) ]
348
348
pub fn gro ( ) {
349
349
require_kernel_version ! ( udp_offload:: gro, ">= 5.3" ) ;
350
350
@@ -583,7 +583,7 @@ pub fn test_recvmsg_ebadf() {
583
583
584
584
// Disable the test on emulated platforms due to a bug in QEMU versions <
585
585
// 2.12.0. https://bugs.launchpad.net/qemu/+bug/1701808
586
- #[ cfg_attr( not ( any ( target_arch = "x86_64" , target_arch= "i686" ) ) , ignore) ]
586
+ #[ cfg_attr( qemu , ignore) ]
587
587
#[ test]
588
588
pub fn test_scm_rights ( ) {
589
589
use nix:: sys:: uio:: IoVec ;
@@ -637,8 +637,8 @@ pub fn test_scm_rights() {
637
637
}
638
638
639
639
// Disable the test on emulated platforms due to not enabled support of AF_ALG in QEMU from rust cross
640
- #[ cfg_attr( not( any( target_arch = "x86_64" , target_arch = "i686" ) ) , ignore) ]
641
640
#[ cfg( any( target_os = "linux" , target_os= "android" ) ) ]
641
+ #[ cfg_attr( qemu, ignore) ]
642
642
#[ test]
643
643
pub fn test_af_alg_cipher ( ) {
644
644
use libc;
@@ -705,9 +705,10 @@ pub fn test_af_alg_cipher() {
705
705
assert_eq ! ( decrypted, payload) ;
706
706
}
707
707
708
- // Disable the test on emulated platforms due to not enabled support of AF_ALG in QEMU from rust cross
709
- # [ cfg_attr ( not ( any ( target_arch = "x86_64" , target_arch = "i686" ) ) , ignore ) ]
708
+ // Disable the test on emulated platforms due to not enabled support of AF_ALG
709
+ // in QEMU from rust cross
710
710
#[ cfg( any( target_os = "linux" , target_os= "android" ) ) ]
711
+ #[ cfg_attr( qemu, ignore) ]
711
712
#[ test]
712
713
pub fn test_af_alg_aead ( ) {
713
714
use libc:: { ALG_OP_DECRYPT , ALG_OP_ENCRYPT } ;
@@ -910,7 +911,7 @@ pub fn test_sendmsg_ipv6packetinfo() {
910
911
/// Tests that passing multiple fds using a single `ControlMessage` works.
911
912
// Disable the test on emulated platforms due to a bug in QEMU versions <
912
913
// 2.12.0. https://bugs.launchpad.net/qemu/+bug/1701808
913
- #[ cfg_attr( not ( any ( target_arch = "x86_64" , target_arch= "i686" ) ) , ignore) ]
914
+ #[ cfg_attr( qemu , ignore) ]
914
915
#[ test]
915
916
fn test_scm_rights_single_cmsg_multiple_fds ( ) {
916
917
use std:: os:: unix:: net:: UnixDatagram ;
@@ -1057,9 +1058,9 @@ fn test_scm_credentials() {
1057
1058
/// Ensure that we can send `SCM_CREDENTIALS` and `SCM_RIGHTS` with a single
1058
1059
/// `sendmsg` call.
1059
1060
#[ cfg( any( target_os = "android" , target_os = "linux" ) ) ]
1060
- // qemu's handling of multiple cmsgs is bugged, ignore tests on non-x86
1061
+ // qemu's handling of multiple cmsgs is bugged, ignore tests under emulation
1061
1062
// see https://bugs.launchpad.net/qemu/+bug/1781280
1062
- #[ cfg_attr( not ( any ( target_arch = "x86_64" , target_arch = "x86" ) ) , ignore) ]
1063
+ #[ cfg_attr( qemu , ignore) ]
1063
1064
#[ test]
1064
1065
fn test_scm_credentials_and_rights ( ) {
1065
1066
use libc;
@@ -1071,9 +1072,9 @@ fn test_scm_credentials_and_rights() {
1071
1072
/// Ensure that passing a an oversized control message buffer to recvmsg
1072
1073
/// still works.
1073
1074
#[ cfg( any( target_os = "android" , target_os = "linux" ) ) ]
1074
- // qemu's handling of multiple cmsgs is bugged, ignore tests on non-x86
1075
+ // qemu's handling of multiple cmsgs is bugged, ignore tests under emulation
1075
1076
// see https://bugs.launchpad.net/qemu/+bug/1781280
1076
- #[ cfg_attr( not ( any ( target_arch = "x86_64" , target_arch = "x86" ) ) , ignore) ]
1077
+ #[ cfg_attr( qemu , ignore) ]
1077
1078
#[ test]
1078
1079
fn test_too_large_cmsgspace ( ) {
1079
1080
let space = vec ! [ 0u8 ; 1024 ] ;
@@ -1262,10 +1263,13 @@ fn loopback_address(family: AddressFamily) -> Option<nix::ifaddrs::InterfaceAddr
1262
1263
target_os = "netbsd" ,
1263
1264
) ) ]
1264
1265
// qemu doesn't seem to be emulating this correctly in these architectures
1265
- #[ cfg_attr( any(
1266
- target_arch = "mips" ,
1267
- target_arch = "mips64" ,
1268
- target_arch = "powerpc64" ,
1266
+ #[ cfg_attr( all(
1267
+ qemu,
1268
+ any(
1269
+ target_arch = "mips" ,
1270
+ target_arch = "mips64" ,
1271
+ target_arch = "powerpc64" ,
1272
+ )
1269
1273
) , ignore) ]
1270
1274
#[ test]
1271
1275
pub fn test_recv_ipv4pktinfo ( ) {
@@ -1352,10 +1356,13 @@ pub fn test_recv_ipv4pktinfo() {
1352
1356
target_os = "openbsd" ,
1353
1357
) ) ]
1354
1358
// qemu doesn't seem to be emulating this correctly in these architectures
1355
- #[ cfg_attr( any(
1356
- target_arch = "mips" ,
1357
- target_arch = "mips64" ,
1358
- target_arch = "powerpc64" ,
1359
+ #[ cfg_attr( all(
1360
+ qemu,
1361
+ any(
1362
+ target_arch = "mips" ,
1363
+ target_arch = "mips64" ,
1364
+ target_arch = "powerpc64" ,
1365
+ )
1359
1366
) , ignore) ]
1360
1367
#[ test]
1361
1368
pub fn test_recvif ( ) {
@@ -1463,10 +1470,13 @@ pub fn test_recvif() {
1463
1470
target_os = "openbsd" ,
1464
1471
) ) ]
1465
1472
// qemu doesn't seem to be emulating this correctly in these architectures
1466
- #[ cfg_attr( any(
1467
- target_arch = "mips" ,
1468
- target_arch = "mips64" ,
1469
- target_arch = "powerpc64" ,
1473
+ #[ cfg_attr( all(
1474
+ qemu,
1475
+ any(
1476
+ target_arch = "mips" ,
1477
+ target_arch = "mips64" ,
1478
+ target_arch = "powerpc64" ,
1479
+ )
1470
1480
) , ignore) ]
1471
1481
#[ test]
1472
1482
pub fn test_recv_ipv6pktinfo ( ) {
@@ -1544,6 +1554,7 @@ pub fn test_recv_ipv6pktinfo() {
1544
1554
}
1545
1555
1546
1556
#[ cfg( any( target_os = "android" , target_os = "linux" ) ) ]
1557
+ #[ cfg_attr( graviton, ignore = "Not supported by the CI environment" ) ]
1547
1558
#[ test]
1548
1559
pub fn test_vsock ( ) {
1549
1560
use libc;
@@ -1588,9 +1599,9 @@ pub fn test_vsock() {
1588
1599
thr. join ( ) . unwrap ( ) ;
1589
1600
}
1590
1601
1591
- // Disable the test on emulated platforms because it fails in Cirrus-CI. Lack of QEMU
1592
- // support is suspected.
1593
- #[ cfg_attr( not ( any ( target_arch = "x86_64" ) ) , ignore) ]
1602
+ // Disable the test on emulated platforms because it fails in Cirrus-CI. Lack
1603
+ // of QEMU support is suspected.
1604
+ #[ cfg_attr( qemu , ignore) ]
1594
1605
#[ cfg( all( target_os = "linux" ) ) ]
1595
1606
#[ test]
1596
1607
fn test_recvmsg_timestampns ( ) {
@@ -1639,9 +1650,9 @@ fn test_recvmsg_timestampns() {
1639
1650
nix:: unistd:: close ( in_socket) . unwrap ( ) ;
1640
1651
}
1641
1652
1642
- // Disable the test on emulated platforms because it fails in Cirrus-CI. Lack of QEMU
1643
- // support is suspected.
1644
- #[ cfg_attr( not ( any ( target_arch = "x86_64" ) ) , ignore) ]
1653
+ // Disable the test on emulated platforms because it fails in Cirrus-CI. Lack
1654
+ // of QEMU support is suspected.
1655
+ #[ cfg_attr( qemu , ignore) ]
1645
1656
#[ cfg( all( target_os = "linux" ) ) ]
1646
1657
#[ test]
1647
1658
fn test_recvmmsg_timestampns ( ) {
@@ -1696,9 +1707,9 @@ fn test_recvmmsg_timestampns() {
1696
1707
nix:: unistd:: close ( in_socket) . unwrap ( ) ;
1697
1708
}
1698
1709
1699
- // Disable the test on emulated platforms because it fails in Cirrus-CI. Lack of QEMU
1700
- // support is suspected.
1701
- #[ cfg_attr( not ( any ( target_arch = "x86_64" ) ) , ignore) ]
1710
+ // Disable the test on emulated platforms because it fails in Cirrus-CI. Lack
1711
+ // of QEMU support is suspected.
1712
+ #[ cfg_attr( qemu , ignore) ]
1702
1713
#[ cfg( any( target_os = "android" , target_os = "fuchsia" , target_os = "linux" ) ) ]
1703
1714
#[ test]
1704
1715
fn test_recvmsg_rxq_ovfl ( ) {
0 commit comments