diff options
Diffstat (limited to 'meta/recipes-devtools/strace/strace')
15 files changed, 256 insertions, 368 deletions
diff --git a/meta/recipes-devtools/strace/strace/0001-Fix-build-when-using-non-glibc-libc-implementation-o.patch b/meta/recipes-devtools/strace/strace/0001-Fix-build-when-using-non-glibc-libc-implementation-o.patch deleted file mode 100644 index daafceb37b..0000000000 --- a/meta/recipes-devtools/strace/strace/0001-Fix-build-when-using-non-glibc-libc-implementation-o.patch +++ /dev/null @@ -1,34 +0,0 @@ -From af1fdce78bff4343f3c84ea118abdc3c739fc646 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sat, 30 Apr 2016 16:23:56 +0000 -Subject: [PATCH] Fix build when using non-glibc libc implementation on ppc - -glibc includes the kernel header into its own header for macros -musl does not - -Upstream-Status: Pending -Signed-off-by: Khem Raj <raj.khem@gmail.com> - ---- - ptrace.h | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -diff --git a/ptrace.h b/ptrace.h -index 89d4b95..b3f45bb 100644 ---- a/ptrace.h -+++ b/ptrace.h -@@ -30,7 +30,13 @@ - # define ptrace_peeksiginfo_args XXX_ptrace_peeksiginfo_args - #endif - --#include <linux/ptrace.h> -+#if defined(POWERPC) && !defined(__GLIBC__) -+#define pt_regs uapi_pt_regs -+#endif -+# include <linux/ptrace.h> -+#if defined(POWERPC) && !defined(__GLIBC__) -+# undef pt_regs -+#endif - - #ifdef HAVE_STRUCT_IA64_FPREG - # undef ia64_fpreg diff --git a/meta/recipes-devtools/strace/strace/0001-caps-abbrev.awk-fix-gawk-s-path.patch b/meta/recipes-devtools/strace/strace/0001-caps-abbrev.awk-fix-gawk-s-path.patch deleted file mode 100644 index 52d2cdcdc5..0000000000 --- a/meta/recipes-devtools/strace/strace/0001-caps-abbrev.awk-fix-gawk-s-path.patch +++ /dev/null @@ -1,47 +0,0 @@ -From d225aaa8841f47ba8aa7b353b0ac3028d5913efe Mon Sep 17 00:00:00 2001 -From: Robert Yang <liezhi.yang@windriver.com> -Date: Thu, 9 Feb 2017 01:27:49 -0800 -Subject: [PATCH] caps-abbrev.awk: fix gawk's path - -It should be /usr/bin/gawk as other scripts use in this package. - -Upstream-Status: Pending - -Signed-off-by: Robert Yang <liezhi.yang@windriver.com> - ---- - tests-m32/caps-abbrev.awk | 2 +- - tests-mx32/caps-abbrev.awk | 2 +- - tests/caps-abbrev.awk | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/tests-m32/caps-abbrev.awk b/tests-m32/caps-abbrev.awk -index c00023b..a56cd56 100644 ---- a/tests-m32/caps-abbrev.awk -+++ b/tests-m32/caps-abbrev.awk -@@ -1,4 +1,4 @@ --#!/bin/gawk -+#!/usr/bin/gawk - # - # This file is part of caps strace test. - # -diff --git a/tests-mx32/caps-abbrev.awk b/tests-mx32/caps-abbrev.awk -index c00023b..a56cd56 100644 ---- a/tests-mx32/caps-abbrev.awk -+++ b/tests-mx32/caps-abbrev.awk -@@ -1,4 +1,4 @@ --#!/bin/gawk -+#!/usr/bin/gawk - # - # This file is part of caps strace test. - # -diff --git a/tests/caps-abbrev.awk b/tests/caps-abbrev.awk -index c00023b..a56cd56 100644 ---- a/tests/caps-abbrev.awk -+++ b/tests/caps-abbrev.awk -@@ -1,4 +1,4 @@ --#!/bin/gawk -+#!/usr/bin/gawk - # - # This file is part of caps strace test. - # diff --git a/meta/recipes-devtools/strace/strace/0001-configure-Use-autoconf-macro-to-detect-largefile-sup.patch b/meta/recipes-devtools/strace/strace/0001-configure-Use-autoconf-macro-to-detect-largefile-sup.patch new file mode 100644 index 0000000000..76ca7a76a8 --- /dev/null +++ b/meta/recipes-devtools/strace/strace/0001-configure-Use-autoconf-macro-to-detect-largefile-sup.patch @@ -0,0 +1,27 @@ +From 470399f3636c412b74f9daf6ae430b13c3126f02 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 15 Dec 2022 15:54:27 -0800 +Subject: [PATCH] configure: Use autoconf macro to detect largefile support + +Adds --enable-largefile/--disable-largefile configure knobs +where default is to detect the support + +Upstream-Status: Submitted [https://github.com/strace/strace/pull/230] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + configure.ac | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 4797b42dd..7d57fb254 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -43,6 +43,8 @@ AC_PROG_INSTALL + AC_PROG_RANLIB + AC_PROG_LN_S + ++AC_SYS_LARGEFILE ++ + AC_USE_SYSTEM_EXTENSIONS + AX_CODE_COVERAGE + diff --git a/meta/recipes-devtools/strace/strace/0001-mips-o32-fix-build.patch b/meta/recipes-devtools/strace/strace/0001-mips-o32-fix-build.patch deleted file mode 100644 index a5dccfb08c..0000000000 --- a/meta/recipes-devtools/strace/strace/0001-mips-o32-fix-build.patch +++ /dev/null @@ -1,98 +0,0 @@ -From 2c8b6de913973274e877639658e9e7273a012adb Mon Sep 17 00:00:00 2001 -From: "Dmitry V. Levin" <ldv@altlinux.org> -Date: Tue, 8 Jan 2019 19:23:44 +0000 -Subject: [PATCH] mips o32: fix build - -Upstream-Status: Backport - -Commit 917c2ccf3a67 "Refactor stack pointers" moved mips_REG_* macros -from linux/mips/arch_regs.h to linux/mips/arch_regs.c because these -macros are no longer used outside syscall.c or files included by -syscall.c, but this caused a build regression on mips o32 because -decode_syscall_subcall() uses mips_REG_SP prior to its definition. - -* syscall.c (decode_syscall_subcall): Move ... -* linux/mips/get_syscall_args.c: ... here. - -Reported-by: Baruch Siach <baruch@tkos.co.il> -Fixes: v4.26~61 "Refactor stack pointers" ---- - linux/mips/get_syscall_args.c | 26 ++++++++++++++++++++++++++ - syscall.c | 27 ++------------------------- - 2 files changed, 29 insertions(+), 25 deletions(-) - -diff --git a/linux/mips/get_syscall_args.c b/linux/mips/get_syscall_args.c -index 387aa852..e2889f98 100644 ---- a/linux/mips/get_syscall_args.c -+++ b/linux/mips/get_syscall_args.c -@@ -37,3 +37,29 @@ arch_get_syscall_args(struct tcb *tcp) - #endif - return 1; - } -+ -+#ifdef SYS_syscall_subcall -+static void -+decode_syscall_subcall(struct tcb *tcp) -+{ -+ if (!scno_is_valid(tcp->u_arg[0])) -+ return; -+ tcp->scno = tcp->u_arg[0]; -+ tcp->qual_flg = qual_flags(tcp->scno); -+ tcp->s_ent = &sysent[tcp->scno]; -+ memmove(&tcp->u_arg[0], &tcp->u_arg[1], -+ sizeof(tcp->u_arg) - sizeof(tcp->u_arg[0])); -+ /* -+ * Fetching the last arg of 7-arg syscalls (fadvise64_64 -+ * and sync_file_range) requires additional code, -+ * see linux/mips/get_syscall_args.c -+ */ -+ if (tcp->s_ent->nargs == MAX_ARGS) { -+ if (umoven(tcp, -+ mips_REG_SP + MAX_ARGS * sizeof(tcp->u_arg[0]), -+ sizeof(tcp->u_arg[0]), -+ &tcp->u_arg[MAX_ARGS - 1]) < 0) -+ tcp->u_arg[MAX_ARGS - 1] = 0; -+ } -+} -+#endif /* SYS_syscall_subcall */ -diff --git a/syscall.c b/syscall.c -index d78f51dd..51fcc721 100644 ---- a/syscall.c -+++ b/syscall.c -@@ -349,31 +349,8 @@ decode_ipc_subcall(struct tcb *tcp) - #endif /* SYS_ipc_subcall */ - - #ifdef SYS_syscall_subcall --static void --decode_syscall_subcall(struct tcb *tcp) --{ -- if (!scno_is_valid(tcp->u_arg[0])) -- return; -- tcp->scno = tcp->u_arg[0]; -- tcp->qual_flg = qual_flags(tcp->scno); -- tcp->s_ent = &sysent[tcp->scno]; -- memmove(&tcp->u_arg[0], &tcp->u_arg[1], -- sizeof(tcp->u_arg) - sizeof(tcp->u_arg[0])); --# ifdef LINUX_MIPSO32 -- /* -- * Fetching the last arg of 7-arg syscalls (fadvise64_64 -- * and sync_file_range) requires additional code, -- * see linux/mips/get_syscall_args.c -- */ -- if (tcp->s_ent->nargs == MAX_ARGS) { -- if (umoven(tcp, -- mips_REG_SP + MAX_ARGS * sizeof(tcp->u_arg[0]), -- sizeof(tcp->u_arg[0]), -- &tcp->u_arg[MAX_ARGS - 1]) < 0) -- tcp->u_arg[MAX_ARGS - 1] = 0; -- } --# endif /* LINUX_MIPSO32 */ --} -+/* The implementation is architecture specific. */ -+static void decode_syscall_subcall(struct tcb *); - #endif /* SYS_syscall_subcall */ - - static void --- -2.17.0 - diff --git a/meta/recipes-devtools/strace/strace/0001-strace-fix-reproducibilty-issues.patch b/meta/recipes-devtools/strace/strace/0001-strace-fix-reproducibilty-issues.patch new file mode 100644 index 0000000000..c4c176e6bc --- /dev/null +++ b/meta/recipes-devtools/strace/strace/0001-strace-fix-reproducibilty-issues.patch @@ -0,0 +1,39 @@ +From 6309792c49ca900cec6a7f1dc5b51bf75b629e11 Mon Sep 17 00:00:00 2001 +From: Jeremy Puhlman <jpuhlman@mvista.com> +Date: Wed, 11 Mar 2020 19:56:55 +0000 +Subject: [PATCH] strace: fix reproducibilty issues + +The full path to the gen_tests.sh script is encoded in the tests + +Upstream-Status: Pending + +Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com> +--- + tests/gen_tests.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tests/gen_tests.sh b/tests/gen_tests.sh +index 5e1e7c9..1e65eac 100755 +--- a/tests/gen_tests.sh ++++ b/tests/gen_tests.sh +@@ -46,7 +46,7 @@ while read -r name arg0 args; do { + + hdr="\ + #!/bin/sh -efu +-# Generated by $0 from $input ($name $arg0 $args); do not edit." ++# Generated by $(basename $0) from $input ($name $arg0 $args); do not edit." + + case "$arg0" in + +*) +@@ -80,7 +80,7 @@ while read -r name arg0 args; do { + + if [ -n "$names" ]; then + { +- printf '# Generated by %s from %s; do not edit.\n' "$0" "$input" ++ printf '# Generated by %s from %s; do not edit.\n' "$(basename $0)" "$input" + printf 'GEN_TESTS =' + printf ' %s.gen.test' $names + echo +-- +2.24.1 + diff --git a/meta/recipes-devtools/strace/strace/0001-tests-sigaction-Check-for-mips-and-alpha-before-usin.patch b/meta/recipes-devtools/strace/strace/0001-tests-sigaction-Check-for-mips-and-alpha-before-usin.patch deleted file mode 100644 index becee79d1a..0000000000 --- a/meta/recipes-devtools/strace/strace/0001-tests-sigaction-Check-for-mips-and-alpha-before-usin.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 879ae71c472ce522f1b3514d2abf6ad49b4acc07 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Mon, 18 Sep 2017 22:51:32 -0700 -Subject: [PATCH] tests/sigaction: Check for mips and alpha before using - sa_restorer - -local structure does not define restorer member for mips and alpha -in definition, we need to match that assumption here where they are -being set - -Fixes -| ../../strace-4.18/tests/sigaction.c:177:36: error: 'struct_set_sa {aka struct set_sa}' has no member named 'restorer' -| # define SA_RESTORER_ARGS , new_act->restorer - -Upstream-Status: Pending -Signed-off-by: Khem Raj <raj.khem@gmail.com> - ---- - tests/sigaction.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tests/sigaction.c b/tests/sigaction.c -index 95be197..54819f9 100644 ---- a/tests/sigaction.c -+++ b/tests/sigaction.c -@@ -156,7 +156,7 @@ main(void) - sigdelset(mask.libc, SIGHUP); - - memcpy(new_act->mask, mask.old, sizeof(mask.old)); --#ifdef SA_RESTORER -+#if defined(SA_RESTORER) && !defined(MIPS) && !defined(ALPHA) - new_act->flags = SA_RESTORER; - new_act->restorer = (unsigned long) 0xdeadfacecafef00dULL; - # define SA_RESTORER_FMT ", sa_flags=SA_RESTORER, sa_restorer=%#lx" diff --git a/meta/recipes-devtools/strace/strace/0002-tests-Replace-off64_t-with-off_t.patch b/meta/recipes-devtools/strace/strace/0002-tests-Replace-off64_t-with-off_t.patch new file mode 100644 index 0000000000..0cabdfe99f --- /dev/null +++ b/meta/recipes-devtools/strace/strace/0002-tests-Replace-off64_t-with-off_t.patch @@ -0,0 +1,52 @@ +From 579b2ebe52d4b97f954e6188df2d07e137820075 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 15 Dec 2022 15:56:13 -0800 +Subject: [PATCH] tests: Replace off64_t with off_t + +when _FILE_OFFSET_BITS=64 then off_t is 64bit wide, this also fixes +build on musl where off64_t is not available without _LARGEFILE64_SOURCE + +Upstream-Status: Submitted [https://github.com/strace/strace/pull/230] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + tests/readahead.c | 2 +- + tests/sync_file_range2.c | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +--- a/tests/readahead.c ++++ b/tests/readahead.c +@@ -42,7 +42,7 @@ static const int fds[] = { + 0x7fffffff, + }; + +-static const off64_t offsets[] = { ++static const off_t offsets[] = { + -0x8000000000000000LL, + -0x5060708090a0b0c0LL, + -1LL, +--- a/tests/sync_file_range2.c ++++ b/tests/sync_file_range2.c +@@ -20,8 +20,8 @@ int + main(void) + { + const int fd = -1; +- const off64_t offset = 0xdeadbeefbadc0ded; +- const off64_t nbytes = 0xfacefeedcafef00d; ++ const off_t offset = 0xdeadbeefbadc0ded; ++ const off_t nbytes = 0xfacefeedcafef00d; + const unsigned int flags = -1; + + int rc = sync_file_range(fd, offset, nbytes, flags); +--- a/tests/sync_file_range.c ++++ b/tests/sync_file_range.c +@@ -20,8 +20,8 @@ int + main(void) + { + const int fd = -1; +- const off64_t offset = 0xdeadbeefbadc0dedULL; +- const off64_t nbytes = 0xfacefeedcafef00dULL; ++ const off_t offset = 0xdeadbeefbadc0dedULL; ++ const off_t nbytes = 0xfacefeedcafef00dULL; + const unsigned int flags = -1; + + int rc = sync_file_range(fd, offset, nbytes, flags); diff --git a/meta/recipes-devtools/strace/strace/Makefile-ptest.patch b/meta/recipes-devtools/strace/strace/Makefile-ptest.patch index 08fa5c53b8..9af7737662 100644 --- a/meta/recipes-devtools/strace/strace/Makefile-ptest.patch +++ b/meta/recipes-devtools/strace/strace/Makefile-ptest.patch @@ -1,4 +1,4 @@ -From ef5040b4f15006a22ac63a3bacfceac36ffc2045 Mon Sep 17 00:00:00 2001 +From 1f50e0a09d828be8f5b1f28db9af0b12492a1553 Mon Sep 17 00:00:00 2001 From: Gabriel Barbu <gabriel.barbu@enea.com> Date: Thu, 25 Jul 2013 15:28:33 +0200 Subject: [PATCH] strace: Add ptest @@ -10,31 +10,32 @@ Signed-off-by: Chong Lu <Chong.Lu@windriver.com> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> --- - tests/Makefile.am | 19 +++++++++++++++++++ - 1 file changed, 19 insertions(+) + tests/Makefile.am | 20 ++++++++++++++++++++ + 1 file changed, 20 insertions(+) diff --git a/tests/Makefile.am b/tests/Makefile.am -index 825c989..4623c48 100644 +index 55566ee..a7ae6f9 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am -@@ -14,6 +14,7 @@ SIZEOF_LONG = @SIZEOF_LONG@ +@@ -16,6 +16,7 @@ SIZEOF_LONG = @SIZEOF_LONG@ MPERS_NAME = MPERS_CC_FLAGS = ARCH_MFLAGS = +TEST_SUITE_LOG = test-suite.log AM_CFLAGS = $(WARN_CFLAGS) - AM_CPPFLAGS = $(ARCH_MFLAGS) \ - -I$(builddir) \ -@@ -477,3 +478,21 @@ BUILT_SOURCES = ksysent.h + bundled_CPPFLAGS = + if USE_BUNDLED_HEADERS +@@ -703,3 +704,22 @@ BUILT_SOURCES = ksysent.h CLEANFILES = ksysent.h - include ../scno.am + include ../src/scno.am + +buildtest-TESTS: $(check_PROGRAMS) $(TESTS) + +install-ptest: -+ install $(BUILDDIR)/strace $(DESTDIR) -+ install $(srcdir)/../strace-log-merge $(DESTDIR) ++ install -d $(DESTDIR)/src ++ install $(BUILDDIR)/src/strace $(DESTDIR)/src ++ install $(srcdir)/../src/strace-log-merge $(DESTDIR)/src + install -d $(DESTDIR)/$(TESTDIR) + cp $(BUILDDIR)/$(TESTDIR)/Makefile $(DESTDIR)/$(TESTDIR) + sed -i -e 's/^Makefile:/_Makefile:/' $(DESTDIR)/$(TESTDIR)/Makefile @@ -44,6 +45,6 @@ index 825c989..4623c48 100644 + done + for file in $(EXTRA_DIST); do \ + install $(srcdir)/$$file $(DESTDIR)/$(TESTDIR); \ -+ sed -i -e 's/$${srcdir=.}/./g' $(DESTDIR)/$(TESTDIR)/$$file; \ ++ #sed -i -e 's/$${srcdir=.}/./g' $(DESTDIR)/$(TESTDIR)/$$file; \ + done + for i in net scm_rights-fd rt_sigaction; do sed -i -e 's/$$srcdir/./g' $(DESTDIR)/$(TESTDIR)/$$i.test; done diff --git a/meta/recipes-devtools/strace/strace/disable-git-version-gen.patch b/meta/recipes-devtools/strace/strace/disable-git-version-gen.patch deleted file mode 100644 index d6354bf4b6..0000000000 --- a/meta/recipes-devtools/strace/strace/disable-git-version-gen.patch +++ /dev/null @@ -1,37 +0,0 @@ -From ed30a4fc4dc264ce5f5881462e03ae13c921bfed Mon Sep 17 00:00:00 2001 -From: Andre McCurdy <armccurdy@gmail.com> -Date: Mon, 18 Jan 2016 13:33:50 -0800 -Subject: [PATCH] strace: remove need for scripts - -git-version-gen copyright-year-gen file-date-gen are not included in -tarball releases, so we need to avoid attempts to call them. - -Upstream-Status: Inappropriate [configuration] - -Signed-off-by: Andre McCurdy <armccurdy@gmail.com> -Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> - ---- - configure.ac | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 8045ebd..4319709 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -12,12 +12,12 @@ - - AC_PREREQ(2.57) - AC_INIT([strace], -- m4_esyscmd([./git-version-gen .tarball-version]), -+ m4_esyscmd_s([cat .tarball-version]), - [strace-devel@lists.strace.io], - [strace], - [https://strace.io]) --m4_define([copyright_year], m4_esyscmd([./copyright-year-gen .year])) --m4_define([manpage_date], m4_esyscmd([./file-date-gen strace.1.in])) -+m4_define([copyright_year], m4_esyscmd_s([cat .year])) -+m4_define([manpage_date], m4_esyscmd_s([cat .strace.1.in.date])) - AC_COPYRIGHT([Copyright (c) 1999-]copyright_year[ The strace developers.]) - AC_CONFIG_SRCDIR([strace.c]) - AC_CONFIG_AUX_DIR([.]) diff --git a/meta/recipes-devtools/strace/strace/mips-SIGEMT.patch b/meta/recipes-devtools/strace/strace/mips-SIGEMT.patch deleted file mode 100644 index 0d3192b345..0000000000 --- a/meta/recipes-devtools/strace/strace/mips-SIGEMT.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 20c184a7ab3fb7be67fb7626c411e756ea61d2f5 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sun, 7 Aug 2016 23:47:57 -0700 -Subject: [PATCH] strace: Fix build with mips/mips64 on musl - -SIGEMT is not defined everywhere e.g musl does -not define it. Therefore check it being defined -before using it. - -Fixes errors e.g. -../../strace-4.13/tests/signal2name.c:45:7: error: 'SIGEMT' undeclared (first use in this function) - -Signed-off-by: Khem Raj <raj.khem@gmail.com> -Upstream-Status: Pending - ---- - tests/signal2name.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/tests/signal2name.c b/tests/signal2name.c -index 1d8e7c5..6722aa1 100644 ---- a/tests/signal2name.c -+++ b/tests/signal2name.c -@@ -49,7 +49,9 @@ signal2name(int sig) - CASE(SIGEMT); - CASE(SIGLOST); - #elif defined MIPS -+#ifdef SIGEMT - CASE(SIGEMT); -+#endif - CASE(SIGIOT); - CASE(SIGPWR); - #else diff --git a/meta/recipes-devtools/strace/strace/more-robust-test-for-m32-mx32-compile-support.patch b/meta/recipes-devtools/strace/strace/more-robust-test-for-m32-mx32-compile-support.patch deleted file mode 100644 index a9bd900da8..0000000000 --- a/meta/recipes-devtools/strace/strace/more-robust-test-for-m32-mx32-compile-support.patch +++ /dev/null @@ -1,45 +0,0 @@ -From cc97307e8e39a81999c6a365d057487a02e6128e Mon Sep 17 00:00:00 2001 -From: Andre McCurdy <armccurdy@gmail.com> -Date: Mon, 18 Jan 2016 11:00:00 -0800 -Subject: [PATCH] mpers.m4: more robust test for -m32/-mx32 compile support - -When using the default OE toolchain for x86-64, the basic checks for --m32 and -mx32 compile support in mpers.m4 pass but later attempts to -actually use the toolchain with -m32 fail, e.g. - - | In file included from /home/andre/build/tmp/sysroots/qemux86-64/usr/include/sys/syscall.h:31:0, - | from ../strace-4.11/defs.h:55, - | from mpers-m32/kernel_dirent.c:32: - | /home/andre/build/tmp/sysroots/qemux86-64/usr/include/bits/syscall.h:41:29: fatal error: bits/syscall-32.h: No such file or directory - -Make the mpers.m4 tests more robust so that configure correctly -detects the limitations of the OE toolchain. - -Upstream-Status: Pending - -Signed-off-by: Andre McCurdy <armccurdy@gmail.com> - ---- - m4/mpers.m4 | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/m4/mpers.m4 b/m4/mpers.m4 -index 13725d7..d8578ea 100644 ---- a/m4/mpers.m4 -+++ b/m4/mpers.m4 -@@ -88,6 +88,7 @@ case "$arch" in - CFLAGS="$CFLAGS MPERS_CFLAGS $IFLAG" - AC_CACHE_CHECK([for mpers_name personality compile support], [st_cv_cc], - [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <stdint.h> -+ #include <sys/syscall.h> - int main(){return 0;}]])], - [st_cv_cc=yes], - [st_cv_cc=no])]) -@@ -95,6 +96,7 @@ case "$arch" in - AC_CACHE_CHECK([for mpers_name personality runtime support], - [st_cv_runtime], - [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdint.h> -+ #include <sys/syscall.h> - int main(){return 0;}]])], - [st_cv_runtime=yes], - [st_cv_runtime=no], diff --git a/meta/recipes-devtools/strace/strace/ptest-spacesave.patch b/meta/recipes-devtools/strace/strace/ptest-spacesave.patch index 3e32cc388c..4e86ccadc5 100644 --- a/meta/recipes-devtools/strace/strace/ptest-spacesave.patch +++ b/meta/recipes-devtools/strace/strace/ptest-spacesave.patch @@ -1,3 +1,8 @@ +From 3fad4821d90cd264d1b94253b9cf4fdf5d4034b8 Mon Sep 17 00:00:00 2001 +From: Richard Purdie <richard.purdie@linuxfoundation.org> +Date: Wed, 29 May 2019 00:10:32 +0100 +Subject: [PATCH] strace: Tweak ptest disk space management + If the test is successful, remove the log and exp files. This stops strace using around 600MB of disk space and running our ptest images out of space. @@ -5,15 +10,19 @@ RP 2019/5/29 Upstream-Status: Inappropriate [specific to OE image space issues] -Index: strace-4.26/tests/gen_tests.sh -=================================================================== ---- strace-4.26.orig/tests/gen_tests.sh -+++ strace-4.26/tests/gen_tests.sh +--- + tests/gen_tests.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/tests/gen_tests.sh b/tests/gen_tests.sh +index 3540204..5e1e7c9 100755 +--- a/tests/gen_tests.sh ++++ b/tests/gen_tests.sh @@ -62,6 +62,7 @@ while read -r name arg0 args; do { $hdr . "\${srcdir=.}/init.sh" run_strace_match_diff $arg0 $args -+ rm -rf log exp ++ rm -rf log exp out EOF ;; diff --git a/meta/recipes-devtools/strace/strace/run-ptest b/meta/recipes-devtools/strace/strace/run-ptest index 8070d83179..1224229e8f 100755 --- a/meta/recipes-devtools/strace/strace/run-ptest +++ b/meta/recipes-devtools/strace/strace/run-ptest @@ -1,2 +1,11 @@ #!/bin/sh -make -B -C tests -k test-suite.log + +set -u + +export TIMEOUT_DURATION=240 +make -j4 -B -C tests -k test-suite.log +res=$? +if [ $res -ne 0 ]; then + cat tests/test-suite.log +fi +exit $res diff --git a/meta/recipes-devtools/strace/strace/skip-load.patch b/meta/recipes-devtools/strace/strace/skip-load.patch new file mode 100644 index 0000000000..b1acfda5d8 --- /dev/null +++ b/meta/recipes-devtools/strace/strace/skip-load.patch @@ -0,0 +1,49 @@ +Skip tests which are known to be unreliable under load, typically because they +care about timing. + +Upstream-Status: Inappropriate +Signed-off-by: Ross Burton <ross.burton@arm.com> + +--- + tests/clock_nanosleep.gen.test | 1 + + tests/delay.test | 1 + + tests/strace-r.test | 1 + + 3 files changed, 3 insertions(+) + +diff --git a/tests/clock_nanosleep.gen.test b/tests/clock_nanosleep.gen.test +index 7a6025b..f0e6dbb 100755 +--- a/tests/clock_nanosleep.gen.test ++++ b/tests/clock_nanosleep.gen.test +@@ -1,4 +1,5 @@ + #!/bin/sh -efu + # Generated by ./tests/gen_tests.sh from ./tests/gen_tests.in (clock_nanosleep -e trace=clock_nanosleep,clock_gettime); do not edit. + . "${srcdir=.}/init.sh" ++skip_ "Test not reliable under load" + run_strace_match_diff -e trace=clock_nanosleep,clock_gettime +diff --git a/tests/delay.test b/tests/delay.test +index f74e27f..6172c04 100755 +--- a/tests/delay.test ++++ b/tests/delay.test +@@ -8,6 +8,7 @@ + # SPDX-License-Identifier: GPL-2.0-or-later + + . "${srcdir=.}/init.sh" ++skip_ "Test not reliable under load" + + while read -r denter dexit denter_us dexit_us; do + [ -n "$denter" ] || continue +diff --git a/tests/strace-r.test b/tests/strace-r.test +index 8299737..d89c7df 100755 +--- a/tests/strace-r.test ++++ b/tests/strace-r.test +@@ -8,6 +8,7 @@ + # SPDX-License-Identifier: GPL-2.0-or-later + + . "${srcdir=.}/init.sh" ++skip_ "Test not reliable under load" + + r_opt="${1:--r}" + +-- +2.25.1 + diff --git a/meta/recipes-devtools/strace/strace/update-gawk-paths.patch b/meta/recipes-devtools/strace/strace/update-gawk-paths.patch index 7077048c75..a16ede95c2 100644 --- a/meta/recipes-devtools/strace/strace/update-gawk-paths.patch +++ b/meta/recipes-devtools/strace/strace/update-gawk-paths.patch @@ -1,4 +1,4 @@ -From f0d7ebf48441e0b090c3e6053b8c845d0a4a3b18 Mon Sep 17 00:00:00 2001 +From 4cd26cfaec255ec87f22abe886e0be89312a9671 Mon Sep 17 00:00:00 2001 From: Andre McCurdy <armccurdy@gmail.com> Date: Mon, 18 Jan 2016 11:01:00 -0800 Subject: [PATCH] update gawk paths, /bin/gawk -> /usr/bin/gawk @@ -13,7 +13,7 @@ Upstream-Status: Inappropriate [configuration] Signed-off-by: Andre McCurdy <armccurdy@gmail.com> --- - mpers.awk | 2 +- + src/mpers.awk | 2 +- tests-m32/caps.awk | 2 +- tests-m32/match.awk | 2 +- tests-m32/rt_sigaction.awk | 2 +- @@ -25,18 +25,18 @@ Signed-off-by: Andre McCurdy <armccurdy@gmail.com> tests/rt_sigaction.awk | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) -diff --git a/mpers.awk b/mpers.awk -index 17f8f2b..d69dcd5 100644 ---- a/mpers.awk -+++ b/mpers.awk +diff --git a/src/mpers.awk b/src/mpers.awk +index 25a212f..b2ff53f 100644 +--- a/src/mpers.awk ++++ b/src/mpers.awk @@ -1,4 +1,4 @@ -#!/bin/gawk +#!/usr/bin/gawk # # Copyright (c) 2015 Elvira Khabirova <lineprinter0@gmail.com> - # Copyright (c) 2015-2016 Dmitry V. Levin <ldv@altlinux.org> + # Copyright (c) 2015-2016 Dmitry V. Levin <ldv@strace.io> diff --git a/tests-m32/caps.awk b/tests-m32/caps.awk -index 941564a..0bcc3ff 100644 +index 69500ec..e5dfd87 100644 --- a/tests-m32/caps.awk +++ b/tests-m32/caps.awk @@ -1,4 +1,4 @@ @@ -46,27 +46,27 @@ index 941564a..0bcc3ff 100644 # This file is part of caps strace test. # diff --git a/tests-m32/match.awk b/tests-m32/match.awk -index d91c518..ee5d908 100644 +index 1cde87c..df63f78 100644 --- a/tests-m32/match.awk +++ b/tests-m32/match.awk @@ -1,4 +1,4 @@ -#!/bin/gawk +#!/usr/bin/gawk # - # Copyright (c) 2014-2018 Dmitry V. Levin <ldv@altlinux.org> + # Copyright (c) 2014-2021 Dmitry V. Levin <ldv@strace.io> # All rights reserved. diff --git a/tests-m32/rt_sigaction.awk b/tests-m32/rt_sigaction.awk -index 81dd813..9cd9549 100644 +index dce78f5..573d9ea 100644 --- a/tests-m32/rt_sigaction.awk +++ b/tests-m32/rt_sigaction.awk @@ -1,4 +1,4 @@ -#!/bin/gawk +#!/usr/bin/gawk # - # Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org> + # Copyright (c) 2014-2015 Dmitry V. Levin <ldv@strace.io> # Copyright (c) 2016 Elvira Khabirova <lineprinter0@gmail.com> diff --git a/tests-mx32/caps.awk b/tests-mx32/caps.awk -index 941564a..0bcc3ff 100644 +index 69500ec..e5dfd87 100644 --- a/tests-mx32/caps.awk +++ b/tests-mx32/caps.awk @@ -1,4 +1,4 @@ @@ -76,27 +76,27 @@ index 941564a..0bcc3ff 100644 # This file is part of caps strace test. # diff --git a/tests-mx32/match.awk b/tests-mx32/match.awk -index d91c518..ee5d908 100644 +index 1cde87c..df63f78 100644 --- a/tests-mx32/match.awk +++ b/tests-mx32/match.awk @@ -1,4 +1,4 @@ -#!/bin/gawk +#!/usr/bin/gawk # - # Copyright (c) 2014-2018 Dmitry V. Levin <ldv@altlinux.org> + # Copyright (c) 2014-2021 Dmitry V. Levin <ldv@strace.io> # All rights reserved. diff --git a/tests-mx32/rt_sigaction.awk b/tests-mx32/rt_sigaction.awk -index 81dd813..9cd9549 100644 +index dce78f5..573d9ea 100644 --- a/tests-mx32/rt_sigaction.awk +++ b/tests-mx32/rt_sigaction.awk @@ -1,4 +1,4 @@ -#!/bin/gawk +#!/usr/bin/gawk # - # Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org> + # Copyright (c) 2014-2015 Dmitry V. Levin <ldv@strace.io> # Copyright (c) 2016 Elvira Khabirova <lineprinter0@gmail.com> diff --git a/tests/caps.awk b/tests/caps.awk -index 941564a..0bcc3ff 100644 +index 69500ec..e5dfd87 100644 --- a/tests/caps.awk +++ b/tests/caps.awk @@ -1,4 +1,4 @@ @@ -106,22 +106,52 @@ index 941564a..0bcc3ff 100644 # This file is part of caps strace test. # diff --git a/tests/match.awk b/tests/match.awk -index d91c518..ee5d908 100644 +index 1cde87c..df63f78 100644 --- a/tests/match.awk +++ b/tests/match.awk @@ -1,4 +1,4 @@ -#!/bin/gawk +#!/usr/bin/gawk # - # Copyright (c) 2014-2018 Dmitry V. Levin <ldv@altlinux.org> + # Copyright (c) 2014-2021 Dmitry V. Levin <ldv@strace.io> # All rights reserved. diff --git a/tests/rt_sigaction.awk b/tests/rt_sigaction.awk -index 81dd813..9cd9549 100644 +index dce78f5..573d9ea 100644 --- a/tests/rt_sigaction.awk +++ b/tests/rt_sigaction.awk @@ -1,4 +1,4 @@ -#!/bin/gawk +#!/usr/bin/gawk # - # Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org> + # Copyright (c) 2014-2015 Dmitry V. Levin <ldv@strace.io> # Copyright (c) 2016 Elvira Khabirova <lineprinter0@gmail.com> +diff --git a/tests-m32/caps-abbrev.awk b/tests-m32/caps-abbrev.awk +index c00023b..a56cd56 100644 +--- a/tests-m32/caps-abbrev.awk ++++ b/tests-m32/caps-abbrev.awk +@@ -1,4 +1,4 @@ +-#!/bin/gawk ++#!/usr/bin/gawk + # + # This file is part of caps strace test. + # +diff --git a/tests-mx32/caps-abbrev.awk b/tests-mx32/caps-abbrev.awk +index c00023b..a56cd56 100644 +--- a/tests-mx32/caps-abbrev.awk ++++ b/tests-mx32/caps-abbrev.awk +@@ -1,4 +1,4 @@ +-#!/bin/gawk ++#!/usr/bin/gawk + # + # This file is part of caps strace test. + # +diff --git a/tests/caps-abbrev.awk b/tests/caps-abbrev.awk +index c00023b..a56cd56 100644 +--- a/tests/caps-abbrev.awk ++++ b/tests/caps-abbrev.awk +@@ -1,4 +1,4 @@ +-#!/bin/gawk ++#!/usr/bin/gawk + # + # This file is part of caps strace test. + # |