Skip to content

Commit 6e0ee6f

Browse files
authored
Merge pull request #4234 from lvllvl/4117-part-6
Classify FIXMEs - 6
2 parents 8ff30c0 + 5096e10 commit 6e0ee6f

File tree

1 file changed

+49
-49
lines changed

1 file changed

+49
-49
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(windows): 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(windows): 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(windows): 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(windows): 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(windows): All functions point to the wrong addresses?
749749
cfg.skip_fn_ptrcheck(|_| true);
750750

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

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

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

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

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

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

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

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

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

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

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

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

1874-
// FIXME: The size of struct has been changed:
1874+
// FIXME(android): The size of struct has been changed:
18751875
"inotify_event" => true,
1876-
// FIXME: The field has been changed:
1876+
// FIXME(android): The field has been changed:
18771877
"sockaddr_vm" => true,
18781878

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

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

1907-
// FIXME: still necessary?
1907+
// FIXME(android): still necessary?
19081908
"SIG_DFL" | "SIG_ERR" | "SIG_IGN" => true, // sighandler_t weirdness
1909-
// FIXME: deprecated - removed in glibc 2.26
1909+
// FIXME(deprecated): deprecated - removed in glibc 2.26
19101910
"SIGUNUSED" => true,
19111911

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

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

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

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

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

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

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

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

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

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

2091-
// FIXME: bad function pointers:
2091+
// FIXME(android): bad function pointers:
20922092
"isalnum" | "isalpha" | "iscntrl" | "isdigit" | "isgraph" | "islower" | "isprint"
20932093
| "ispunct" | "isspace" | "isupper" | "isxdigit" | "isblank" | "tolower"
20942094
| "toupper" => true,
@@ -2104,12 +2104,12 @@ fn test_android(target: &str) {
21042104
(struct_ == "sigevent" && field == "sigev_value") ||
21052105
// this one is an anonymous union
21062106
(struct_ == "ff_effect" && field == "u") ||
2107-
// FIXME: `sa_sigaction` has type `sighandler_t` but that type is
2107+
// FIXME(android): `sa_sigaction` has type `sighandler_t` but that type is
21082108
// incorrect, see: https://github.com/rust-lang/libc/issues/1359
21092109
(struct_ == "sigaction" && field == "sa_sigaction") ||
21102110
// signalfd had SIGSYS fields added in Android 4.19, but CI does not have that version yet.
21112111
(struct_ == "signalfd_siginfo" && field == "ssi_call_addr") ||
2112-
// FIXME: Seems the type has been changed on NDK r26b
2112+
// FIXME(android): Seems the type has been changed on NDK r26b
21132113
(struct_ == "flock64" && (field == "l_start" || field == "l_len"))
21142114
});
21152115

