Skip to content

Commit b6ec2c6

Browse files
lvllvltgross35
authored andcommitted
chore: add labels to FIXMEs
(backport <rust-lang#4236>) (cherry picked from commit 67d2ead)
1 parent cffce9b commit b6ec2c6

File tree

1 file changed

+41
-35
lines changed

1 file changed

+41
-35
lines changed

libc-test/build.rs

Lines changed: 41 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4196,26 +4196,26 @@ fn test_linux(target: &str) {
41964196
| "CANXL_XLF"
41974197
=> true,
41984198

4199-
// FIXME: Parts of netfilter/nfnetlink*.h require more recent kernel headers:
4199+
// FIXME(linux): Parts of netfilter/nfnetlink*.h require more recent kernel headers:
42004200
| "RTNLGRP_MCTP_IFADDR" // linux v5.17+
42014201
| "RTNLGRP_TUNNEL" // linux v5.18+
42024202
| "RTNLGRP_STATS" // linux v5.18+
42034203
=> true,
42044204

4205-
// FIXME: The below is no longer const in glibc 2.34:
4205+
// FIXME(linux): The below is no longer const in glibc 2.34:
42064206
// https://github.com/bminor/glibc/commit/5d98a7dae955bafa6740c26eaba9c86060ae0344
42074207
| "PTHREAD_STACK_MIN"
42084208
| "SIGSTKSZ"
42094209
| "MINSIGSTKSZ"
42104210
if gnu => true,
42114211

4212-
// FIXME: Linux >= 5.16:
4212+
// FIXME(linux): Linux >= 5.16:
42134213
// https://github.com/torvalds/linux/commit/42df6e1d221dddc0f2acf2be37e68d553ad65f96
42144214
"NF_NETDEV_EGRESS" if sparc64 => true,
42154215
// value changed
42164216
"NF_NETDEV_NUMHOOKS" if sparc64 => true,
42174217

4218-
// FIXME: requires Linux >= v5.8
4218+
// FIXME(linux): requires Linux >= v5.8
42194219
"IF_LINK_MODE_TESTING" if sparc64 => true,
42204220

42214221
// DIFF(main): fixed in 1.0 with e9abac9ac2
@@ -4227,7 +4227,7 @@ fn test_linux(target: &str) {
42274227
// kernel 6.2 minimum
42284228
"TUN_F_USO4" | "TUN_F_USO6" | "IFF_NO_CARRIER" => true,
42294229

4230-
// FIXME: Requires more recent kernel headers
4230+
// FIXME(linux): Requires more recent kernel headers
42314231
| "IFLA_PARENT_DEV_NAME" // linux v5.13+
42324232
| "IFLA_PARENT_DEV_BUS_NAME" // linux v5.13+
42334233
| "IFLA_GRO_MAX_SIZE" // linux v5.16+
@@ -4240,10 +4240,10 @@ fn test_linux(target: &str) {
42404240

42414241
// kernel 6.5 minimum
42424242
"MOVE_MOUNT_BENEATH" => true,
4243-
// FIXME: Requires linux 6.1
4243+
// FIXME(linux): Requires linux 6.1
42444244
"ALG_SET_KEY_BY_KEY_SERIAL" | "ALG_SET_DRBG_ENTROPY" => true,
42454245

4246-
// FIXME: Requires more recent kernel headers
4246+
// FIXME(linux): Requires more recent kernel headers
42474247
| "FAN_FS_ERROR" // linux v5.16+
42484248
| "FAN_RENAME" // linux v5.17+
42494249
| "FAN_REPORT_TARGET_FID" // linux v5.17+
@@ -4271,18 +4271,18 @@ fn test_linux(target: &str) {
42714271
| "FAN_EPIDFD"
42724272
if musl => true,
42734273

4274-
// FIXME: Requires linux 6.5
4274+
// FIXME(linux): Requires linux 6.5
42754275
"NFT_MSG_MAX" => true,
42764276

4277-
// FIXME: Requires >= 6.6 kernel headers.
4277+
// FIXME(linux): Requires >= 6.6 kernel headers.
42784278
"XDP_USE_SG"
42794279
| "XDP_PKT_CONTD"
42804280
=>
42814281
{
42824282
true
42834283
}
42844284

4285-
// FIXME: Requires >= 6.8 kernel headers.
4285+
// FIXME(linux): Requires >= 6.8 kernel headers.
42864286
"XDP_UMEM_TX_SW_CSUM"
42874287
| "XDP_TXMD_FLAGS_TIMESTAMP"
42884288
| "XDP_TXMD_FLAGS_CHECKSUM"
@@ -4292,20 +4292,20 @@ fn test_linux(target: &str) {
42924292
true
42934293
}
42944294

4295-
// FIXME: Requires >= 6.11 kernel headers.
4295+
// FIXME(linux): Requires >= 6.11 kernel headers.
42964296
"XDP_UMEM_TX_METADATA_LEN"
42974297
=>
42984298
{
42994299
true
43004300
}
43014301

4302-
// FIXME: Requires >= 6.6 kernel headers.
4302+
// FIXME(linux): Requires >= 6.6 kernel headers.
43034303
"SYS_fchmodat2" => true,
43044304

4305-
// FIXME: Requires >= 6.10 kernel headers.
4305+
// FIXME(linux): Requires >= 6.10 kernel headers.
43064306
"SYS_mseal" => true,
43074307

4308-
// FIXME: seems to not be available all the time (from <include/linux/sched.h>:
4308+
// FIXME(linux): seems to not be available all the time (from <include/linux/sched.h>:
43094309
"PF_VCPU"
43104310
| "PF_IDLE"
43114311
| "PF_EXITING"
@@ -4334,11 +4334,11 @@ fn test_linux(target: &str) {
43344334
| "PF_BLOCK_TS"
43354335
| "PF_SUSPEND_TASK" => true,
43364336

4337-
// FIXME: Requires >= 6.9 kernel headers.
4337+
// FIXME(linux): Requires >= 6.9 kernel headers.
43384338
"EPIOCSPARAMS"
43394339
| "EPIOCGPARAMS" => true,
43404340

4341-
// FIXME: Requires >= 6.11 kernel headers.
4341+
// FIXME(linux): Requires >= 6.11 kernel headers.
43424342
"MAP_DROPPABLE" => true,
43434343

43444344
// FIXME(linux): Requires >= 6.2 kernel headers.
@@ -4375,7 +4375,7 @@ fn test_linux(target: &str) {
43754375
// test the XSI version below.
43764376
"strerror_r" => true,
43774377

4378-
// FIXME: Our API is unsound. The Rust API allows aliasing
4378+
// FIXME(linux): Our API is unsound. The Rust API allows aliasing
43794379
// pointers, but the C API requires pointers not to alias.
43804380
// We should probably be at least using `&`/`&mut` here, see:
43814381
// https://github.com/gnzlbg/ctest/issues/68
@@ -4386,10 +4386,10 @@ fn test_linux(target: &str) {
43864386
// Needs glibc 2.35 or later.
43874387
"posix_spawn_file_actions_addtcsetpgrp_np" if gnu && sparc64 => true,
43884388

4389-
// FIXME: Deprecated since glibc 2.30. Remove fn once upstream does.
4389+
// FIXME(linux): Deprecated since glibc 2.30. Remove fn once upstream does.
43904390
"sysctl" if gnu => true,
43914391

4392-
// FIXME: It now takes c_void instead of timezone since glibc 2.31.
4392+
// FIXME(linux): It now takes c_void instead of timezone since glibc 2.31.
43934393
"gettimeofday" if gnu => true,
43944394

43954395
// These are all implemented as static inline functions in uclibc, so
@@ -4417,7 +4417,7 @@ fn test_linux(target: &str) {
44174417
// assume it's a int instead.
44184418
"getnameinfo" if uclibc => true,
44194419

4420-
// FIXME: This needs musl 1.2.2 or later.
4420+
// FIXME(musl): This needs musl 1.2.2 or later.
44214421
"gettid" if musl => true,
44224422

44234423
// Needs glibc 2.33 or later.
@@ -4453,7 +4453,7 @@ fn test_linux(target: &str) {
44534453
"posix_basename" if gnu => true,
44544454
"gnu_basename" if gnu => true,
44554455

4456-
// FIXME: function pointers changed since Ubuntu 23.10
4456+
// FIXME(linux): function pointers changed since Ubuntu 23.10
44574457
"strtol" | "strtoll" | "strtoul" | "strtoull" | "fscanf" | "scanf" | "sscanf" => true,
44584458

44594459
// Added in musl 1.2.5
@@ -4515,19 +4515,19 @@ fn test_linux(target: &str) {
45154515
field == "ssi_syscall" ||
45164516
field == "ssi_call_addr" ||
45174517
field == "ssi_arch")) ||
4518-
// FIXME: After musl 1.1.24, it have only one field `sched_priority`,
4518+
// FIXME(musl): After musl 1.1.24, it have only one field `sched_priority`,
45194519
// while other fields become reserved.
45204520
(struct_ == "sched_param" && [
45214521
"sched_ss_low_priority",
45224522
"sched_ss_repl_period",
45234523
"sched_ss_init_budget",
45244524
"sched_ss_max_repl",
45254525
].contains(&field) && musl) ||
4526-
// FIXME: After musl 1.1.24, the type becomes `int` instead of `unsigned short`.
4526+
// FIXME(musl): After musl 1.1.24, the type becomes `int` instead of `unsigned short`.
45274527
(struct_ == "ipc_perm" && field == "__seq" && aarch64_musl) ||
45284528
// glibc uses unnamed fields here and Rust doesn't support that yet
45294529
(struct_ == "timex" && field.starts_with("__unused")) ||
4530-
// FIXME: It now takes mode_t since glibc 2.31 on some targets.
4530+
// FIXME(linux): It now takes mode_t since glibc 2.31 on some targets.
45314531
(struct_ == "ipc_perm" && field == "mode"
45324532
&& ((x86_64 || i686 || arm || riscv64) && gnu || x86_64_gnux32)
45334533
) ||
@@ -4574,9 +4574,9 @@ fn test_linux(target: &str) {
45744574
});
45754575

45764576
cfg.skip_roundtrip(move |s| match s {
4577-
// FIXME:
4577+
// FIXME(1.0):
45784578
"mcontext_t" if s390x => true,
4579-
// FIXME: This is actually a union.
4579+
// FIXME(union): This is actually a union.
45804580
"fpreg_t" if s390x => true,
45814581

45824582
// The test doesn't work on some env:
@@ -4610,7 +4610,7 @@ fn test_linux(target: &str) {
46104610
"fanotify_event_info_fid" => true,
46114611
"cmsghdr" => true,
46124612

4613-
// FIXME: the call ABI of max_align_t is incorrect on these platforms:
4613+
// FIXME(linux): the call ABI of max_align_t is incorrect on these platforms:
46144614
"max_align_t" if i686 || ppc64 => true,
46154615

46164616
_ => false,
@@ -4941,13 +4941,13 @@ fn test_haiku(target: &str) {
49414941
return true;
49424942
}
49434943
match ty {
4944-
// FIXME: actually a union
4944+
// FIXME(union): actually a union
49454945
"sigval" => true,
4946-
// FIXME: locale_t does not exist on Haiku
4946+
// FIXME(haiku): locale_t does not exist on Haiku
49474947
"locale_t" => true,
4948-
// FIXME: rusage has a different layout on Haiku
4948+
// FIXME(haiku): rusage has a different layout on Haiku
49494949
"rusage" => true,
4950-
// FIXME?: complains that rust aligns on 4 byte boundary, but
4950+
// FIXME(haiku): complains that rust aligns on 4 byte boundary, but
49514951
// Haiku does not align it at all.
49524952
"in6_addr" => true,
49534953
// The d_name attribute is an array of 1 on Haiku, with the
@@ -4972,7 +4972,7 @@ fn test_haiku(target: &str) {
49724972

49734973
cfg.skip_type(move |ty| {
49744974
match ty {
4975-
// FIXME: locale_t does not exist on Haiku
4975+
// FIXME(haiku): locale_t does not exist on Haiku
49764976
"locale_t" => true,
49774977
// These cause errors, to be reviewed in the future
49784978
"sighandler_t" => true,
@@ -4987,9 +4987,15 @@ fn test_haiku(target: &str) {
49874987
cfg.skip_fn(move |name| {
49884988
// skip those that are manually verified
49894989
match name {
4990+
<<<<<<< HEAD
49904991
// FIXME: https://github.com/rust-lang/libc/issues/1272
49914992
"execv" | "execve" | "execvp" | "execvpe" => true,
49924993
// FIXME: does not exist on haiku
4994+
||||||| parent of 67d2ead29 (chore: add labels to FIXMEs)
4995+
// FIXME: does not exist on haiku
4996+
=======
4997+
// FIXME(haiku): does not exist on haiku
4998+
>>>>>>> 67d2ead29 (chore: add labels to FIXMEs)
49934999
"open_wmemstream" => true,
49945000
"mlockall" | "munlockall" => true,
49955001
"tcgetsid" => true,
@@ -5013,7 +5019,7 @@ fn test_haiku(target: &str) {
50135019

50145020
cfg.skip_const(move |name| {
50155021
match name {
5016-
// FIXME: these constants do not exist on Haiku
5022+
// FIXME(haiku): these constants do not exist on Haiku
50175023
"DT_UNKNOWN" | "DT_FIFO" | "DT_CHR" | "DT_DIR" | "DT_BLK" | "DT_REG" | "DT_LNK"
50185024
| "DT_SOCK" => true,
50195025
"USRQUOTA" | "GRPQUOTA" => true,
@@ -5039,7 +5045,7 @@ fn test_haiku(target: &str) {
50395045

50405046
cfg.skip_field(move |struct_, field| {
50415047
match (struct_, field) {
5042-
// FIXME: the stat struct actually has timespec members, whereas
5048+
// FIXME(time): the stat struct actually has timespec members, whereas
50435049
// the current representation has these unpacked.
50445050
("stat", "st_atime") => true,
50455051
("stat", "st_atime_nsec") => true,
@@ -5069,7 +5075,7 @@ fn test_haiku(target: &str) {
50695075
});
50705076

50715077
cfg.skip_roundtrip(move |s| match s {
5072-
// FIXME: for some reason the roundtrip check fails for cpu_info
5078+
// FIXME(1.0): for some reason the roundtrip check fails for cpu_info
50735079
"cpu_info" => true,
50745080
_ => false,
50755081
});

0 commit comments

Comments
 (0)