Repository navigation
fix :: build and run tests/fs_fail.c on aarch64 Linux - #193
Merged
Merged
Conversation
Read registers through PTRACE_GETREGSET with NT_PRSTATUS, replace the syscall at entry through NT_ARM_SYSTEM_CALL on aarch64, resolve syscall numbers from <sys/syscall.h>, and read arguments from an entry snapshot because the return value overwrites argument 0 on aarch64. A failed gcc build now fails the test when EB_STAGED_REBUILD_REQUIRE_TESTS=1.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tests/fs_fail.cis the ptrace fault injector behind 22 tests. It read x86_64registers and x86_64 syscall numbers, so gcc failed on the
ubuntu-24.04-armrunner and every one of those tests skipped.
Change
PTRACE_GETREGSET/PTRACE_SETREGSETwithNT_PRSTATUSon both architectures, behindREG_*accessors fororig_rax/rdi/rsi/rdx/r10/rax(x86_64) andregs[8]/regs[0..3]/regs[0](aarch64).NT_ARM_SYSTEM_CALLregset; x86_64 still writesorig_rax.<sys/syscall.h>. Names that exist on onearchitecture only (
open,mkdir,unlink,rename,renameat,dup2)are
-1where absent. The generic calls (openat,mkdirat,unlinkat,renameat2,dup3,fcntl,flock,fsync,fdatasync,pwritev2) cover aarch64.return value overwrites argument 0 on aarch64.
tests/support.py: a failed gcc build offs_fail.cnow fails the testunder
EB_STAGED_REBUILD_REQUIRE_TESTS=1instead of skipping, so aregression cannot hide as a skip again.
Evidence
fs_fail.cskips22 tests that skipped on arm now run and pass. All jobs of run 45911020947
are green (docs, integration, both wheel builds, five wheel-install jobs).
The 9 remaining skips are unrelated to
fs_fail.c.x86_64 behaviour: the x86_64 suite on a separate x86_64 build host ran 243
tests, OK, with the same
fs_fail-using tests running.