Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
turistu committed Dec 5, 2024
2 parents 7d32ef4 + ba41bc0 commit 21ba93f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,17 @@ require_min_kernel_version_or_skip()
skip_ "the kernel release $uname_r is not $1 or newer"
}

# Usage: require_max_kernel_version_or_skip 6.11
require_max_kernel_version_or_skip()
{
local uname_r
uname_r="$(uname -r)"

[ "$(kernel_version_code "$uname_r")" -lt \
"$(kernel_version_code "$1")" ] ||
skip_ "the kernel release $uname_r is $1 or newer"
}

# Usage: require_min_nproc 2
require_min_nproc()
{
Expand Down
5 changes: 5 additions & 0 deletions tests/legacy_syscall_info.test
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@

. "${srcdir=.}/init.sh"

# The legacy API is broken on riscv64 with kernel 6.11+
# https://github.com/strace/strace/issues/315
[ "$(uname -m)" != "riscv64" ] ||
require_max_kernel_version_or_skip 6.11

check_prog grep
$STRACE -d -enone / > /dev/null 2> "$LOG" ||:
grep -x "[^:]*strace: PTRACE_GET_SYSCALL_INFO works" "$LOG" > /dev/null ||
Expand Down

0 comments on commit 21ba93f

Please sign in to comment.