Skip to content

Commit a957d16

Browse files
committed
Disable the libc::personality doc test on QEMU
It's failing there with EPERM. It's probably seccomp's fault
1 parent 646fe75 commit a957d16

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

.github/actions/test/action.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,18 @@ inputs:
1919
required: false
2020
default: -D warnings -A unknown-lints
2121

22+
RUSTDOCFLAGS:
23+
required: false
24+
default: -D warnings
25+
2226
runs:
2327
using: "composite"
2428
steps:
2529
- name: set up Rust env
2630
shell: bash
2731
run: |
2832
echo "RUSTFLAGS=${{ inputs.RUSTFLAGS }}" >> $GITHUB_ENV
33+
echo "RUSTDOCFLAGS=${{ inputs.RUSTDOCFLAGS }}" >> $GITHUB_ENV
2934
3035
- name: test
3136
shell: bash

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ jobs:
127127
SUDO: ""
128128
TOOL: cross
129129
RUSTFLAGS: --cfg qemu -D warnings
130+
RUSTDOCFLAGS: --cfg qemu
130131

131132
- name: before_cache_script
132133
run: rm -rf $CARGO_HOME/registry/index

src/sys/personality.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ pub fn get() -> Result<Persona> {
7878
///
7979
/// Example:
8080
///
81-
// Disable test on aarch64 until we know why it fails.
81+
// Disable test on aarch64 and with QEMU. seccomp interference is suspected.
8282
// https://github.com/nix-rust/nix/issues/2060
83-
#[cfg_attr(target_arch = "aarch64", doc = " ```no_run")]
84-
#[cfg_attr(not(target_arch = "aarch64"), doc = " ```")]
83+
#[cfg_attr(any(qemu, target_arch = "aarch64"), doc = " ```no_run")]
84+
#[cfg_attr(not(any(qemu, target_arch = "aarch64")), doc = " ```")]
8585
/// # use nix::sys::personality::{self, Persona};
8686
/// let mut pers = personality::get().unwrap();
8787
/// assert!(!pers.contains(Persona::ADDR_NO_RANDOMIZE));

0 commit comments

Comments
 (0)