Skip to content

Commit a0120d9

Browse files
committed
chore: add labels to each FIXME
1 parent 895a682 commit a0120d9

File tree

143 files changed

+1636
-979
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

143 files changed

+1636
-979
lines changed

.cirrus.yml

+6-3
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,22 @@ task:
33
env:
44
HOME: /tmp # cargo cache needs it
55
TARGET: x86_64-unknown-freebsd
6+
# FIXME(freebsd): FreeBSD has a segfault when `RUST_BACKTRACE` is set
7+
# https://github.com/rust-lang/rust/issues/132185
8+
RUST_BACKTRACE: "0"
69
matrix:
710
- name: nightly freebsd-13 i686
811
# Test i686 FreeBSD in 32-bit emulation on a 64-bit host.
912
env:
1013
TARGET: i686-unknown-freebsd
1114
freebsd_instance:
12-
image_family: freebsd-13-3
15+
image_family: freebsd-13-4
1316
- name: nightly freebsd-13 x86_64
1417
freebsd_instance:
15-
image_family: freebsd-13-3
18+
image_family: freebsd-13-4
1619
- name: nightly freebsd-14 x86_64
1720
freebsd_instance:
18-
image: freebsd-14-1-release-amd64-ufs
21+
image: freebsd-14-2-release-amd64-ufs
1922
- name: nightly freebsd-15 x86_64
2023
freebsd_instance:
2124
image_family: freebsd-15-0-snap

.github/workflows/ci.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,9 @@ jobs:
135135
- i686-unknown-linux-musl
136136
- loongarch64-unknown-linux-gnu
137137
- loongarch64-unknown-linux-musl
138-
- powerpc-unknown-linux-gnu
138+
# FIXME(ppc): SIGILL running tests, see
139+
# https://github.com/rust-lang/libc/pull/4254#issuecomment-2636288713
140+
# - powerpc-unknown-linux-gnu
139141
- powerpc64-unknown-linux-gnu
140142
- powerpc64le-unknown-linux-gnu
141143
- riscv64gc-unknown-linux-gnu

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
target
22
Cargo.lock
33
*~
4-
style

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ but this is not guaranteed.
6565
You can see the platform(target)-specific docs on [docs.rs], select a platform
6666
you want to see.
6767

