Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/check_new_changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ permissions:

jobs:
check_new_changelog:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- name: checkout
uses: actions/checkout@v4
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,7 @@ jobs:
# Use cross for QEMU-based testing
# cross needs to execute Docker, GitHub Action already has it installed
cross:
# Still use 20.04 for this CI step as test `test_prctl::test_set_vma_anon_name`
# would fail on 22.04 and 24.04 (at least for now)
# https://github.com/nix-rust/nix/issues/2418
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
needs: [rustfmt, minver, macos, x86_64_linux_native_builds, rust_stable]
strategy:
fail-fast: false
Expand Down Expand Up @@ -363,6 +360,13 @@ jobs:
- name: install src
run: rustup component add rust-src

# Cargo uses the latest version of libc(without lock file), which is, at the time of writing
# this, 0.2.172. And the hurd target is broken with 0.2.172: https://github.com/rust-lang/libc/issues/4421
# So we need to downgrade it.
- name: downgrade libc to 0.2.171 on hurd
if: ${{ matrix.target == 'i686-unknown-hurd-gnu' }}
run: cargo update -p libc --precise 0.2.171

- name: build
uses: ./.github/actions/build
with:
Expand Down
5 changes: 5 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@
#![cfg_attr(docsrs, feature(doc_cfg))]
#![deny(clippy::cast_ptr_alignment)]
#![deny(unsafe_op_in_unsafe_fn)]
// I found the change suggested by this rules could hurt code readability. I cannot
// remeber every type's default value, in such cases, it forces me to open
// the std doc to insepct the Default value, which is unnecessary with
// `.unwrap_or(value)`.
#![allow(clippy::unwrap_or_default)]

// Re-exported external crates
pub use libc;
Expand Down
5 changes: 5 additions & 0 deletions test/sys/test_prctl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,12 @@ mod test_prctl {
prctl::set_thp_disable(original).unwrap();
}

// Ignore this test under QEMU, as it started failing after updating the Linux CI
// runner image, for reasons unknown.
//
// See: https://github.com/nix-rust/nix/issues/2418
#[test]
#[cfg_attr(qemu, ignore)]
fn test_set_vma_anon_name() {
use nix::errno::Errno;
use nix::sys::mman;
Expand Down