Skip to content

Commit 21b9e56

Browse files
committed
chore: add labels to FIXMEs
1 parent 8b69878 commit 21b9e56

File tree

3 files changed

+54
-50
lines changed

3 files changed

+54
-50
lines changed

libc-test/build.rs

+49-49
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ fn test_windows(target: &str) {
680680
// Just pass all these through, no need for a "struct" prefix
681681
"FILE" | "DIR" | "Dl_info" => ty.to_string(),
682682

683-
// FIXME: these don't exist:
683+
// FIXME(ctest): these don't exist:
684684
"time64_t" => "__time64_t".to_string(),
685685
"ssize_t" => "SSIZE_T".to_string(),
686686

@@ -712,7 +712,7 @@ fn test_windows(target: &str) {
712712
cfg.skip_type(move |name| match name {
713713
"SSIZE_T" if !gnu => true,
714714
"ssize_t" if !gnu => true,
715-
// FIXME: The size and alignment of this type are incorrect
715+
// FIXME(ctest): The size and alignment of this type are incorrect
716716
"time_t" if gnu && i686 => true,
717717
_ => false,
718718
});
@@ -722,20 +722,20 @@ fn test_windows(target: &str) {
722722
return true;
723723
}
724724
match ty {
725-
// FIXME: The size and alignment of this struct are incorrect
725+
// FIXME(ctest): The size and alignment of this struct are incorrect
726726
"timespec" if gnu && i686 => true,
727727
_ => false,
728728
}
729729
});
730730