@@ -2304,7 +2304,7 @@ fn test_freebsd(target: &str) {
23042304
| "devstat_match_flags"
23052305
| "devstat_priority" => ty.to_string(),
23062306

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

23102310
t if is_union => format!("union {}", t),
@@ -2367,12 +2367,12 @@ fn test_freebsd(target: &str) {
23672367
true
23682368
}
23692369

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

2375-
// FIXME: This is deprecated - remove in a couple of releases.
2375+
// FIXME(deprecated): This is deprecated - remove in a couple of releases.
23762376
// This was removed in FreeBSD 14 (git 1b4701fe1e8) and never
23772377
// should've been used anywhere anyway.
23782378
"TDF_UNUSED23" => true,
@@ -2389,7 +2389,7 @@ fn test_freebsd(target: &str) {
23892389
// Removed in FreeBSD 14 (git 7ff9ae90f0b)
23902390
"IFF_NOGROUP" => true,
23912391

2392-
// FIXME: These are deprecated - remove in a couple of releases.
2392+
// FIXME(deprecated): These are deprecated - remove in a couple of releases.
23932393
// These symbols are not stable across OS-versions. They were
23942394
// changed for FreeBSD 14 in git revisions b62848b0c3f and
23952395
// 2cf7870864e.
@@ -2503,7 +2503,7 @@ fn test_freebsd(target: &str) {
25032503
}
25042504

25052505
// Added in FreeBSD 14.
2506-
"F_KINFO" => true, // FIXME: depends how frequent freebsd 14 is updated on CI, this addition went this week only.
2506+
"F_KINFO" => true, // FIXME(freebsd): depends how frequent freebsd 14 is updated on CI, this addition went this week only.
25072507
"SHM_RENAME_NOREPLACE"
25082508
| "SHM_RENAME_EXCHANGE"
25092509
| "SHM_LARGEPAGE_ALLOC_DEFAULT"
@@ -2559,11 +2559,11 @@ fn test_freebsd(target: &str) {
25592559
// Added in FreeBSD 14
25602560
"IFCAP_NV" if Some(14) > freebsd_ver => true,
25612561

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

2566-
// FIXME: Removed in https://reviews.freebsd.org/D39127.
2566+
// FIXME(freebsd): Removed in https://reviews.freebsd.org/D39127.
25672567
"KERN_VNODE" => true,
25682568

25692569
// Added in FreeBSD 14
@@ -2586,10 +2586,10 @@ fn test_freebsd(target: &str) {
25862586
true
25872587
}
25882588

2589-
// FIXME: Removed in FreeBSD 15:
2589+
// FIXME(freebsd): Removed in FreeBSD 15:
25902590
"LOCAL_CONNWAIT" => true,
25912591

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

25952595
// Added in FreeBSD 14.0
@@ -2643,7 +2643,7 @@ fn test_freebsd(target: &str) {
26432643
| "sctp_send_failed_event"
26442644
| "sctp_stream_reset_event" => true,
26452645

2646-
// FIXME: Changed in FreeBSD 15
2646+
// FIXME(freebsd): Changed in FreeBSD 15
26472647
"tcp_info" | "sockstat" if Some(15) >= freebsd_ver => true,
26482648

26492649
_ => false,
@@ -2661,7 +2661,7 @@ fn test_freebsd(target: &str) {
26612661
// Therefore the function pointer comparison does not make sense for it.
26622662
"uname" => true,
26632663

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

27252725
cfg.skip_field(move |struct_, field| {
27262726
match (struct_, field) {
2727-
// FIXME: `sa_sigaction` has type `sighandler_t` but that type is
2727+
// FIXME(freebsd): `sa_sigaction` has type `sighandler_t` but that type is
27282728
// incorrect, see: https://github.com/rust-lang/libc/issues/1359
27292729
("sigaction", "sa_sigaction") => true,
27302730

@@ -2756,7 +2756,7 @@ fn test_freebsd(target: &str) {
27562756
// anonymous struct
27572757
("devstat", "dev_links") => true,
27582758

2759-
// FIXME: structs too complicated to bind for now...
2759+
// FIXME(freebsd): structs too complicated to bind for now...
27602760
("kinfo_proc", "ki_paddr") => true,
27612761
("kinfo_proc", "ki_addr") => true,
27622762
("kinfo_proc", "ki_tracep") => true,
@@ -2800,7 +2800,7 @@ fn test_emscripten(target: &str) {
28002800
assert!(target.contains("emscripten"));
28012801

28022802
let mut cfg = ctest_cfg();
2803-
cfg.define("_GNU_SOURCE", None); // FIXME: ??
2803+
cfg.define("_GNU_SOURCE", None); // FIXME(emscripten): ??
28042804

28052805
headers! { cfg:
28062806
"ctype.h",
@@ -2916,7 +2916,7 @@ fn test_emscripten(target: &str) {
29162916
cfg.skip_type(move |ty| {
29172917
match ty {
29182918
// sighandler_t is crazy across platforms
2919-
// FIXME: is this necessary?
2919+
// FIXME(emscripten): is this necessary?
29202920
"sighandler_t" => true,
29212921

29222922
// No epoll support
@@ -2937,7 +2937,7 @@ fn test_emscripten(target: &str) {
29372937
// This is actually a union, not a struct
29382938
"sigval" => true,
29392939

2940-
// FIXME: Investigate why the test fails.
2940+
// FIXME(emscripten): Investigate why the test fails.
29412941
// Skip for now to unblock CI.
29422942
"pthread_condattr_t" => true,
29432943
"pthread_mutexattr_t" => true,

0 commit comments

Comments
 (0)