Skip to content

Commit 7d17f16

Browse files
lvllvltgross35
authored andcommitted
chore: add labels to FIXMEs
(backport <#4234>) (cherry picked from commit 5096e10)
1 parent 0149964 commit 7d17f16

File tree

1 file changed

+49
-49
lines changed

1 file changed

+49
-49
lines changed

libc-test/build.rs

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ fn test_windows(target: &str) {
724724
// Just pass all these through, no need for a "struct" prefix
725725
"FILE" | "DIR" | "Dl_info" => ty.to_string(),
726726

727-
// FIXME: these don't exist:
727+
// FIXME(windows): these don't exist:
728728
"time64_t" => "__time64_t".to_string(),
729729
"ssize_t" => "SSIZE_T".to_string(),
730730

@@ -756,7 +756,7 @@ fn test_windows(target: &str) {
756756
cfg.skip_type(move |name| match name {
757757
"SSIZE_T" if !gnu => true,
758758
"ssize_t" if !gnu => true,
759-
// FIXME: The size and alignment of this type are incorrect
759+
// FIXME(windows): The size and alignment of this type are incorrect
760760
"time_t" if gnu && i686 => true,
761761
_ => false,
762762
});
@@ -766,20 +766,20 @@ fn test_windows(target: &str) {
766766
return true;
767767
}
768768
match ty {
769-
// FIXME: The size and alignment of this struct are incorrect
769+
// FIXME(windows): The size and alignment of this struct are incorrect
770770
"timespec" if gnu && i686 => true,
771771
_ => false,
772772
}
773773
});
774774

775775
cfg.skip_const(move |name| {
776776
match name {
777-
// FIXME: API error:
777+
// FIXME(windows): API error:
778778
// SIG_ERR type is "void (*)(int)", not "int"
779779
"SIG_ERR" |
780780
// Similar for SIG_DFL/IGN/GET/SGE/ACK
781781
"SIG_DFL" | "SIG_IGN" | "SIG_GET" | "SIG_SGE" | "SIG_ACK" => true,
782-
// FIXME: newer windows-gnu environment on CI?
782+
// FIXME(windows): newer windows-gnu environment on CI?
783783
"_O_OBTAIN_DIR" if gnu => true,
784784
_ => false,
785785
}
@@ -789,7 +789,7 @@ fn test_windows(target: &str) {
789789
"CONTEXT" if field == "Fp" => true,
790790
_ => false,
791791
});
792-
// FIXME: All functions point to the wrong addresses?
792+
// FIXME(windows): All functions point to the wrong addresses?
793793
cfg.skip_fn_ptrcheck(|_| true);
794794

795795
cfg.skip_signededness(move |c| {
@@ -1093,7 +1093,7 @@ fn test_solarish(target: &str) {
10931093
// are still ABI compatible. We can wait for the next major release
10941094
// to be compliant with the new API.
10951095
//
1096-
// FIXME: unskip these for next major release
1096+
// FIXME(solarish): unskip these for next major release
10971097
"setpriority" | "personality" => true,
10981098

10991099
// signal is defined in terms of sighandler_t, so ignore
@@ -1131,7 +1131,7 @@ fn test_solarish(target: &str) {
11311131
// excluded from the tests.
11321132
"getifaddrs" if is_illumos => true,
11331133

1134-
// FIXME: Our API is unsound. The Rust API allows aliasing
1134+
// FIXME(ctest): Our API is unsound. The Rust API allows aliasing
11351135
// pointers, but the C API requires pointers not to alias.
11361136
// We should probably be at least using `&`/`&mut` here, see:
11371137
// https://github.com/gnzlbg/ctest/issues/68
@@ -1277,7 +1277,7 @@ fn test_netbsd(target: &str) {
12771277
return true;
12781278
}
12791279
match ty {
1280-
// FIXME: sighandler_t is crazy across platforms
1280+
// FIXME(netbsd): sighandler_t is crazy across platforms
12811281
"sighandler_t" => true,
12821282
_ => false,
12831283
}
@@ -1321,7 +1321,7 @@ fn test_netbsd(target: &str) {
13211321

13221322
cfg.skip_fn(move |name| {
13231323
match name {
1324-
// FIXME: https://github.com/rust-lang/libc/issues/1272
1324+
// FIXME(netbsd): https://github.com/rust-lang/libc/issues/1272
13251325
"execv" | "execve" | "execvp" => true,
13261326
// FIXME: netbsd 10 minimum
13271327
"getentropy" | "getrandom" => true,
@@ -1462,7 +1462,7 @@ fn test_dragonflybsd(target: &str) {
14621462
| "Elf64_Shdr" | "Elf32_Sym" | "Elf64_Sym" | "Elf32_Ehdr" | "Elf64_Ehdr"
14631463
| "Elf32_Chdr" | "Elf64_Chdr" => ty.to_string(),
14641464

1465-
// FIXME: OSX calls this something else
1465+
// FIXME(dragonflybsd): OSX calls this something else
14661466
"sighandler_t" => "sig_t".to_string(),
14671467

14681468
t if is_union => format!("union {}", t),
@@ -1507,7 +1507,7 @@ fn test_dragonflybsd(target: &str) {
15071507
return true;
15081508
}
15091509
match ty {
1510-
// FIXME: These are tested as part of the linux_fcntl tests since
1510+
// FIXME(dragonflybsd): These are tested as part of the linux_fcntl tests since
15111511
// there are header conflicts when including them with all the other
15121512
// structs.
15131513
"termios2" => true,
@@ -1874,7 +1874,7 @@ fn test_android(target: &str) {
18741874
// Our stat *_nsec fields normally don't actually exist but are part
18751875
// of a timeval struct
18761876
s if s.ends_with("_nsec") && struct_.starts_with("stat") => s.to_string(),
1877-
// FIXME: appears that `epoll_event.data` is an union
1877+
// FIXME(union): appears that `epoll_event.data` is an union
18781878
"u64" if struct_ == "epoll_event" => "data.u64".to_string(),
18791879
// The following structs have a field called `type` in C,
18801880
// but `type` is a Rust keyword, so these fields are translated
@@ -1893,7 +1893,7 @@ fn test_android(target: &str) {
18931893

18941894
cfg.skip_type(move |ty| {
18951895
match ty {
1896-
// FIXME: `sighandler_t` type is incorrect, see:
1896+
// FIXME(android): `sighandler_t` type is incorrect, see:
18971897
// https://github.com/rust-lang/libc/issues/1359
18981898
"sighandler_t" => true,
18991899

@@ -1904,7 +1904,7 @@ fn test_android(target: &str) {
19041904
"posix_spawn_file_actions_t" => true,
19051905
"posix_spawnattr_t" => true,
19061906

1907-
// FIXME: "'__uint128' undeclared" in C
1907+
// FIXME(android): "'__uint128' undeclared" in C
19081908
"__uint128" => true,
19091909

19101910
_ => false,
@@ -1927,12 +1927,12 @@ fn test_android(target: &str) {
19271927
// These are tested in the `linux_elf.rs` file.
19281928
"Elf64_Phdr" | "Elf32_Phdr" => true,
19291929

1930-
// FIXME: The type of `iv` has been changed.
1930+
// FIXME(android): The type of `iv` has been changed.
19311931
"af_alg_iv" => true,
19321932

1933-
// FIXME: The size of struct has been changed:
1933+
// FIXME(android): The size of struct has been changed:
19341934
"inotify_event" => true,
1935-
// FIXME: The field has been changed:
1935+
// FIXME(android): The field has been changed:
19361936
"sockaddr_vm" => true,
19371937

19381938
_ => false,
@@ -1959,13 +1959,13 @@ fn test_android(target: &str) {
19591959
// The `ARPHRD_CAN` is tested in the `linux_if_arp.rs` tests:
19601960
"ARPHRD_CAN" => true,
19611961

1962-
// FIXME: deprecated: not available in any header
1962+
// FIXME(deprecated): deprecated: not available in any header
19631963
// See: https://github.com/rust-lang/libc/issues/1356
19641964
"ENOATTR" => true,
19651965

1966-
// FIXME: still necessary?
1966+
// FIXME(android): still necessary?
19671967
"SIG_DFL" | "SIG_ERR" | "SIG_IGN" => true, // sighandler_t weirdness
1968-
// FIXME: deprecated - removed in glibc 2.26
1968+
// FIXME(deprecated): deprecated - removed in glibc 2.26
19691969
"SIGUNUSED" => true,
19701970

19711971
// Needs a newer Android SDK for the definition
@@ -1974,7 +1974,7 @@ fn test_android(target: &str) {
19741974
// Requires Linux kernel 5.6
19751975
"VMADDR_CID_LOCAL" => true,
19761976

1977-
// FIXME: conflicts with standard C headers and is tested in
1977+
// FIXME(android): conflicts with standard C headers and is tested in
19781978
// `linux_termios.rs` below:
19791979
"BOTHER" => true,
19801980
"IBSHIFT" => true,
@@ -2004,7 +2004,7 @@ fn test_android(target: &str) {
20042004
// kernel 6.2 minimum
20052005
"TUN_F_USO4" | "TUN_F_USO6" | "IFF_NO_CARRIER" => true,
20062006

2007-
// FIXME: NDK r22 minimum required
2007+
// FIXME(android): NDK r22 minimum required
20082008
| "FDB_NOTIFY_BIT"
20092009
| "FDB_NOTIFY_INACTIVE_BIT"
20102010
| "IFLA_ALT_IFNAME"
@@ -2017,16 +2017,16 @@ fn test_android(target: &str) {
20172017
| "NFEA_DONT_REFRESH"
20182018
| "NFEA_UNSPEC" => true,
20192019

2020-
// FIXME: NDK r23 minimum required
2020+
// FIXME(android): NDK r23 minimum required
20212021
| "IFLA_PARENT_DEV_BUS_NAME"
20222022
| "IFLA_PARENT_DEV_NAME" => true,
20232023

2024-
// FIXME: NDK r25 minimum required
2024+
// FIXME(android): NDK r25 minimum required
20252025
| "IFLA_GRO_MAX_SIZE"
20262026
| "NDA_FLAGS_EXT"
20272027
| "NTF_EXT_MANAGED" => true,
20282028

2029-
// FIXME: NDK above r25 required
2029+
// FIXME(android): NDK above r25 required
20302030
| "IFLA_ALLMULTI"
20312031
| "IFLA_DEVLINK_PORT"
20322032
| "IFLA_GRO_IPV4_MAX_SIZE"
@@ -2040,18 +2040,18 @@ fn test_android(target: &str) {
20402040
| "NTF_EXT_LOCKED"
20412041
| "ALG_SET_DRBG_ENTROPY" => true,
20422042

2043-
// FIXME: Something has been changed on r26b:
2043+
// FIXME(android): Something has been changed on r26b:
20442044
| "IPPROTO_MAX"
20452045
| "NFNL_SUBSYS_COUNT"
20462046
| "NF_NETDEV_NUMHOOKS"
20472047
| "NFT_MSG_MAX"
20482048
| "SW_MAX"
20492049
| "SW_CNT" => true,
20502050

2051-
// FIXME: aarch64 env cannot find it:
2051+
// FIXME(android): aarch64 env cannot find it:
20522052
| "PTRACE_GETREGS"
20532053
| "PTRACE_SETREGS" if aarch64 => true,
2054-
// FIXME: The value has been changed on r26b:
2054+
// FIXME(android): The value has been changed on r26b:
20552055
| "SYS_syscalls" if aarch64 => true,
20562056

20572057
// From `<include/linux/sched.h>`.
@@ -2093,7 +2093,7 @@ fn test_android(target: &str) {
20932093
cfg.skip_fn(move |name| {
20942094
// skip those that are manually verified
20952095
match name {
2096-
// FIXME: https://github.com/rust-lang/libc/issues/1272
2096+
// FIXME(android): https://github.com/rust-lang/libc/issues/1272
20972097
"execv" | "execve" | "execvp" | "execvpe" | "fexecve" => true,
20982098

20992099
// There are two versions of the sterror_r function, see
@@ -2147,7 +2147,7 @@ fn test_android(target: &str) {
21472147
// Added in API level 26, but some tests use level 24.
21482148
"getdomainname" | "setdomainname" => true,
21492149

2150-
// FIXME: bad function pointers:
2150+
// FIXME(android): bad function pointers:
21512151
"isalnum" | "isalpha" | "iscntrl" | "isdigit" | "isgraph" | "islower" | "isprint"
21522152
| "ispunct" | "isspace" | "isupper" | "isxdigit" | "isblank" | "tolower"
21532153
| "toupper" => true,
@@ -2163,12 +2163,12 @@ fn test_android(target: &str) {
21632163
(struct_ == "sigevent" && field == "sigev_value") ||
21642164
// this one is an anonymous union
21652165
(struct_ == "ff_effect" && field == "u") ||
2166-
// FIXME: `sa_sigaction` has type `sighandler_t` but that type is
2166+
// FIXME(android): `sa_sigaction` has type `sighandler_t` but that type is
21672167
// incorrect, see: https://github.com/rust-lang/libc/issues/1359
21682168
(struct_ == "sigaction" && field == "sa_sigaction") ||
21692169
// signalfd had SIGSYS fields added in Android 4.19, but CI does not have that version yet.
21702170
(struct_ == "signalfd_siginfo" && field == "ssi_call_addr") ||
2171-
// FIXME: Seems the type has been changed on NDK r26b
2171+
// FIXME(android): Seems the type has been changed on NDK r26b
21722172
(struct_ == "flock64" && (field == "l_start" || field == "l_len"))
21732173
});
21742174

@@ -2360,7 +2360,7 @@ fn test_freebsd(target: &str) {
23602360
| "devstat_match_flags"
23612361
| "devstat_priority" => ty.to_string(),
23622362

2363-
// FIXME: https://github.com/rust-lang/libc/issues/1273
2363+
// FIXME(freebsd): https://github.com/rust-lang/libc/issues/1273
23642364
"sighandler_t" => "sig_t".to_string(),
23652365

23662366
t if is_union => format!("union {}", t),
@@ -2423,12 +2423,12 @@ fn test_freebsd(target: &str) {
24232423
true
24242424
}
24252425

2426-
// FIXME: These are deprecated - remove in a couple of releases.
2426+
// FIXME(deprecated): These are deprecated - remove in a couple of releases.
24272427
// These constants were removed in FreeBSD 11 (svn r273250) but will
24282428
// still be accepted and ignored at runtime.
24292429
"MAP_RENAME" | "MAP_NORESERVE" => true,
24302430

2431-
// FIXME: These are deprecated - remove in a couple of releases.
2431+
// FIXME(deprecated): These are deprecated - remove in a couple of releases.
24322432
// These constants were removed in FreeBSD 11 (svn r262489),
24332433
// and they've never had any legitimate use outside of the
24342434
// base system anyway.
@@ -2454,7 +2454,7 @@ fn test_freebsd(target: &str) {
24542454
// Removed in FreeBSD 14 (git 7ff9ae90f0b)
24552455
"IFF_NOGROUP" => true,
24562456

2457-
// FIXME: These are deprecated - remove in a couple of releases.
2457+
// FIXME(deprecated): These are deprecated - remove in a couple of releases.
24582458
// These symbols are not stable across OS-versions. They were
24592459
// changed for FreeBSD 14 in git revisions b62848b0c3f and
24602460
// 2cf7870864e.
@@ -2568,7 +2568,7 @@ fn test_freebsd(target: &str) {
25682568
}
25692569

25702570
// Added in FreeBSD 14.
2571-
"F_KINFO" => true, // FIXME: depends how frequent freebsd 14 is updated on CI, this addition went this week only.
2571+
"F_KINFO" => true, // FIXME(freebsd): depends how frequent freebsd 14 is updated on CI, this addition went this week only.
25722572
"SHM_RENAME_NOREPLACE"
25732573
| "SHM_RENAME_EXCHANGE"
25742574
| "SHM_LARGEPAGE_ALLOC_DEFAULT"
@@ -2624,11 +2624,11 @@ fn test_freebsd(target: &str) {
26242624
// Added in FreeBSD 14
26252625
"IFCAP_NV" if Some(14) > freebsd_ver => true,
26262626

2627-
// FIXME: Removed in https://reviews.freebsd.org/D38574 and https://reviews.freebsd.org/D38822
2627+
// FIXME(freebsd): Removed in https://reviews.freebsd.org/D38574 and https://reviews.freebsd.org/D38822
26282628
// We maybe should deprecate them once a stable release ships them.
26292629
"IP_BINDMULTI" | "IP_RSS_LISTEN_BUCKET" => true,
26302630

2631-
// FIXME: Removed in https://reviews.freebsd.org/D39127.
2631+
// FIXME(freebsd): Removed in https://reviews.freebsd.org/D39127.
26322632
"KERN_VNODE" => true,
26332633

26342634
// Added in FreeBSD 14
@@ -2651,10 +2651,10 @@ fn test_freebsd(target: &str) {
26512651
true
26522652
}
26532653

2654-
// FIXME: Removed in FreeBSD 15:
2654+
// FIXME(freebsd): Removed in FreeBSD 15:
26552655
"LOCAL_CONNWAIT" if freebsd_ver >= Some(15) => true,
26562656

2657-
// FIXME: The values has been changed in FreeBSD 15:
2657+
// FIXME(freebsd): The values has been changed in FreeBSD 15:
26582658
"CLOCK_BOOTTIME" if Some(15) <= freebsd_ver => true,
26592659

26602660
// Added in FreeBSD 14.0
@@ -2713,7 +2713,7 @@ fn test_freebsd(target: &str) {
27132713
| "sctp_send_failed_event"
27142714
| "sctp_stream_reset_event" => true,
27152715

2716-
// FIXME: Changed in FreeBSD 15
2716+
// FIXME(freebsd): Changed in FreeBSD 15
27172717
"tcp_info" | "sockstat" if Some(15) >= freebsd_ver => true,
27182718

27192719
_ => false,
@@ -2732,7 +2732,7 @@ fn test_freebsd(target: &str) {
27322732
// Therefore the function pointer comparison does not make sense for it.
27332733
"uname" => true,
27342734

2735-
// FIXME: Our API is unsound. The Rust API allows aliasing
2735+
// FIXME(ctest): Our API is unsound. The Rust API allows aliasing
27362736
// pointers, but the C API requires pointers not to alias.
27372737
// We should probably be at least using `&`/`&mut` here, see:
27382738
// https://github.com/gnzlbg/ctest/issues/68
@@ -2795,7 +2795,7 @@ fn test_freebsd(target: &str) {
27952795

27962796
cfg.skip_field(move |struct_, field| {
27972797
match (struct_, field) {
2798-
// FIXME: `sa_sigaction` has type `sighandler_t` but that type is
2798+
// FIXME(freebsd): `sa_sigaction` has type `sighandler_t` but that type is
27992799
// incorrect, see: https://github.com/rust-lang/libc/issues/1359
28002800
("sigaction", "sa_sigaction") => true,
28012801

@@ -2826,7 +2826,7 @@ fn test_freebsd(target: &str) {
28262826
// anonymous struct
28272827
("devstat", "dev_links") => true,
28282828

2829-
// FIXME: structs too complicated to bind for now...
2829+
// FIXME(freebsd): structs too complicated to bind for now...
28302830
("kinfo_proc", "ki_paddr") => true,
28312831
("kinfo_proc", "ki_addr") => true,
28322832
("kinfo_proc", "ki_tracep") => true,
@@ -2874,7 +2874,7 @@ fn test_emscripten(target: &str) {
28742874
assert!(target.contains("emscripten"));
28752875

28762876
let mut cfg = ctest_cfg();
2877-
cfg.define("_GNU_SOURCE", None); // FIXME: ??
2877+
cfg.define("_GNU_SOURCE", None); // FIXME(emscripten): ??
28782878

28792879
headers! { cfg:
28802880
"ctype.h",
@@ -2990,7 +2990,7 @@ fn test_emscripten(target: &str) {
29902990
cfg.skip_type(move |ty| {
29912991
match ty {
29922992
// sighandler_t is crazy across platforms
2993-
// FIXME: is this necessary?
2993+
// FIXME(emscripten): is this necessary?
29942994
"sighandler_t" => true,
29952995

29962996
// No epoll support
@@ -3008,7 +3008,7 @@ fn test_emscripten(target: &str) {
30083008
// This is actually a union, not a struct
30093009
"sigval" => true,
30103010

3011-
// FIXME: Investigate why the test fails.
3011+
// FIXME(emscripten): Investigate why the test fails.
30123012
// Skip for now to unblock CI.
30133013
"pthread_condattr_t" => true,
30143014
"pthread_mutexattr_t" => true,

0 commit comments

Comments
 (0)