Skip to content

Commit b87db4d

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 <[email protected]>
1 parent acc75e7 commit b87db4d

File tree

1 file changed

+18
-152
lines changed

1 file changed

+18
-152
lines changed

libc-test/build.rs

+18-152
Original file line numberDiff line numberDiff line change
@@ -3505,8 +3505,7 @@ fn test_linux(target: &str) {
35053505
[gnu]: "linux/aio_abi.h",
35063506
"linux/can.h",
35073507
"linux/can/raw.h",
3508-
// FIXME: requires kernel headers >= 5.4.1.
3509-
[!musl]: "linux/can/j1939.h",
3508+
"linux/can/j1939.h",
35103509
"linux/dccp.h",
35113510
"linux/errqueue.h",
35123511
"linux/falloc.h",
@@ -3531,8 +3530,7 @@ fn test_linux(target: &str) {
35313530
"linux/mempolicy.h",
35323531
"linux/mman.h",
35333532
"linux/module.h",
3534-
// FIXME: requires kernel headers >= 5.1.
3535-
[!musl]: "linux/mount.h",
3533+
"linux/mount.h",
35363534
"linux/net_tstamp.h",
35373535
"linux/netfilter/nfnetlink.h",
35383536
"linux/netfilter/nfnetlink_log.h",
@@ -3544,11 +3542,10 @@ fn test_linux(target: &str) {
35443542
"linux/netfilter_ipv6.h",
35453543
"linux/netfilter_ipv6/ip6_tables.h",
35463544
"linux/netlink.h",
3547-
// FIXME: requires Linux >= 5.6:
3548-
[!musl]: "linux/openat2.h",
3545+
"linux/openat2.h",
35493546
// FIXME: some items require Linux >= 5.6:
35503547
"linux/ptp_clock.h",
3551-
[!musl]: "linux/ptrace.h",
3548+
"linux/ptrace.h",
35523549
"linux/quota.h",
35533550
"linux/random.h",
35543551
"linux/reboot.h",
@@ -3566,7 +3563,7 @@ fn test_linux(target: &str) {
35663563
"sys/fanotify.h",
35673564
// <sys/auxv.h> is not present on uclibc
35683565
[!uclibc]: "sys/auxv.h",
3569-
[gnu]: "linux/close_range.h",
3566+
[gnu || musl]: "linux/close_range.h",
35703567
}
35713568

35723569
// note: aio.h must be included before sys/mount.h
@@ -3657,11 +3654,6 @@ fn test_linux(target: &str) {
36573654
// specific type.
36583655
"Ioctl" => true,
36593656

3660-
// FIXME: requires >= 5.4.1 kernel headers
3661-
"pgn_t" if musl => true,
3662-
"priority_t" if musl => true,
3663-
"name_t" if musl => true,
3664-
36653657
// FIXME: "'__uint128' undeclared" in C
36663658
"__uint128" => true,
36673659

@@ -3680,22 +3672,6 @@ fn test_linux(target: &str) {
36803672
if ty.starts_with("__c_anonymous_") {
36813673
return true;
36823674
}
3683-
// FIXME: musl CI has old headers
3684-
if musl && ty.starts_with("uinput_") {
3685-
return true;
3686-
}
3687-
if musl && ty == "seccomp_notif" {
3688-
return true;
3689-
}
3690-
if musl && ty == "seccomp_notif_addfd" {
3691-
return true;
3692-
}
3693-
if musl && ty == "seccomp_notif_resp" {
3694-
return true;
3695-
}
3696-
if musl && ty == "seccomp_notif_sizes" {
3697-
return true;
3698-
}
36993675

37003676
// FIXME: CI has old headers
37013677
if ty == "ptp_sys_offset_extended" {
@@ -3779,12 +3755,6 @@ fn test_linux(target: &str) {
37793755
// Might differ between kernel versions
37803756
"open_how" => true,
37813757

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

@@ -3795,6 +3765,7 @@ fn test_linux(target: &str) {
37953765
// https://github.com/torvalds/linux/commit/94dfc73e7cf4a31da66b8843f0b9283ddd6b8381
37963766
"af_alg_iv" => true,
37973767

3768+
<<<<<<< HEAD
37983769
// FIXME: Requires >= 5.1 kernel headers.
37993770
// Everything that uses install-musl.sh has 4.19 kernel headers.
38003771
"tls12_crypto_info_aes_gcm_256"
@@ -3836,6 +3807,8 @@ fn test_linux(target: &str) {
38363807
| "xsk_tx_metadata_request"
38373808
| "xsk_tx_metadata_completion" => true,
38383809

3810+
=======
3811+
>>>>>>> 4c6fc50b0 (ci: clean up musl exceptions)
38393812
// A new field was added in kernel 5.4, this is the old version for backwards compatibility.
38403813
// https://github.com/torvalds/linux/commit/77cd0d7b3f257fd0e3096b4fdcff1a7d38e99e10
38413814
"xdp_ring_offset_v1" | "xdp_mmap_offsets_v1" => true,
@@ -3899,6 +3872,7 @@ fn test_linux(target: &str) {
38993872
}
39003873
}
39013874
if musl {
3875+
<<<<<<< HEAD
39023876
// FIXME: Requires >= 5.0 kernel headers
39033877
if name == "SECCOMP_GET_NOTIF_SIZES"
39043878
|| name == "SECCOMP_FILTER_FLAG_NEW_LISTENER"
@@ -3940,6 +3914,8 @@ fn test_linux(target: &str) {
39403914
{
39413915
return true;
39423916
}
3917+
=======
3918+
>>>>>>> 4c6fc50b0 (ci: clean up musl exceptions)
39433919
// LFS64 types have been removed in musl 1.2.4+
39443920
if name.starts_with("RLIM64") {
39453921
return true;
@@ -3949,7 +3925,7 @@ fn test_linux(target: &str) {
39493925
return true;
39503926
}
39513927
// FIXME: Requires >= 6.3 kernel headers
3952-
if name == "MFD_NOEXEC_SEAL" || name == "MFD_EXEC" {
3928+
if loongarch64 && (name == "MFD_NOEXEC_SEAL" || name == "MFD_EXEC") {
39533929
return true;
39543930
}
39553931
}
@@ -4036,7 +4012,7 @@ fn test_linux(target: &str) {
40364012
"SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV" if sparc64 => true,
40374013

40384014
// FIXME: Not currently available in headers on ARM and musl.
4039-
"NETLINK_GET_STRICT_CHK" if arm || musl => true,
4015+
"NETLINK_GET_STRICT_CHK" if arm => true,
40404016

40414017
// kernel constants not available in uclibc 1.0.34
40424018
| "EXTPROC"
@@ -4105,62 +4081,14 @@ fn test_linux(target: &str) {
41054081
| "MINSIGSTKSZ"
41064082
if gnu => true,
41074083

4108-
// FIXME: Linux >= 5.10:
4109-
// https://github.com/torvalds/linux/commit/d25e2e9388eda61b6e298585024ee3355f50c493
4110-
"NF_INET_INGRESS" if musl => true,
4111-
41124084
// FIXME: Linux >= 5.16:
41134085
// https://github.com/torvalds/linux/commit/42df6e1d221dddc0f2acf2be37e68d553ad65f96
4114-
"NF_NETDEV_EGRESS" if musl || sparc64 => true,
4086+
"NF_NETDEV_EGRESS" if sparc64 => true,
41154087
// value changed
4116-
"NF_NETDEV_NUMHOOKS" if musl || sparc64 => true,
4117-
4118-
// FIXME: requires Linux >= 5.6:
4119-
| "RESOLVE_BENEATH"
4120-
| "RESOLVE_CACHED"
4121-
| "RESOLVE_IN_ROOT"
4122-
| "RESOLVE_NO_MAGICLINKS"
4123-
| "RESOLVE_NO_SYMLINKS"
4124-
| "RESOLVE_NO_XDEV" if musl => true,
4125-
4126-
// FIXME: requires Linux >= 5.4:
4127-
| "CAN_J1939"
4128-
| "CAN_NPROTO" if musl => true,
4129-
4130-
// FIXME: requires Linux >= 5.6
4131-
"GRND_INSECURE" if musl => true,
4132-
4133-
// FIXME: requires Linux >= 5.7:
4134-
"MREMAP_DONTUNMAP" if musl => true,
4088+
"NF_NETDEV_NUMHOOKS" if sparc64 => true,
41354089

41364090
// FIXME: requires Linux >= v5.8
4137-
"IF_LINK_MODE_TESTING" if musl || sparc64 => true,
4138-
4139-
// FIXME: Requires more recent kernel headers (5.9 / 5.11):
4140-
| "CLOSE_RANGE_UNSHARE"
4141-
| "CLOSE_RANGE_CLOEXEC" if musl => true,
4142-
4143-
// FIXME: requires Linux >= 5.12:
4144-
"MPOL_F_NUMA_BALANCING" if musl => true,
4145-
4146-
// FIXME: Requires more recent kernel headers
4147-
| "NFNL_SUBSYS_COUNT" // bumped in v5.14
4148-
| "NFNL_SUBSYS_HOOK" // v5.14+
4149-
| "NFULA_VLAN" // v5.4+
4150-
| "NFULA_L2HDR" // v5.4+
4151-
| "NFULA_VLAN_PROTO" // v5.4+
4152-
| "NFULA_VLAN_TCI" // v5.4+
4153-
| "NFULA_VLAN_UNSPEC" // v5.4+
4154-
| "RTNLGRP_NEXTHOP" // linux v5.3+
4155-
| "RTNLGRP_BRVLAN" // linux v5.6+
4156-
if musl => true,
4157-
4158-
| "MADV_COLD"
4159-
| "MADV_PAGEOUT"
4160-
| "MADV_POPULATE_READ"
4161-
| "MADV_POPULATE_WRITE"
4162-
if musl => true,
4163-
"CLONE_CLEAR_SIGHAND" | "CLONE_INTO_CGROUP" => true,
4091+
"IF_LINK_MODE_TESTING" if sparc64 => true,
41644092

41654093
// FIXME: Requires >= 6.3 kernel headers
41664094
"MFD_EXEC" | "MFD_NOEXEC_SEAL" if sparc64 => true,
@@ -4182,9 +4110,6 @@ fn test_linux(target: &str) {
41824110
=> true,
41834111
"SCTP_FUTURE_ASSOC" | "SCTP_CURRENT_ASSOC" | "SCTP_ALL_ASSOC" | "SCTP_PEER_ADDR_THLDS_V2" => true, // linux 5.5+
41844112

4185-
// FIXME: Requires more recent kernel headers
4186-
"HWTSTAMP_TX_ONESTEP_P2P" if musl => true, // linux v5.6+
4187-
41884113
// kernel 6.5 minimum
41894114
"MOVE_MOUNT_BENEATH" => true,
41904115
// FIXME: Requires linux 6.1
@@ -4206,10 +4131,8 @@ fn test_linux(target: &str) {
42064131
| "FAN_INFO" // linux v5.16+
42074132
=> true,
42084133

4209-
// FIXME: Requires linux 5.15+
4210-
"FAN_REPORT_PIDFD" if musl => true,
4211-
4212-
// FIXME: Requires linux 5.9+
4134+
// musl doesn't use <linux/fanotify.h> in <sys/fanotify.h>
4135+
"FAN_REPORT_PIDFD"
42134136
| "FAN_REPORT_DIR_FID"
42144137
| "FAN_REPORT_NAME"
42154138
| "FAN_REPORT_DFID_NAME"
@@ -4223,55 +4146,6 @@ fn test_linux(target: &str) {
42234146
// FIXME: Requires linux 6.5
42244147
"NFT_MSG_MAX" => true,
42254148

4226-
// FIXME: Requires >= 5.1 kernel headers.
4227-
// Everything that uses install-musl.sh has 4.19 kernel headers.
4228-
"TLS_1_3_VERSION"
4229-
| "TLS_1_3_VERSION_MAJOR"
4230-
| "TLS_1_3_VERSION_MINOR"
4231-
| "TLS_CIPHER_AES_GCM_256"
4232-
| "TLS_CIPHER_AES_GCM_256_IV_SIZE"
4233-
| "TLS_CIPHER_AES_GCM_256_KEY_SIZE"
4234-
| "TLS_CIPHER_AES_GCM_256_SALT_SIZE"
4235-
| "TLS_CIPHER_AES_GCM_256_TAG_SIZE"
4236-
| "TLS_CIPHER_AES_GCM_256_REC_SEQ_SIZE"
4237-
if (aarch64 || arm || i686 || s390x || x86_64) && musl =>
4238-
{
4239-
true
4240-
}
4241-
4242-
// FIXME: Requires >= 5.11 kernel headers.
4243-
// Everything that uses install-musl.sh has 4.19 kernel headers.
4244-
"TLS_CIPHER_CHACHA20_POLY1305"
4245-
| "TLS_CIPHER_CHACHA20_POLY1305_IV_SIZE"
4246-
| "TLS_CIPHER_CHACHA20_POLY1305_KEY_SIZE"
4247-
| "TLS_CIPHER_CHACHA20_POLY1305_SALT_SIZE"
4248-
| "TLS_CIPHER_CHACHA20_POLY1305_TAG_SIZE"
4249-
| "TLS_CIPHER_CHACHA20_POLY1305_REC_SEQ_SIZE"
4250-
if (aarch64 || arm || i686 || s390x || x86_64) && musl =>
4251-
{
4252-
true
4253-
}
4254-
4255-
// FIXME: Requires >= 5.3 kernel headers.
4256-
// Everything that uses install-musl.sh has 4.19 kernel headers.
4257-
"XDP_OPTIONS_ZEROCOPY" | "XDP_OPTIONS"
4258-
if musl =>
4259-
{
4260-
true
4261-
}
4262-
4263-
// FIXME: Requires >= 5.4 kernel headers.
4264-
// Everything that uses install-musl.sh has 4.19 kernel headers.
4265-
"XSK_UNALIGNED_BUF_OFFSET_SHIFT"
4266-
| "XSK_UNALIGNED_BUF_ADDR_MASK"
4267-
| "XDP_UMEM_UNALIGNED_CHUNK_FLAG"
4268-
| "XDP_RING_NEED_WAKEUP"
4269-
| "XDP_USE_NEED_WAKEUP"
4270-
if musl =>
4271-
{
4272-
true
4273-
}
4274-
42754149
// FIXME: Requires >= 6.6 kernel headers.
42764150
"XDP_USE_SG"
42774151
| "XDP_PKT_CONTD"
@@ -4330,14 +4204,6 @@ fn test_linux(target: &str) {
43304204
| "PF_MCE_EARLY"
43314205
| "PF_MEMALLOC_PIN" => true,
43324206

4333-
"SCHED_FLAG_KEEP_POLICY"
4334-
| "SCHED_FLAG_KEEP_PARAMS"
4335-
| "SCHED_FLAG_UTIL_CLAMP_MIN"
4336-
| "SCHED_FLAG_UTIL_CLAMP_MAX"
4337-
| "SCHED_FLAG_KEEP_ALL"
4338-
| "SCHED_FLAG_UTIL_CLAMP"
4339-
| "SCHED_FLAG_ALL" if musl => true, // Needs more recent linux headers.
4340-
43414207
// FIXME: Requires >= 6.9 kernel headers.
43424208
"EPIOCSPARAMS"
43434209
| "EPIOCGPARAMS" => true,

0 commit comments

Comments
 (0)