import UBI strace-6.12-2.el10
This commit is contained in:
parent
32164be71e
commit
2e0a3a76ca
@ -0,0 +1,57 @@
|
||||
From ba41bc0da4b841d9343b7644a3d8c3bd5e3f2780 Mon Sep 17 00:00:00 2001
|
||||
From: Andrea Bolognani <abologna@redhat.com>
|
||||
Date: Wed, 4 Dec 2024 11:00:11 +0100
|
||||
Subject: [PATCH] tests: Skip legacy_syscall_info on riscv64 with kernel 6.11+
|
||||
|
||||
Kernel commit 61119394631f219e ("riscv: entry: always initialize
|
||||
regs->a0 to -ENOSYS") made the legacy API unusable for us, which
|
||||
means that the test always fails when using a recent kernel.
|
||||
|
||||
Closes: https://github.com/strace/strace/issues/315
|
||||
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
||||
---
|
||||
tests/init.sh | 11 +++++++++++
|
||||
tests/legacy_syscall_info.test | 5 +++++
|
||||
2 files changed, 16 insertions(+)
|
||||
|
||||
diff --git a/tests/init.sh b/tests/init.sh
|
||||
index 2e772940b..5aae80dd8 100644
|
||||
--- a/tests/init.sh
|
||||
+++ b/tests/init.sh
|
||||
@@ -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()
|
||||
{
|
||||
diff --git a/tests/legacy_syscall_info.test b/tests/legacy_syscall_info.test
|
||||
index 7275fcb72..4ae26dac7 100755
|
||||
--- a/tests/legacy_syscall_info.test
|
||||
+++ b/tests/legacy_syscall_info.test
|
||||
@@ -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 ||
|
||||
--
|
||||
2.49.0
|
||||
|
||||
@ -0,0 +1,65 @@
|
||||
From 189655e7a0603953393057f051ecc71cad3fa42e Mon Sep 17 00:00:00 2001
|
||||
From: Andrea Bolognani <abologna@redhat.com>
|
||||
Date: Mon, 20 Jan 2025 16:27:17 +0100
|
||||
Subject: [PATCH] tests: Reduce expected precision for relative-timestamps
|
||||
tests
|
||||
|
||||
Currently we have a very small amount of tolerance around the
|
||||
expected 1.0s sleep time, specifically 0.1s in either direction.
|
||||
|
||||
If the machine is not very fast (e.g. StarFive VisionFive 2, a
|
||||
very popular and reasonably performant riscv64 board that's now
|
||||
a couple of years old) and is heavily loaded (e.g. because other
|
||||
builds are running at the same time or the test suite has been
|
||||
executed with 'make -j check'), then the test might fail because
|
||||
of an additional delay that's as small as 0.1s.
|
||||
|
||||
Since the test is really intended to ensure that the timestamps
|
||||
are displayed using the requested precision, reporting a failure
|
||||
in this case is not very useful. Instead, we should tolerate
|
||||
delays of up to 1.0s as long as the timestamps are printed out
|
||||
using the expected format.
|
||||
|
||||
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
||||
---
|
||||
tests/strace--relative-timestamps-ms.expected | 2 +-
|
||||
tests/strace--relative-timestamps-ns.expected | 2 +-
|
||||
tests/strace--relative-timestamps-us.expected | 2 +-
|
||||
tests/strace--relative-timestamps.expected | 2 +-
|
||||
4 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/tests/strace--relative-timestamps-ms.expected b/tests/strace--relative-timestamps-ms.expected
|
||||
index 9fff29620..ffd6a24ba 100644
|
||||
--- a/tests/strace--relative-timestamps-ms.expected
|
||||
+++ b/tests/strace--relative-timestamps-ms.expected
|
||||
@@ -1,2 +1,2 @@
|
||||
[ ]{5}0\.0{3} execve\("\.\./sleep", \["\.\./sleep", "1"\], 0x[[:xdigit:]]* /\* [[:digit:]]* vars \*/\) = 0
|
||||
-[ ]{5}(1\.[01]|0\.9)[[:digit:]]{2} \+\+\+ exited with 0 \+\+\+
|
||||
+[ ]{5}[01]\.[[:digit:]]{3} \+\+\+ exited with 0 \+\+\+
|
||||
diff --git a/tests/strace--relative-timestamps-ns.expected b/tests/strace--relative-timestamps-ns.expected
|
||||
index d72c47791..e882d6953 100644
|
||||
--- a/tests/strace--relative-timestamps-ns.expected
|
||||
+++ b/tests/strace--relative-timestamps-ns.expected
|
||||
@@ -1,2 +1,2 @@
|
||||
[ ]{5}0\.0{9} execve\("\.\./sleep", \["\.\./sleep", "1"\], 0x[[:xdigit:]]* /\* [[:digit:]]* vars \*/\) = 0
|
||||
-[ ]{5}(1\.[01]|0\.9)[[:digit:]]{8} \+\+\+ exited with 0 \+\+\+
|
||||
+[ ]{5}[01]\.[[:digit:]]{9} \+\+\+ exited with 0 \+\+\+
|
||||
diff --git a/tests/strace--relative-timestamps-us.expected b/tests/strace--relative-timestamps-us.expected
|
||||
index 2a5b97733..a5c40d174 100644
|
||||
--- a/tests/strace--relative-timestamps-us.expected
|
||||
+++ b/tests/strace--relative-timestamps-us.expected
|
||||
@@ -1,2 +1,2 @@
|
||||
[ ]{5}0\.0{6} execve\("\.\./sleep", \["\.\./sleep", "1"\], 0x[[:xdigit:]]* /\* [[:digit:]]* vars \*/\) = 0
|
||||
-[ ]{5}(1\.[01]|0\.9)[[:digit:]]{5} \+\+\+ exited with 0 \+\+\+
|
||||
+[ ]{5}[01]\.[[:digit:]]{6} \+\+\+ exited with 0 \+\+\+
|
||||
diff --git a/tests/strace--relative-timestamps.expected b/tests/strace--relative-timestamps.expected
|
||||
index 2a5b97733..a5c40d174 100644
|
||||
--- a/tests/strace--relative-timestamps.expected
|
||||
+++ b/tests/strace--relative-timestamps.expected
|
||||
@@ -1,2 +1,2 @@
|
||||
[ ]{5}0\.0{6} execve\("\.\./sleep", \["\.\./sleep", "1"\], 0x[[:xdigit:]]* /\* [[:digit:]]* vars \*/\) = 0
|
||||
-[ ]{5}(1\.[01]|0\.9)[[:digit:]]{5} \+\+\+ exited with 0 \+\+\+
|
||||
+[ ]{5}[01]\.[[:digit:]]{6} \+\+\+ exited with 0 \+\+\+
|
||||
--
|
||||
2.49.0
|
||||
|
||||
14
strace.spec
14
strace.spec
@ -1,7 +1,7 @@
|
||||
Summary: Tracks and displays system calls associated with a running process
|
||||
Name: strace
|
||||
Version: 6.12
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
# The test suite is GPLv2+, the bundled headers are GPLv2 with Linux syscall
|
||||
# exception, all the rest is LGPLv2.1+.
|
||||
%if 0%{?fedora} >= 35 || 0%{?centos} >= 9 || 0%{?rhel} >= 9
|
||||
@ -105,6 +105,12 @@ URL: https://strace.io
|
||||
%if 0%{?fedora} >= 12 || 0%{?centos} >= 6 || 0%{?rhel} >= 6 || 0%{?suse_version} >= 1200
|
||||
Source: https://strace.io/files/%{version}/strace-%{version}.tar.xz
|
||||
|
||||
# Origin: https://github.com/strace/strace/commit/ba41bc0da4b841d9343b7644a3d8c3bd5e3f2780
|
||||
Patch0001: 0001-tests-Skip-legacy_syscall_info-on-riscv64-with-kerne.patch
|
||||
|
||||
# Origin: https://github.com/strace/strace/commit/189655e7a0603953393057f051ecc71cad3fa42e
|
||||
Patch0002: 0002-tests-Reduce-expected-precision-for-relative-timesta.patch
|
||||
|
||||
BuildRequires: xz
|
||||
%else
|
||||
Source: strace-%{version}.tar.gz
|
||||
@ -159,6 +165,9 @@ echo -n 2024 > .year
|
||||
echo -n 2023-11-21 > doc/.strace.1.in.date
|
||||
echo -n 2022-01-01 > doc/.strace-log-merge.1.in.date
|
||||
|
||||
%patch 0001 -p1
|
||||
%patch 0002 -p1
|
||||
|
||||
%build
|
||||
echo 'BEGIN OF BUILD ENVIRONMENT INFORMATION'
|
||||
uname -a |head -1
|
||||
@ -209,6 +218,9 @@ fi
|
||||
%{_mandir}/man1/*
|
||||
|
||||
%changelog
|
||||
* Mon May 12 2025 Andrea Bolognani <abologna@redhat.com> - 6.12.2
|
||||
- Fix riscv64 build (RHEL-90838)
|
||||
|
||||
* Thu Jan 02 2025 Eugene Syromiatnikov <esyr@redhat.com> - 6.12-1
|
||||
- Rebase to v6.12; drop upstream patches on top of 6.7 (RHEL-62412).
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user