731731
cfg.skip_const(move |name| {
732732
match name {
733-
// FIXME: API error:
733+
// FIXME(ctest): API error:
734734
// SIG_ERR type is "void (*)(int)", not "int"
735735
"SIG_ERR" |
736736
// Similar for SIG_DFL/IGN/GET/SGE/ACK
737737
"SIG_DFL" | "SIG_IGN" | "SIG_GET" | "SIG_SGE" | "SIG_ACK" => true,
738-
// FIXME: newer windows-gnu environment on CI?
738+
// FIXME(windows): newer windows-gnu environment on CI?
739739
"_O_OBTAIN_DIR" if gnu => true,
740740
_ => false,
741741
}
@@ -745,7 +745,7 @@ fn test_windows(target: &str) {
745745
"CONTEXT" if field == "Fp" => true,
746746
_ => false,
747747
});
748-
// FIXME: All functions point to the wrong addresses?
748+
// FIXME(ctest): All functions point to the wrong addresses?
749749
cfg.skip_fn_ptrcheck(|_| true);
750750

751751
cfg.skip_signededness(move |c| {
@@ -1041,7 +1041,7 @@ fn test_solarish(target: &str) {
10411041
// are still ABI compatible. We can wait for the next major release
10421042
// to be compliant with the new API.
10431043
//
1044-
// FIXME: unskip these for next major release
1044+
// FIXME(ctest): unskip these for next major release
10451045
"setpriority" | "personality" => true,
10461046

10471047
// signal is defined in terms of sighandler_t, so ignore
@@ -1076,7 +1076,7 @@ fn test_solarish(target: &str) {
10761076
// excluded from the tests.
10771077
"getifaddrs" if is_illumos => true,
10781078

1079-
// FIXME: Our API is unsound. The Rust API allows aliasing
1079+
// FIXME(ctest): Our API is unsound. The Rust API allows aliasing
10801080
// pointers, but the C API requires pointers not to alias.
10811081
// We should probably be at least using `&`/`&mut` here, see:
10821082
// https://github.com/gnzlbg/ctest/issues/68
@@ -1222,7 +1222,7 @@ fn test_netbsd(target: &str) {
12221222
return true;
12231223
}
12241224
match ty {
1225-
// FIXME: sighandler_t is crazy across platforms
1225+
// FIXME(ctest): sighandler_t is crazy across platforms
12261226
"sighandler_t" => true,
12271227
_ => false,
12281228
}
@@ -1266,7 +1266,7 @@ fn test_netbsd(target: &str) {
12661266

12671267
cfg.skip_fn(move |name| {
12681268
match name {
1269-
// FIXME: netbsd 10 minimum
1269+
// FIXME(netbsd): netbsd 10 minimum
12701270
"getentropy" | "getrandom" => true,
12711271

12721272
"getrlimit" | "getrlimit64" | // non-int in 1st arg
@@ -1405,7 +1405,7 @@ fn test_dragonflybsd(target: &str) {
14051405
| "Elf64_Shdr" | "Elf32_Sym" | "Elf64_Sym" | "Elf32_Ehdr" | "Elf64_Ehdr"
14061406
| "Elf32_Chdr" | "Elf64_Chdr" => ty.to_string(),
14071407

1408-
// FIXME: OSX calls this something else
1408+
// FIXME(dragonflybsd): OSX calls this something else
14091409
"sighandler_t" => "sig_t".to_string(),
14101410

14111411
t if is_union => format!("union {}", t),
@@ -1450,7 +1450,7 @@ fn test_dragonflybsd(target: &str) {
14501450
return true;
14511451
}
14521452
match ty {
1453-
// FIXME: These are tested as part of the linux_fcntl tests since
1453+
// FIXME(dragonflybsd): These are tested as part of the linux_fcntl tests since
14541454
// there are header conflicts when including them with all the other
14551455
// structs.
14561456
"termios2" => true,
@@ -1814,7 +1814,7 @@ fn test_android(target: &str) {
18141814
// Our stat *_nsec fields normally don't actually exist but are part
18151815
// of a timeval struct
18161816
s if s.ends_with("_nsec") && struct_.starts_with("stat") => s.to_string(),
1817-
// FIXME: appears that `epoll_event.data` is an union
1817+
// FIXME(union): appears that `epoll_event.data` is an union
18181818
"u64" if struct_ == "epoll_event" => "data.u64".to_string(),
18191819
// The following structs have a field called `type` in C,
18201820
// but `type` is a Rust keyword, so these fields are translated
@@ -1833,7 +1833,7 @@ fn test_android(target: &str) {
18331833

18341834
cfg.skip_type(move |ty| {
18351835
match ty {
1836-
// FIXME: `sighandler_t` type is incorrect, see:
1836+
// FIXME(android): `sighandler_t` type is incorrect, see:
18371837
// https://github.com/rust-lang/libc/issues/1359
18381838
"sighandler_t" => true,
18391839

@@ -1844,7 +1844,7 @@ fn test_android(target: &str) {
18441844
"posix_spawn_file_actions_t" => true,
18451845
"posix_spawnattr_t" => true,
18461846

1847-
// FIXME: "'__uint128' undeclared" in C
1847+
// FIXME(android): "'__uint128' undeclared" in C
18481848
"__uint128" => true,
18491849

18501850
_ => false,
@@ -1867,12 +1867,12 @@ fn test_android(target: &str) {
18671867
// These are tested in the `linux_elf.rs` file.
18681868
"Elf64_Phdr" | "Elf32_Phdr" => true,
18691869

1870-
// FIXME: The type of `iv` has been changed.
1870+
// FIXME(android): The type of `iv` has been changed.
18711871
"af_alg_iv" => true,
18721872

1873-
// FIXME: The size of struct has been changed:
1873+
// FIXME(android): The size of struct has been changed:
18741874
"inotify_event" => true,
1875-
// FIXME: The field has been changed:
1875+
// FIXME(android): The field has been changed:
18761876
"sockaddr_vm" => true,
18771877

18781878
_ => false,
@@ -1899,13 +1899,13 @@ fn test_android(target: &str) {
18991899
// The `ARPHRD_CAN` is tested in the `linux_if_arp.rs` tests:
19001900
"ARPHRD_CAN" => true,
19011901

1902-
// FIXME: deprecated: not available in any header
1902+
// FIXME(deprecated): deprecated: not available in any header
19031903
// See: https://github.com/rust-lang/libc/issues/1356
19041904
"ENOATTR" => true,
19051905

1906-
// FIXME: still necessary?
1906+
// FIXME(android): still necessary?
19071907
"SIG_DFL" | "SIG_ERR" | "SIG_IGN" => true, // sighandler_t weirdness
1908-
// FIXME: deprecated - removed in glibc 2.26
1908+
// FIXME(deprecated): deprecated - removed in glibc 2.26
19091909
"SIGUNUSED" => true,
19101910

19111911
// Needs a newer Android SDK for the definition
@@ -1914,7 +1914,7 @@ fn test_android(target: &str) {
19141914
// Requires Linux kernel 5.6
19151915
"VMADDR_CID_LOCAL" => true,
19161916

1917-
// FIXME: conflicts with standard C headers and is tested in
1917+
// FIXME(android): conflicts with standard C headers and is tested in
19181918
// `linux_termios.rs` below:
19191919
"BOTHER" => true,
19201920
"IBSHIFT" => true,
@@ -1944,7 +1944,7 @@ fn test_android(target: &str) {
19441944
// kernel 6.2 minimum
19451945
"TUN_F_USO4" | "TUN_F_USO6" | "IFF_NO_CARRIER" => true,
19461946

1947-
// FIXME: NDK r22 minimum required
1947+
// FIXME(android): NDK r22 minimum required
19481948
| "FDB_NOTIFY_BIT"
19491949
| "FDB_NOTIFY_INACTIVE_BIT"
19501950
| "IFLA_ALT_IFNAME"
@@ -1957,16 +1957,16 @@ fn test_android(target: &str) {
19571957
| "NFEA_DONT_REFRESH"
19581958
| "NFEA_UNSPEC" => true,
19591959

1960-
// FIXME: NDK r23 minimum required
1960+
// FIXME(android): NDK r23 minimum required
19611961
| "IFLA_PARENT_DEV_BUS_NAME"
19621962
| "IFLA_PARENT_DEV_NAME" => true,
19631963

1964-
// FIXME: NDK r25 minimum required
1964+
// FIXME(android): NDK r25 minimum required
19651965
| "IFLA_GRO_MAX_SIZE"
19661966
| "NDA_FLAGS_EXT"
19671967
| "NTF_EXT_MANAGED" => true,
19681968

1969-
// FIXME: NDK above r25 required
1969+
// FIXME(android): NDK above r25 required
19701970
| "IFLA_ALLMULTI"
19711971
| "IFLA_DEVLINK_PORT"
19721972
| "IFLA_GRO_IPV4_MAX_SIZE"
@@ -1980,18 +1980,18 @@ fn test_android(target: &str) {
19801980
| "NTF_EXT_LOCKED"
19811981
| "ALG_SET_DRBG_ENTROPY" => true,
19821982

1983-
// FIXME: Something has been changed on r26b:
1983+
// FIXME(android): Something has been changed on r26b:
19841984
| "IPPROTO_MAX"
19851985
| "NFNL_SUBSYS_COUNT"
19861986
| "NF_NETDEV_NUMHOOKS"
19871987
| "NFT_MSG_MAX"
19881988
| "SW_MAX"
19891989
| "SW_CNT" => true,
19901990

1991-
// FIXME: aarch64 env cannot find it:
1991+
// FIXME(android): aarch64 env cannot find it:
19921992
| "PTRACE_GETREGS"
19931993
| "PTRACE_SETREGS" if aarch64 => true,
1994-
// FIXME: The value has been changed on r26b:
1994+
// FIXME(android): The value has been changed on r26b:
19951995
| "SYS_syscalls" if aarch64 => true,
19961996

19971997
// From `<include/linux/sched.h>`.
@@ -2030,7 +2030,7 @@ fn test_android(target: &str) {
20302030
cfg.skip_fn(move |name| {
20312031
// skip those that are manually verified
20322032
match name {
2033-
// FIXME: for unknown reasons linker unable to find "fexecve"
2033+
// FIXME(android): for unknown reasons linker unable to find "fexecve"
20342034
"fexecve" => true,
20352035

20362036
// There are two versions of the sterror_r function, see
@@ -2081,7 +2081,7 @@ fn test_android(target: &str) {
20812081
// Added in API level 26, but some tests use level 24.
20822082
"endgrent" => true,
20832083

2084-
// FIXME: bad function pointers:
2084+
// FIXME(android): bad function pointers:
20852085
"isalnum" | "isalpha" | "iscntrl" | "isdigit" | "isgraph" | "islower" | "isprint"
20862086
| "ispunct" | "isspace" | "isupper" | "isxdigit" | "isblank" | "tolower"
20872087
| "toupper" => true,
@@ -2097,12 +2097,12 @@ fn test_android(target: &str) {
20972097
(struct_ == "sigevent" && field == "sigev_value") ||
20982098
// this one is an anonymous union
20992099
(struct_ == "ff_effect" && field == "u") ||
2100-
// FIXME: `sa_sigaction` has type `sighandler_t` but that type is
2100+
// FIXME(android): `sa_sigaction` has type `sighandler_t` but that type is
21012101
// incorrect, see: https://github.com/rust-lang/libc/issues/1359
21022102
(struct_ == "sigaction" && field == "sa_sigaction") ||
21032103
// signalfd had SIGSYS fields added in Android 4.19, but CI does not have that version yet.
21042104
(struct_ == "signalfd_siginfo" && field == "ssi_call_addr") ||
2105-
// FIXME: Seems the type has been changed on NDK r26b
2105+
// FIXME(android): Seems the type has been changed on NDK r26b
21062106
(struct_ == "flock64" && (field == "l_start" || field == "l_len"))
21072107
});
21082108

@@ -2296,7 +2296,7 @@ fn test_freebsd(target: &str) {
22962296
| "devstat_match_flags"
22972297
| "devstat_priority" => ty.to_string(),
22982298

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

23022302
t if is_union => format!("union {}", t),
@@ -2358,12 +2358,12 @@ fn test_freebsd(target: &str) {
23582358
true
23592359
}
23602360

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

2366-
// FIXME: This is deprecated - remove in a couple of releases.
2366+
// FIXME(deprecated): This is deprecated - remove in a couple of releases.
23672367
// This was removed in FreeBSD 14 (git 1b4701fe1e8) and never
23682368
// should've been used anywhere anyway.
23692369
"TDF_UNUSED23" => true,
@@ -2380,7 +2380,7 @@ fn test_freebsd(target: &str) {
23802380
// Removed in FreeBSD 14 (git 7ff9ae90f0b)
23812381
"IFF_NOGROUP" => true,
23822382

2383-
// FIXME: These are deprecated - remove in a couple of releases.
2383+
// FIXME(deprecated): These are deprecated - remove in a couple of releases.
23842384
// These symbols are not stable across OS-versions. They were
23852385
// changed for FreeBSD 14 in git revisions b62848b0c3f and
23862386
// 2cf7870864e.
@@ -2494,7 +2494,7 @@ fn test_freebsd(target: &str) {
24942494
}
24952495

24962496
// Added in FreeBSD 14.
2497-
"F_KINFO" => true, // FIXME: depends how frequent freebsd 14 is updated on CI, this addition went this week only.
2497+
"F_KINFO" => true, // FIXME(freebsd): depends how frequent freebsd 14 is updated on CI, this addition went this week only.
24982498
"SHM_RENAME_NOREPLACE"
24992499
| "SHM_RENAME_EXCHANGE"
25002500
| "SHM_LARGEPAGE_ALLOC_DEFAULT"
@@ -2550,11 +2550,11 @@ fn test_freebsd(target: &str) {
25502550
// Added in FreeBSD 14
25512551
"IFCAP_NV" if Some(14) > freebsd_ver => true,
25522552

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

2557-
// FIXME: Removed in https://reviews.freebsd.org/D39127.
2557+
// FIXME(freebsd): Removed in https://reviews.freebsd.org/D39127.
25582558
"KERN_VNODE" => true,
25592559

25602560
// Added in FreeBSD 14
@@ -2577,10 +2577,10 @@ fn test_freebsd(target: &str) {
25772577
true
25782578
}
25792579

2580-
// FIXME: Removed in FreeBSD 15:
2580+
// FIXME(freebsd): Removed in FreeBSD 15:
25812581
"LOCAL_CONNWAIT" => true,
25822582

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

25862586
// Added in FreeBSD 14.0
@@ -2634,7 +2634,7 @@ fn test_freebsd(target: &str) {
26342634
| "sctp_send_failed_event"
26352635
| "sctp_stream_reset_event" => true,
26362636

2637-
// FIXME: Changed in FreeBSD 15
2637+
// FIXME(freebsd): Changed in FreeBSD 15
26382638
"tcp_info" | "sockstat" if Some(15) >= freebsd_ver => true,
26392639

26402640
_ => false,
@@ -2652,7 +2652,7 @@ fn test_freebsd(target: &str) {
26522652
// Therefore the function pointer comparison does not make sense for it.
26532653
"uname" => true,
26542654

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

27162716
cfg.skip_field(move |struct_, field| {
27172717
match (struct_, field) {
2718-
// FIXME: `sa_sigaction` has type `sighandler_t` but that type is
2718+
// FIXME(freebsd): `sa_sigaction` has type `sighandler_t` but that type is
27192719
// incorrect, see: https://github.com/rust-lang/libc/issues/1359
27202720
("sigaction", "sa_sigaction") => true,
27212721

@@ -2747,7 +2747,7 @@ fn test_freebsd(target: &str) {
27472747
// anonymous struct
27482748
("devstat", "dev_links") => true,
27492749

2750-
// FIXME: structs too complicated to bind for now...
2750+
// FIXME(ctest): structs too complicated to bind for now...
27512751
("kinfo_proc", "ki_paddr") => true,
27522752
("kinfo_proc", "ki_addr") => true,
27532753
("kinfo_proc", "ki_tracep") => true,
@@ -2791,7 +2791,7 @@ fn test_emscripten(target: &str) {
27912791
assert!(target.contains("emscripten"));
27922792

27932793
let mut cfg = ctest_cfg();
2794-
cfg.define("_GNU_SOURCE", None); // FIXME: ??
2794+
cfg.define("_GNU_SOURCE", None); // FIXME(emscripten): ??
27952795

27962796
headers! { cfg:
27972797
"ctype.h",
@@ -2907,7 +2907,7 @@ fn test_emscripten(target: &str) {
29072907
cfg.skip_type(move |ty| {
29082908
match ty {
29092909
// sighandler_t is crazy across platforms
2910-
// FIXME: is this necessary?
2910+
// FIXME(emscripten): is this necessary?
29112911
"sighandler_t" => true,
29122912

29132913
// No epoll support
@@ -2928,7 +2928,7 @@ fn test_emscripten(target: &str) {
29282928
// This is actually a union, not a struct
29292929
"sigval" => true,
29302930

2931-
// FIXME: Investigate why the test fails.
2931+
// FIXME(ctest): Investigate why the test fails.
29322932
// Skip for now to unblock CI.
29332933
"pthread_condattr_t" => true,
29342934
"pthread_mutexattr_t" => true,

src/windows/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ impl Clone for FILE {
264264
}
265265
}
266266
#[cfg_attr(feature = "extra_traits", derive(Debug))]
267-
pub enum fpos_t {} // FIXME: fill this out with a struct
267+
pub enum fpos_t {} // FIXME(windows): fill this out with a struct
268268
impl Copy for fpos_t {}
269269
impl Clone for fpos_t {
270270
fn clone(&self) -> fpos_t {

0 commit comments

Comments
 (0)