68-
See [`ci/build.sh`](https://github.com/rust-lang/libc/blob/HEAD/ci/build.sh) for
68+
See [`ci/verify-build.sh`](https://github.com/rust-lang/libc/blob/HEAD/ci/verify-build.sh) for
6969
the platforms on which `libc` is guaranteed to build for each Rust toolchain.
7070
The test-matrix at [GitHub Actions] and [Cirrus CI] show the platforms in which
7171
`libc` tests are run.

build.rs

+6-5
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use std::{env, str};
55
// need to know all the possible cfgs that this script will set. If you need to set another cfg
66
// make sure to add it to this list as well.
77
const ALLOWED_CFGS: &'static [&'static str] = &[
8-
"emscripten_new_stat_abi",
8+
"emscripten_old_stat_abi",
99
"espidf_time32",
1010
"freebsd10",
1111
"freebsd11",
@@ -44,7 +44,6 @@ fn main() {
4444
let rustc_dep_of_std = env::var("CARGO_FEATURE_RUSTC_DEP_OF_STD").is_ok();
4545
let libc_ci = env::var("LIBC_CI").is_ok();
4646
let libc_check_cfg = env::var("LIBC_CHECK_CFG").is_ok() || rustc_minor_ver >= 80;
47-
let linux_time_bits64 = env::var("RUST_LIBC_UNSTABLE_LINUX_TIME_BITS64").is_ok();
4847

4948
// The ABI of libc used by std is backward compatible with FreeBSD 12.
5049
// The ABI of libc from crates.io is backward compatible with FreeBSD 12.
@@ -76,11 +75,13 @@ fn main() {
7675
}
7776

7877
match emcc_version_code() {
79-
Some(v) if (v >= 30142) => set_cfg("emscripten_new_stat_abi"),
80-
// Non-Emscripten or version < 3.1.42.
81-
Some(_) | None => (),
78+
Some(v) if (v < 30142) => set_cfg("emscripten_old_stat_abi"),
79+
// Non-Emscripten or version >= 3.1.42.
80+
_ => (),
8281
}
8382

83+
let linux_time_bits64 = env::var("RUST_LIBC_UNSTABLE_LINUX_TIME_BITS64").is_ok();
84+
println!("cargo:rerun-if-env-changed=RUST_LIBC_UNSTABLE_LINUX_TIME_BITS64");
8485
if linux_time_bits64 {
8586
set_cfg("linux_time_bits64");
8687
}

ci/emscripten.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
set -eux
44

55
# Note: keep in sync with:
6-
# https://github.com/rust-lang/rust/blob/master/src/ci/docker/scripts/emscripten.sh
6+
# https://github.com/rust-lang/rust/blob/master/src/doc/rustc/src/platform-support/wasm32-unknown-emscripten.md#requirements
77
emsdk_version=3.1.68
88

99
git clone https://github.com/emscripten-core/emsdk.git /emsdk-portable

ci/run.sh

+13-6
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ if [ -n "${QEMU:-}" ]; then
8181
fi
8282

8383
cmd="cargo test --target $target ${LIBC_CI_ZBUILD_STD+"-Zbuild-std"}"
84+
test_flags="--skip check_style"
8485

8586
# Run tests in the `libc` crate
8687
case "$target" in
@@ -101,25 +102,31 @@ if [ "$target" = "s390x-unknown-linux-gnu" ]; then
101102
passed=0
102103
until [ $n -ge $N ]; do
103104
if [ "$passed" = "0" ]; then
104-
if $cmd --no-default-features; then
105+
# shellcheck disable=SC2086
106+
if $cmd --no-default-features -- $test_flags; then
105107
passed=$((passed+1))
106108
continue
107109
fi
108110
elif [ "$passed" = "1" ]; then
109-
if $cmd; then
111+
# shellcheck disable=SC2086
112+
if $cmd -- $test_flags; then
110113
passed=$((passed+1))
111114
continue
112115
fi
113116
elif [ "$passed" = "2" ]; then
114-
if $cmd --features extra_traits; then
117+
# shellcheck disable=SC2086
118+
if $cmd --features extra_traits -- $test_flags; then
115119
break
116120
fi
117121
fi
118122
n=$((n+1))
119123
sleep 1
120124
done
121125
else
122-
$cmd --no-default-features
123-
$cmd
124-
$cmd --features extra_traits
126+
# shellcheck disable=SC2086
127+
$cmd --no-default-features -- $test_flags
128+
# shellcheck disable=SC2086
129+
$cmd -- $test_flags
130+
# shellcheck disable=SC2086
131+
$cmd --features extra_traits -- $test_flags
125132
fi

ci/runtest-android.rs

+11-9
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
use std::env;
2-
use std::process::Command;
32
use std::path::{Path, PathBuf};
3+
use std::process::Command;
44

55
fn main() {
66
let args = env::args_os()
77
.skip(1)
8-
.filter(|arg| arg != "--quiet")
8+
.filter(|arg| arg != "--quiet" && arg != "--skip" && arg != "check_style")
99
.collect::<Vec<_>>();
1010
assert_eq!(args.len(), 1);
1111
let test = PathBuf::from(&args[0]);
@@ -36,14 +36,16 @@ fn main() {
3636
let stdout = String::from_utf8_lossy(&output.stdout);
3737
let stderr = String::from_utf8_lossy(&output.stderr);
3838

39-
println!("status: {}\nstdout ---\n{}\nstderr ---\n{}",
40-
output.status,
41-
stdout,
42-
stderr);
39+
println!(
40+
"status: {}\nstdout ---\n{}\nstderr ---\n{}",
41+
output.status, stdout, stderr
42+
);
4343

44-
if !stderr.lines().any(|l| (l.starts_with("PASSED ") && l.contains(" tests")) || l.starts_with("test result: ok"))
45-
&& !stdout.lines().any(|l| (l.starts_with("PASSED ") && l.contains(" tests")) || l.starts_with("test result: ok"))
46-
{
44+
if !stderr.lines().any(|l| {
45+
(l.starts_with("PASSED ") && l.contains(" tests")) || l.starts_with("test result: ok")
46+
}) && !stdout.lines().any(|l| {
47+
(l.starts_with("PASSED ") && l.contains(" tests")) || l.starts_with("test result: ok")
48+
}) {
4749
panic!("failed to find successful test run");
4850
};
4951
}

ci/style.rs

-213
This file was deleted.

0 commit comments

Comments
 (0)