Skip to content

Commit d7d52d0

Browse files
tammelatgross35
authored andcommitted
ci: clean up musl exceptions
Now that we have Linux 6.6 we can clean up some of the test exceptions. Not all of them can be removed, so the comments are updated if needed. Signed-off-by: Pedro Tammela <pctammela@gmail.com> (backport <rust-lang#3921>) (cherry picked from commit 55f9451) Signed-off-by: Trevor Gross <tmgross@umich.edu>
1 parent 637615e commit d7d52d0

File tree

1 file changed

+12
-152
lines changed

1 file changed

+12
-152
lines changed

libc-test/build.rs

+12-152
Original file line numberDiff line numberDiff line change
@@ -3576,8 +3576,7 @@ fn test_linux(target: &str) {
35763576
[gnu]: "linux/aio_abi.h",
35773577
"linux/can.h",
35783578
"linux/can/raw.h",
3579-
// FIXME: requires kernel headers >= 5.4.1.
3580-
[!musl]: "linux/can/j1939.h",
3579+
"linux/can/j1939.h",
35813580
"linux/dccp.h",
35823581
"linux/errqueue.h",
35833582
"linux/falloc.h",
@@ -3602,8 +3601,7 @@ fn test_linux(target: &str) {
36023601
"linux/mempolicy.h",
36033602
"linux/mman.h",
36043603
"linux/module.h",
3605-
// FIXME: requires kernel headers >= 5.1.
3606-
[!musl]: "linux/mount.h",
3604+
"linux/mount.h",
36073605
"linux/net_tstamp.h",
36083606
"linux/netfilter/nfnetlink.h",
36093607
"linux/netfilter/nfnetlink_log.h",
@@ -3615,11 +3613,10 @@ fn test_linux(target: &str) {
36153613
"linux/netfilter_ipv6.h",
36163614
"linux/netfilter_ipv6/ip6_tables.h",
36173615
"linux/netlink.h",
3618-
// FIXME: requires Linux >= 5.6:
3619-
[!musl]: "linux/openat2.h",
3616+
"linux/openat2.h",
36203617
// FIXME: some items require Linux >= 5.6:
36213618
"linux/ptp_clock.h",
3622-
[!musl]: "linux/ptrace.h",
3619+
"linux/ptrace.h",
36233620
"linux/quota.h",
36243621
"linux/random.h",
36253622
"linux/reboot.h",
@@ -3637,7 +3634,7 @@ fn test_linux(target: &str) {
36373634
"sys/fanotify.h",
36383635
// <sys/auxv.h> is not present on uclibc
36393636
[!uclibc]: "sys/auxv.h",
3640-
[gnu]: "linux/close_range.h",
3637+
[gnu || musl]: "linux/close_range.h",
36413638
}
36423639

36433640
// note: aio.h must be included before sys/mount.h
@@ -3728,11 +3725,6 @@ fn test_linux(target: &str) {
37283725
// specific type.
37293726
"Ioctl" => true,
37303727

3731-
// FIXME: requires >= 5.4.1 kernel headers
3732-
"pgn_t" if musl => true,
3733-
"priority_t" if musl => true,
3734-
"name_t" if musl => true,
3735-
37363728
// FIXME: "'__uint128' undeclared" in C
37373729
"__uint128" => true,
37383730

@@ -3751,22 +3743,6 @@ fn test_linux(target: &str) {
37513743
if ty.starts_with("__c_anonymous_") {
37523744
return true;
37533745
}
3754-
// FIXME: musl CI has old headers
3755-
if musl && ty.starts_with("uinput_") {
3756-
return true;
3757-
}
3758-
if musl && ty == "seccomp_notif" {
3759-
return true;
3760-
}
3761-
if musl && ty == "seccomp_notif_addfd" {
3762-
return true;
3763-
}
3764-
if musl && ty == "seccomp_notif_resp" {
3765-
return true;
3766-
}
3767-
if musl && ty == "seccomp_notif_sizes" {
3768-
return true;
3769-
}
37703746

37713747
// FIXME: CI has old headers
37723748
if ty == "ptp_sys_offset_extended" {
@@ -3850,12 +3826,6 @@ fn test_linux(target: &str) {
38503826
// Might differ between kernel versions
38513827
"open_how" => true,
38523828

3853-
// FIXME: requires >= 5.4.1 kernel headers
3854-
"j1939_filter" if musl => true,
3855-
3856-
// FIXME: requires >= 5.4 kernel headers
3857-
"sockaddr_can" if musl => true,
3858-
38593829
"sctp_initmsg" | "sctp_sndrcvinfo" | "sctp_sndinfo" | "sctp_rcvinfo"
38603830
| "sctp_nxtinfo" | "sctp_prinfo" | "sctp_authinfo" => true,
38613831

@@ -4020,7 +3990,7 @@ fn test_linux(target: &str) {
40203990
return true;
40213991
}
40223992
// FIXME: Requires >= 6.3 kernel headers
4023-
if name == "MFD_NOEXEC_SEAL" || name == "MFD_EXEC" {
3993+
if loongarch64 && (name == "MFD_NOEXEC_SEAL" || name == "MFD_EXEC") {
40243994
return true;
40253995
}
40263996
}
@@ -4110,7 +4080,7 @@ fn test_linux(target: &str) {
41104080
if sparc64 => true,
41114081

41124082
// FIXME: Not currently available in headers on ARM and musl.
4113-
"NETLINK_GET_STRICT_CHK" if arm || musl => true,
4083+
"NETLINK_GET_STRICT_CHK" if arm => true,
41144084

41154085
// kernel constants not available in uclibc 1.0.34
41164086
| "EXTPROC"
@@ -4179,62 +4149,14 @@ fn test_linux(target: &str) {
41794149
| "MINSIGSTKSZ"
41804150
if gnu => true,
41814151

4182-
// FIXME: Linux >= 5.10:
4183-
// https://github.com/torvalds/linux/commit/d25e2e9388eda61b6e298585024ee3355f50c493
4184-
"NF_INET_INGRESS" if musl => true,
4185-
41864152
// FIXME: Linux >= 5.16:
41874153
// https://github.com/torvalds/linux/commit/42df6e1d221dddc0f2acf2be37e68d553ad65f96
4188-
"NF_NETDEV_EGRESS" if musl || sparc64 => true,
4154+
"NF_NETDEV_EGRESS" if sparc64 => true,
41894155
// value changed
4190-
"NF_NETDEV_NUMHOOKS" if musl || sparc64 => true,
4191-
4192-
// FIXME: requires Linux >= 5.6:
4193-
| "RESOLVE_BENEATH"
4194-
| "RESOLVE_CACHED"
4195-
| "RESOLVE_IN_ROOT"
4196-
| "RESOLVE_NO_MAGICLINKS"
4197-
| "RESOLVE_NO_SYMLINKS"
4198-
| "RESOLVE_NO_XDEV" if musl => true,
4199-
4200-
// FIXME: requires Linux >= 5.4:
4201-
| "CAN_J1939"
4202-
| "CAN_NPROTO" if musl => true,
4203-
4204-
// FIXME: requires Linux >= 5.6
4205-
"GRND_INSECURE" if musl => true,
4206-
4207-
// FIXME: requires Linux >= 5.7:
4208-
"MREMAP_DONTUNMAP" if musl => true,
4156+
"NF_NETDEV_NUMHOOKS" if sparc64 => true,
42094157

42104158
// FIXME: requires Linux >= v5.8
4211-
"IF_LINK_MODE_TESTING" if musl || sparc64 => true,
4212-
4213-
// FIXME: Requires more recent kernel headers (5.9 / 5.11):
4214-
| "CLOSE_RANGE_UNSHARE"
4215-
| "CLOSE_RANGE_CLOEXEC" if musl => true,
4216-
4217-
// FIXME: requires Linux >= 5.12:
4218-
"MPOL_F_NUMA_BALANCING" if musl => true,
4219-
4220-
// FIXME: Requires more recent kernel headers
4221-
| "NFNL_SUBSYS_COUNT" // bumped in v5.14
4222-
| "NFNL_SUBSYS_HOOK" // v5.14+
4223-
| "NFULA_VLAN" // v5.4+
4224-
| "NFULA_L2HDR" // v5.4+
4225-
| "NFULA_VLAN_PROTO" // v5.4+
4226-
| "NFULA_VLAN_TCI" // v5.4+
4227-
| "NFULA_VLAN_UNSPEC" // v5.4+
4228-
| "RTNLGRP_NEXTHOP" // linux v5.3+
4229-
| "RTNLGRP_BRVLAN" // linux v5.6+
4230-
if musl => true,
4231-
4232-
| "MADV_COLD"
4233-
| "MADV_PAGEOUT"
4234-
| "MADV_POPULATE_READ"
4235-
| "MADV_POPULATE_WRITE"
4236-
if musl => true,
4237-
"CLONE_CLEAR_SIGHAND" | "CLONE_INTO_CGROUP" => true,
4159+
"IF_LINK_MODE_TESTING" if sparc64 => true,
42384160

42394161
// kernel 6.1 minimum
42404162
"MADV_COLLAPSE" => true,
@@ -4253,9 +4175,6 @@ fn test_linux(target: &str) {
42534175
=> true,
42544176
"SCTP_FUTURE_ASSOC" | "SCTP_CURRENT_ASSOC" | "SCTP_ALL_ASSOC" | "SCTP_PEER_ADDR_THLDS_V2" => true, // linux 5.5+
42554177

4256-
// FIXME: Requires more recent kernel headers
4257-
"HWTSTAMP_TX_ONESTEP_P2P" if musl => true, // linux v5.6+
4258-
42594178
// kernel 6.5 minimum
42604179
"MOVE_MOUNT_BENEATH" => true,
42614180
// FIXME: Requires linux 6.1
@@ -4277,10 +4196,8 @@ fn test_linux(target: &str) {
42774196
| "FAN_INFO" // linux v5.16+
42784197
=> true,
42794198

4280-
// FIXME: Requires linux 5.15+
4281-
"FAN_REPORT_PIDFD" if musl => true,
4282-
4283-
// FIXME: Requires linux 5.9+
4199+
// musl doesn't use <linux/fanotify.h> in <sys/fanotify.h>
4200+
"FAN_REPORT_PIDFD"
42844201
| "FAN_REPORT_DIR_FID"
42854202
| "FAN_REPORT_NAME"
42864203
| "FAN_REPORT_DFID_NAME"
@@ -4294,55 +4211,6 @@ fn test_linux(target: &str) {
42944211
// FIXME: Requires linux 6.5
42954212
"NFT_MSG_MAX" => true,
42964213

4297-
// FIXME: Requires >= 5.1 kernel headers.
4298-
// Everything that uses install-musl.sh has 4.19 kernel headers.
4299-
"TLS_1_3_VERSION"
4300-
| "TLS_1_3_VERSION_MAJOR"
4301-
| "TLS_1_3_VERSION_MINOR"
4302-
| "TLS_CIPHER_AES_GCM_256"
4303-
| "TLS_CIPHER_AES_GCM_256_IV_SIZE"
4304-
| "TLS_CIPHER_AES_GCM_256_KEY_SIZE"
4305-
| "TLS_CIPHER_AES_GCM_256_SALT_SIZE"
4306-
| "TLS_CIPHER_AES_GCM_256_TAG_SIZE"
4307-
| "TLS_CIPHER_AES_GCM_256_REC_SEQ_SIZE"
4308-
if (aarch64 || arm || i686 || s390x || x86_64) && musl =>
4309-
{
4310-
true
4311-
}
4312-
4313-
// FIXME: Requires >= 5.11 kernel headers.
4314-
// Everything that uses install-musl.sh has 4.19 kernel headers.
4315-
"TLS_CIPHER_CHACHA20_POLY1305"
4316-
| "TLS_CIPHER_CHACHA20_POLY1305_IV_SIZE"
4317-
| "TLS_CIPHER_CHACHA20_POLY1305_KEY_SIZE"
4318-
| "TLS_CIPHER_CHACHA20_POLY1305_SALT_SIZE"
4319-
| "TLS_CIPHER_CHACHA20_POLY1305_TAG_SIZE"
4320-
| "TLS_CIPHER_CHACHA20_POLY1305_REC_SEQ_SIZE"
4321-
if (aarch64 || arm || i686 || s390x || x86_64) && musl =>
4322-
{
4323-
true
4324-
}
4325-
4326-
// FIXME: Requires >= 5.3 kernel headers.
4327-
// Everything that uses install-musl.sh has 4.19 kernel headers.
4328-
"XDP_OPTIONS_ZEROCOPY" | "XDP_OPTIONS"
4329-
if musl =>
4330-
{
4331-
true
4332-
}
4333-
4334-
// FIXME: Requires >= 5.4 kernel headers.
4335-
// Everything that uses install-musl.sh has 4.19 kernel headers.
4336-
"XSK_UNALIGNED_BUF_OFFSET_SHIFT"
4337-
| "XSK_UNALIGNED_BUF_ADDR_MASK"
4338-
| "XDP_UMEM_UNALIGNED_CHUNK_FLAG"
4339-
| "XDP_RING_NEED_WAKEUP"
4340-
| "XDP_USE_NEED_WAKEUP"
4341-
if musl =>
4342-
{
4343-
true
4344-
}
4345-
43464214
// FIXME: Requires >= 6.6 kernel headers.
43474215
"XDP_USE_SG"
43484216
| "XDP_PKT_CONTD"
@@ -4401,14 +4269,6 @@ fn test_linux(target: &str) {
44014269
| "PF_MCE_EARLY"
44024270
| "PF_MEMALLOC_PIN" => true,
44034271

4404-
"SCHED_FLAG_KEEP_POLICY"
4405-
| "SCHED_FLAG_KEEP_PARAMS"
4406-
| "SCHED_FLAG_UTIL_CLAMP_MIN"
4407-
| "SCHED_FLAG_UTIL_CLAMP_MAX"
4408-
| "SCHED_FLAG_KEEP_ALL"
4409-
| "SCHED_FLAG_UTIL_CLAMP"
4410-
| "SCHED_FLAG_ALL" if musl => true, // Needs more recent linux headers.
4411-
44124272
// FIXME: Requires >= 6.9 kernel headers.
44134273
"EPIOCSPARAMS"
44144274
| "EPIOCGPARAMS" => true,

0 commit comments

Comments
 (0)