diff --git a/0193-tests-do-not-rely-on-creat-syscall-failing-with-ETXT.patch b/0193-tests-do-not-rely-on-creat-syscall-failing-with-ETXT.patch new file mode 100644 index 0000000..b2324e0 --- /dev/null +++ b/0193-tests-do-not-rely-on-creat-syscall-failing-with-ETXT.patch @@ -0,0 +1,178 @@ +From 35eda7c44b7de347fe723f300ab8bcc8f520ee6f Mon Sep 17 00:00:00 2001 +From: "Dmitry V. Levin" +Date: Sat, 26 Oct 2024 08:00:00 +0000 +Subject: [PATCH] tests: do not rely on creat syscall failing with ETXTBSY + +For many years "creat" syscall used to fail with ETXTBSY when applied +to the running executable: + +$ strace -v tests/creat +execve("tests/creat", ["tests/creat"], []) = 0 +... +creat("tests/creat", 000) = -1 ETXTBSY (Text file busy) +... + +Apparently, something has changed in Fedora Rawhide: +$ strace -v tests/creat +execve("tests/creat", ["tests/creat"], []) = 0 +... +creat("tests/creat", 000) = 3 +--- SIGBUS {si_signo=SIGBUS, si_code=BUS_ADRERR, si_addr=0x401288} --- ++++ killed by SIGBUS (core dumped) +++ +$ stat -c %s tests/creat +0 + +* tests/umode_t.c (sample): Change to ".". +* tests/gen_tests.in (creat, mkdir, mkdirat): Update -a option argument. +--- + tests/gen_tests.in | 6 +++--- + tests/umode_t.c | 5 ++--- + 2 files changed, 5 insertions(+), 6 deletions(-) + +diff --git a/tests/gen_tests.in b/tests/gen_tests.in +index 89367890e992..7fda537d8d75 100644 +--- a/tests/gen_tests.in ++++ b/tests/gen_tests.in +@@ -75,7 +75,7 @@ clone_ptrace-q +clone_ptrace.test -q + clone_ptrace-qq +clone_ptrace.test -qq + close_range -a21 7>>/dev/full + copy_file_range +-creat -a20 ++creat -a16 + delete_module -a23 + dev--decode-fds-all -a30 -e trace=openat,fsync -P "/dev/full" -P "/dev/zero" -P "/dev/sda" -e decode-fds=all + dev--decode-fds-dev -a30 -e trace=openat,fsync -P "/dev/full" -P "/dev/zero" -P "/dev/sda" -e decode-fds=dev +@@ -560,8 +560,8 @@ memfd_secret-success-y -einject=memfd_secret:retval=7 -a16 -etrace=memfd_secret + migrate_pages -a33 + migrate_pages--pidns-translation test_pidns -a33 -e trace=migrate_pages + mincore -a22 +-mkdir -a20 +-mkdirat -a28 ++mkdir -a16 ++mkdirat -a22 + mknod -a18 + mknodat -a35 + mlock -a20 -e trace=mlock,munlock +diff --git a/tests/umode_t.c b/tests/umode_t.c +index 7363883d7c56..0e4c0111d66d 100644 +--- a/tests/umode_t.c ++++ b/tests/umode_t.c +@@ -19,7 +19,7 @@ + # define TEST_SYSCALL_PREFIX_STR "" + #endif + +-static const char *sample; ++static const char sample[] = "."; + + static void + test_syscall(unsigned short mode) +@@ -39,9 +39,8 @@ test_syscall(unsigned short mode) + } + + int +-main(int ac, char **av) ++main(void) + { +- sample = av[0]; + test_syscall(0); + test_syscall(0xffff); + test_syscall(06); +diff --git a/tests-m32/gen_tests.in b/tests-m32/gen_tests.in +index 89367890e992..7fda537d8d75 100644 +--- a/tests-m32/gen_tests.in ++++ b/tests-m32/gen_tests.in +@@ -75,7 +75,7 @@ clone_ptrace-q +clone_ptrace.test -q + clone_ptrace-qq +clone_ptrace.test -qq + close_range -a21 7>>/dev/full + copy_file_range +-creat -a20 ++creat -a16 + delete_module -a23 + dev--decode-fds-all -a30 -e trace=openat,fsync -P "/dev/full" -P "/dev/zero" -P "/dev/sda" -e decode-fds=all + dev--decode-fds-dev -a30 -e trace=openat,fsync -P "/dev/full" -P "/dev/zero" -P "/dev/sda" -e decode-fds=dev +@@ -560,8 +560,8 @@ memfd_secret-success-y -einject=memfd_secret:retval=7 -a16 -etrace=memfd_secret + migrate_pages -a33 + migrate_pages--pidns-translation test_pidns -a33 -e trace=migrate_pages + mincore -a22 +-mkdir -a20 +-mkdirat -a28 ++mkdir -a16 ++mkdirat -a22 + mknod -a18 + mknodat -a35 + mlock -a20 -e trace=mlock,munlock +diff --git a/tests-m32/umode_t.c b/tests-m32/umode_t.c +index 7363883d7c56..0e4c0111d66d 100644 +--- a/tests-m32/umode_t.c ++++ b/tests-m32/umode_t.c +@@ -19,7 +19,7 @@ + # define TEST_SYSCALL_PREFIX_STR "" + #endif + +-static const char *sample; ++static const char sample[] = "."; + + static void + test_syscall(unsigned short mode) +@@ -39,9 +39,8 @@ test_syscall(unsigned short mode) + } + + int +-main(int ac, char **av) ++main(void) + { +- sample = av[0]; + test_syscall(0); + test_syscall(0xffff); + test_syscall(06); +diff --git a/tests-mx32/gen_tests.in b/tests-mx32/gen_tests.in +index 89367890e992..7fda537d8d75 100644 +--- a/tests-mx32/gen_tests.in ++++ b/tests-mx32/gen_tests.in +@@ -75,7 +75,7 @@ clone_ptrace-q +clone_ptrace.test -q + clone_ptrace-qq +clone_ptrace.test -qq + close_range -a21 7>>/dev/full + copy_file_range +-creat -a20 ++creat -a16 + delete_module -a23 + dev--decode-fds-all -a30 -e trace=openat,fsync -P "/dev/full" -P "/dev/zero" -P "/dev/sda" -e decode-fds=all + dev--decode-fds-dev -a30 -e trace=openat,fsync -P "/dev/full" -P "/dev/zero" -P "/dev/sda" -e decode-fds=dev +@@ -560,8 +560,8 @@ memfd_secret-success-y -einject=memfd_secret:retval=7 -a16 -etrace=memfd_secret + migrate_pages -a33 + migrate_pages--pidns-translation test_pidns -a33 -e trace=migrate_pages + mincore -a22 +-mkdir -a20 +-mkdirat -a28 ++mkdir -a16 ++mkdirat -a22 + mknod -a18 + mknodat -a35 + mlock -a20 -e trace=mlock,munlock +diff --git a/tests-mx32/umode_t.c b/tests-mx32/umode_t.c +index 7363883d7c56..0e4c0111d66d 100644 +--- a/tests-mx32/umode_t.c ++++ b/tests-mx32/umode_t.c +@@ -19,7 +19,7 @@ + # define TEST_SYSCALL_PREFIX_STR "" + #endif + +-static const char *sample; ++static const char sample[] = "."; + + static void + test_syscall(unsigned short mode) +@@ -39,9 +39,8 @@ test_syscall(unsigned short mode) + } + + int +-main(int ac, char **av) ++main(void) + { +- sample = av[0]; + test_syscall(0); + test_syscall(0xffff); + test_syscall(06); +-- +2.28.0 + diff --git a/strace.spec b/strace.spec index cb81c9d..16ce213 100644 --- a/strace.spec +++ b/strace.spec @@ -1,7 +1,7 @@ Summary: Tracks and displays system calls associated with a running process Name: strace Version: 6.7 -Release: 5%{?dist} +Release: 6%{?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 @@ -153,6 +153,14 @@ Patch188: 0188-linux-s390-get_scno.c-use-NT_S390_SYSTEM_CALL-if-gpr.patch Patch189: 0189-tests-move-k_setsockopt-definition-into-a-separate-f.patch # "tests/sockopt-timestamp.c: use k_getsockopt and k_setsockopt" Patch190: 0190-tests-sockopt-timestamp.c-use-k_getsockopt-and-k_set.patch +### Fix for prctl-sve.gen test failure on aarch64 +## v5.19~14 "prctl: improve PR_SVE_[SG]ET_VL decoding" +#Patch191: 0191-prctl-improve-PR_SVE_-SG-ET_VL-decoding.patch +## v6.3~32 "tests/prctl-sve: fix prctl(PR_SVE_GET_VL) return expected value printing" +#Patch192: 0192-tests-prctl-sve-fix-prctl-PR_SVE_GET_VL-return-expec.patch +## A fix for OSCI creat.gen.test failures +# v6.11-20-g35eda7c44b7d "tests: do not rely on creat syscall failing with ETXTBSY" +Patch193: 0193-tests-do-not-rely-on-creat-syscall-failing-with-ETXT.patch # Fallback definitions for make_build/make_install macros %{?!__make: %global __make %_bindir/make} @@ -182,6 +190,9 @@ received by a process. %patch 188 -p1 %patch 189 -p1 %patch 190 -p1 +#%patch 191 -p1 +#%patch 192 -p1 +%patch 193 -p1 chmod a+x tests/*.test @@ -240,6 +251,10 @@ fi %{_mandir}/man1/* %changelog +* Tue Nov 05 2024 Eugene Syromiatnikov - 6.7-6 +- Avoid failures of creat.gen test on kernels that include commit + v6.11-rc1~242^2~19 ("fs: don't block i_writecount during exec"). + * Tue Oct 29 2024 Eugene Syromiatnikov - 6.7-5 - Fix incorrect syscall name reporting in restart_syscall() on attach when PTRACE_GET_SYSCALL_INFO is in use (RHEL-65108).