Skip to content

Commit 9575471

Browse files
committed
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>
1 parent 7169c6a commit 9575471

File tree

1 file changed

+12
-205
lines changed

1 file changed

+12
-205
lines changed

libc-test/build.rs

+12-205
Original file line numberDiff line numberDiff line change
@@ -3511,8 +3511,7 @@ fn test_linux(target: &str) {
35113511
[gnu]: "linux/aio_abi.h",
35123512
"linux/can.h",
35133513
"linux/can/raw.h",
3514-
// FIXME: requires kernel headers >= 5.4.1.
3515-
[!musl]: "linux/can/j1939.h",
3514+
"linux/can/j1939.h",
35163515
"linux/dccp.h",
35173516
"linux/errqueue.h",
35183517
"linux/falloc.h",
@@ -3537,8 +3536,7 @@ fn test_linux(target: &str) {
35373536
"linux/mempolicy.h",
35383537
"linux/mman.h",
35393538
"linux/module.h",
3540-
// FIXME: requires kernel headers >= 5.1.
3541-
[!musl]: "linux/mount.h",
3539+
"linux/mount.h",
35423540
"linux/net_tstamp.h",
35433541
"linux/netfilter/nfnetlink.h",
35443542
"linux/netfilter/nfnetlink_log.h",
@@ -3550,9 +3548,8 @@ fn test_linux(target: &str) {
35503548
"linux/netfilter_ipv6.h",
35513549
"linux/netfilter_ipv6/ip6_tables.h",
35523550
"linux/netlink.h",
3553-
// FIXME: requires Linux >= 5.6:
3554-
[!musl]: "linux/openat2.h",
3555-
[!musl]: "linux/ptrace.h",
3551+
"linux/openat2.h",
3552+
"linux/ptrace.h",
35563553
"linux/quota.h",
35573554
"linux/random.h",
35583555
"linux/reboot.h",
@@ -3570,7 +3567,7 @@ fn test_linux(target: &str) {
35703567
"sys/fanotify.h",
35713568
// <sys/auxv.h> is not present on uclibc
35723569
[!uclibc]: "sys/auxv.h",
3573-
[gnu]: "linux/close_range.h",
3570+
[gnu || musl]: "linux/close_range.h",
35743571
}
35753572

35763573
// note: aio.h must be included before sys/mount.h
@@ -3661,11 +3658,6 @@ fn test_linux(target: &str) {
36613658
// specific type.
36623659
"Ioctl" => true,
36633660

3664-
// FIXME: requires >= 5.4.1 kernel headers
3665-
"pgn_t" if musl => true,
3666-
"priority_t" if musl => true,
3667-
"name_t" if musl => true,
3668-
36693661
// FIXME: "'__uint128' undeclared" in C
36703662
"__uint128" => true,
36713663

@@ -3684,22 +3676,6 @@ fn test_linux(target: &str) {
36843676
if ty.starts_with("__c_anonymous_") {
36853677
return true;
36863678
}
3687-
// FIXME: musl CI has old headers
3688-
if musl && ty.starts_with("uinput_") {
3689-
return true;
3690-
}
3691-
if musl && ty == "seccomp_notif" {
3692-
return true;
3693-
}
3694-
if musl && ty == "seccomp_notif_addfd" {
3695-
return true;
3696-
}
3697-
if musl && ty == "seccomp_notif_resp" {
3698-
return true;
3699-
}
3700-
if musl && ty == "seccomp_notif_sizes" {
3701-
return true;
3702-
}
37033679

37043680
// LFS64 types have been removed in musl 1.2.4+
37053681
if musl && (ty.ends_with("64") || ty.ends_with("64_t")) {
@@ -3778,12 +3754,6 @@ fn test_linux(target: &str) {
37783754
// Might differ between kernel versions
37793755
"open_how" => true,
37803756

3781-
// FIXME: requires >= 5.4.1 kernel headers
3782-
"j1939_filter" if musl => true,
3783-
3784-
// FIXME: requires >= 5.4 kernel headers
3785-
"sockaddr_can" if musl => true,
3786-
37873757
"sctp_initmsg" | "sctp_sndrcvinfo" | "sctp_sndinfo" | "sctp_rcvinfo"
37883758
| "sctp_nxtinfo" | "sctp_prinfo" | "sctp_authinfo" => true,
37893759

@@ -3794,34 +3764,6 @@ fn test_linux(target: &str) {
37943764
// https://github.com/torvalds/linux/commit/94dfc73e7cf4a31da66b8843f0b9283ddd6b8381
37953765
"af_alg_iv" => true,
37963766

3797-
// FIXME: Requires >= 5.1 kernel headers.
3798-
// Everything that uses install-musl.sh has 4.19 kernel headers.
3799-
"tls12_crypto_info_aes_gcm_256"
3800-
if (aarch64 || arm || i686 || s390x || x86_64) && musl =>
3801-
{
3802-
true
3803-
}
3804-
3805-
// FIXME: Requires >= 5.11 kernel headers.
3806-
// Everything that uses install-musl.sh has 4.19 kernel headers.
3807-
"tls12_crypto_info_chacha20_poly1305"
3808-
if (aarch64 || arm || i686 || s390x || x86_64) && musl =>
3809-
{
3810-
true
3811-
}
3812-
3813-
// FIXME: Requires >= 5.3 kernel headers.
3814-
// Everything that uses install-musl.sh has 4.19 kernel headers.
3815-
"xdp_options" if musl => true,
3816-
3817-
// FIXME: Requires >= 5.4 kernel headers.
3818-
// Everything that uses install-musl.sh has 4.19 kernel headers.
3819-
"xdp_umem_reg" | "xdp_ring_offset" | "xdp_mmap_offsets" if musl => true,
3820-
3821-
// FIXME: Requires >= 5.9 kernel headers.
3822-
// Everything that uses install-musl.sh has 4.19 kernel headers.
3823-
"xdp_statistics" if musl => true,
3824-
38253767
// A new field was added in kernel 5.4, this is the old version for backwards compatibility.
38263768
// https://github.com/torvalds/linux/commit/77cd0d7b3f257fd0e3096b4fdcff1a7d38e99e10
38273769
"xdp_ring_offset_v1" | "xdp_mmap_offsets_v1" => true,
@@ -3885,31 +3827,6 @@ fn test_linux(target: &str) {
38853827
}
38863828
}
38873829
if musl {
3888-
// FIXME: Requires >= 5.0 kernel headers
3889-
if name == "SECCOMP_GET_NOTIF_SIZES"
3890-
|| name == "SECCOMP_FILTER_FLAG_NEW_LISTENER"
3891-
|| name == "SECCOMP_FILTER_FLAG_TSYNC_ESRCH"
3892-
|| name == "SECCOMP_USER_NOTIF_FLAG_CONTINUE" // requires >= 5.5
3893-
|| name == "SECCOMP_ADDFD_FLAG_SETFD" // requires >= 5.9
3894-
|| name == "SECCOMP_ADDFD_FLAG_SEND" // requires >= 5.9
3895-
|| name == "SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV" // requires >= 5.19
3896-
{
3897-
return true;
3898-
}
3899-
// FIXME: Requires >= 5.4.1 kernel headers
3900-
if name.starts_with("J1939")
3901-
|| name.starts_with("RTEXT_FILTER_")
3902-
|| name.starts_with("SO_J1939")
3903-
|| name.starts_with("SCM_J1939")
3904-
{
3905-
return true;
3906-
}
3907-
// FIXME: Requires >= 5.10 kernel headers
3908-
if name.starts_with("MEMBARRIER_CMD_REGISTER")
3909-
|| name.starts_with("MEMBARRIER_CMD_PRIVATE")
3910-
{
3911-
return true;
3912-
}
39133830
// LFS64 types have been removed in musl 1.2.4+
39143831
if name.starts_with("RLIM64") {
39153832
return true;
@@ -3919,7 +3836,7 @@ fn test_linux(target: &str) {
39193836
return true;
39203837
}
39213838
// FIXME: Requires >= 6.3 kernel headers
3922-
if name == "MFD_NOEXEC_SEAL" || name == "MFD_EXEC" {
3839+
if loongarch64 && (name == "MFD_NOEXEC_SEAL" || name == "MFD_EXEC") {
39233840
return true;
39243841
}
39253842
}
@@ -4006,7 +3923,7 @@ fn test_linux(target: &str) {
40063923
"SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV" if sparc64 => true,
40073924

40083925
// FIXME: Not currently available in headers on ARM and musl.
4009-
"NETLINK_GET_STRICT_CHK" if arm || musl => true,
3926+
"NETLINK_GET_STRICT_CHK" if arm => true,
40103927

40113928
// kernel constants not available in uclibc 1.0.34
40123929
| "EXTPROC"
@@ -4075,62 +3992,14 @@ fn test_linux(target: &str) {
40753992
| "MINSIGSTKSZ"
40763993
if gnu => true,
40773994

4078-
// FIXME: Linux >= 5.10:
4079-
// https://github.com/torvalds/linux/commit/d25e2e9388eda61b6e298585024ee3355f50c493
4080-
"NF_INET_INGRESS" if musl => true,
4081-
40823995
// FIXME: Linux >= 5.16:
40833996
// https://github.com/torvalds/linux/commit/42df6e1d221dddc0f2acf2be37e68d553ad65f96
4084-
"NF_NETDEV_EGRESS" if musl || sparc64 => true,
3997+
"NF_NETDEV_EGRESS" if sparc64 => true,
40853998
// value changed
4086-
"NF_NETDEV_NUMHOOKS" if musl || sparc64 => true,
4087-
4088-
// FIXME: requires Linux >= 5.6:
4089-
| "RESOLVE_BENEATH"
4090-
| "RESOLVE_CACHED"
4091-
| "RESOLVE_IN_ROOT"
4092-
| "RESOLVE_NO_MAGICLINKS"
4093-
| "RESOLVE_NO_SYMLINKS"
4094-
| "RESOLVE_NO_XDEV" if musl => true,
4095-
4096-
// FIXME: requires Linux >= 5.4:
4097-
| "CAN_J1939"
4098-
| "CAN_NPROTO" if musl => true,
4099-
4100-
// FIXME: requires Linux >= 5.6
4101-
"GRND_INSECURE" if musl => true,
4102-
4103-
// FIXME: requires Linux >= 5.7:
4104-
"MREMAP_DONTUNMAP" if musl => true,
3999+
"NF_NETDEV_NUMHOOKS" if sparc64 => true,
41054000

41064001
// FIXME: requires Linux >= v5.8
4107-
"IF_LINK_MODE_TESTING" if musl || sparc64 => true,
4108-
4109-
// FIXME: Requires more recent kernel headers (5.9 / 5.11):
4110-
| "CLOSE_RANGE_UNSHARE"
4111-
| "CLOSE_RANGE_CLOEXEC" if musl => true,
4112-
4113-
// FIXME: requires Linux >= 5.12:
4114-
"MPOL_F_NUMA_BALANCING" if musl => true,
4115-
4116-
// FIXME: Requires more recent kernel headers
4117-
| "NFNL_SUBSYS_COUNT" // bumped in v5.14
4118-
| "NFNL_SUBSYS_HOOK" // v5.14+
4119-
| "NFULA_VLAN" // v5.4+
4120-
| "NFULA_L2HDR" // v5.4+
4121-
| "NFULA_VLAN_PROTO" // v5.4+
4122-
| "NFULA_VLAN_TCI" // v5.4+
4123-
| "NFULA_VLAN_UNSPEC" // v5.4+
4124-
| "RTNLGRP_NEXTHOP" // linux v5.3+
4125-
| "RTNLGRP_BRVLAN" // linux v5.6+
4126-
if musl => true,
4127-
4128-
| "MADV_COLD"
4129-
| "MADV_PAGEOUT"
4130-
| "MADV_POPULATE_READ"
4131-
| "MADV_POPULATE_WRITE"
4132-
if musl => true,
4133-
"CLONE_CLEAR_SIGHAND" | "CLONE_INTO_CGROUP" => true,
4002+
"IF_LINK_MODE_TESTING" if sparc64 => true,
41344003

41354004
// FIXME: Requires >= 6.3 kernel headers
41364005
"MFD_EXEC" | "MFD_NOEXEC_SEAL" if sparc64 => true,
@@ -4152,9 +4021,6 @@ fn test_linux(target: &str) {
41524021
=> true,
41534022
"SCTP_FUTURE_ASSOC" | "SCTP_CURRENT_ASSOC" | "SCTP_ALL_ASSOC" | "SCTP_PEER_ADDR_THLDS_V2" => true, // linux 5.5+
41544023

4155-
// FIXME: Requires more recent kernel headers
4156-
"HWTSTAMP_TX_ONESTEP_P2P" if musl => true, // linux v5.6+
4157-
41584024
// kernel 6.5 minimum
41594025
"MOVE_MOUNT_BENEATH" => true,
41604026
// FIXME: Requires linux 6.1
@@ -4176,10 +4042,8 @@ fn test_linux(target: &str) {
41764042
| "FAN_INFO" // linux v5.16+
41774043
=> true,
41784044

4179-
// FIXME: Requires linux 5.15+
4180-
"FAN_REPORT_PIDFD" if musl => true,
4181-
4182-
// FIXME: Requires linux 5.9+
4045+
// musl doesn't use <linux/fanotify.h> in <sys/fanotify.h>
4046+
"FAN_REPORT_PIDFD"
41834047
| "FAN_REPORT_DIR_FID"
41844048
| "FAN_REPORT_NAME"
41854049
| "FAN_REPORT_DFID_NAME"
@@ -4193,55 +4057,6 @@ fn test_linux(target: &str) {
41934057
// FIXME: Requires linux 6.5
41944058
"NFT_MSG_MAX" => true,
41954059

4196-
// FIXME: Requires >= 5.1 kernel headers.
4197-
// Everything that uses install-musl.sh has 4.19 kernel headers.
4198-
"TLS_1_3_VERSION"
4199-
| "TLS_1_3_VERSION_MAJOR"
4200-
| "TLS_1_3_VERSION_MINOR"
4201-
| "TLS_CIPHER_AES_GCM_256"
4202-
| "TLS_CIPHER_AES_GCM_256_IV_SIZE"
4203-
| "TLS_CIPHER_AES_GCM_256_KEY_SIZE"
4204-
| "TLS_CIPHER_AES_GCM_256_SALT_SIZE"
4205-
| "TLS_CIPHER_AES_GCM_256_TAG_SIZE"
4206-
| "TLS_CIPHER_AES_GCM_256_REC_SEQ_SIZE"
4207-
if (aarch64 || arm || i686 || s390x || x86_64) && musl =>
4208-
{
4209-
true
4210-
}
4211-
4212-
// FIXME: Requires >= 5.11 kernel headers.
4213-
// Everything that uses install-musl.sh has 4.19 kernel headers.
4214-
"TLS_CIPHER_CHACHA20_POLY1305"
4215-
| "TLS_CIPHER_CHACHA20_POLY1305_IV_SIZE"
4216-
| "TLS_CIPHER_CHACHA20_POLY1305_KEY_SIZE"
4217-
| "TLS_CIPHER_CHACHA20_POLY1305_SALT_SIZE"
4218-
| "TLS_CIPHER_CHACHA20_POLY1305_TAG_SIZE"
4219-
| "TLS_CIPHER_CHACHA20_POLY1305_REC_SEQ_SIZE"
4220-
if (aarch64 || arm || i686 || s390x || x86_64) && musl =>
4221-
{
4222-
true
4223-
}
4224-
4225-
// FIXME: Requires >= 5.3 kernel headers.
4226-
// Everything that uses install-musl.sh has 4.19 kernel headers.
4227-
"XDP_OPTIONS_ZEROCOPY" | "XDP_OPTIONS"
4228-
if musl =>
4229-
{
4230-
true
4231-
}
4232-
4233-
// FIXME: Requires >= 5.4 kernel headers.
4234-
// Everything that uses install-musl.sh has 4.19 kernel headers.
4235-
"XSK_UNALIGNED_BUF_OFFSET_SHIFT"
4236-
| "XSK_UNALIGNED_BUF_ADDR_MASK"
4237-
| "XDP_UMEM_UNALIGNED_CHUNK_FLAG"
4238-
| "XDP_RING_NEED_WAKEUP"
4239-
| "XDP_USE_NEED_WAKEUP"
4240-
if musl =>
4241-
{
4242-
true
4243-
}
4244-
42454060
// FIXME: Requires >= 6.6 kernel headers.
42464061
"XDP_USE_SG"
42474062
| "XDP_PKT_CONTD"
@@ -4283,14 +4098,6 @@ fn test_linux(target: &str) {
42834098
| "PF_MCE_EARLY"
42844099
| "PF_MEMALLOC_PIN" => true,
42854100

4286-
"SCHED_FLAG_KEEP_POLICY"
4287-
| "SCHED_FLAG_KEEP_PARAMS"
4288-
| "SCHED_FLAG_UTIL_CLAMP_MIN"
4289-
| "SCHED_FLAG_UTIL_CLAMP_MAX"
4290-
| "SCHED_FLAG_KEEP_ALL"
4291-
| "SCHED_FLAG_UTIL_CLAMP"
4292-
| "SCHED_FLAG_ALL" if musl => true, // Needs more recent linux headers.
4293-
42944101
// FIXME: Requires >= 6.9 kernel headers.
42954102
"EPIOCSPARAMS"
42964103
| "EPIOCGPARAMS" => true,

0 commit comments

Comments
 (0)