diff options
Diffstat (limited to 'meta/recipes-devtools/strace/strace')
10 files changed, 173 insertions, 117 deletions
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 235e803641..0000000000 --- a/meta/recipes-devtools/strace/strace/0001-caps-abbrev.awk-fix-gawk-s-path.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 597cc206d982e7237eb93fdc33e8c4bb6bb2d796 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/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 4cef0c0127..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 205e7661822987825c7149ada4eefdc5368828ce 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 @@ -14,7 +14,7 @@ Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> 1 file changed, 20 insertions(+) diff --git a/tests/Makefile.am b/tests/Makefile.am -index b8efce8..fa9a1af 100644 +index 55566ee..a7ae6f9 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -16,6 +16,7 @@ SIZEOF_LONG = @SIZEOF_LONG@ @@ -23,9 +23,9 @@ index b8efce8..fa9a1af 100644 ARCH_MFLAGS = +TEST_SUITE_LOG = test-suite.log AM_CFLAGS = $(WARN_CFLAGS) - AM_CPPFLAGS = $(ARCH_MFLAGS) \ - -I$(builddir) \ -@@ -692,3 +693,22 @@ BUILT_SOURCES = ksysent.h + bundled_CPPFLAGS = + if USE_BUNDLED_HEADERS +@@ -703,3 +704,22 @@ BUILT_SOURCES = ksysent.h CLEANFILES = ksysent.h include ../src/scno.am 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 e86da9707c..0000000000 --- a/meta/recipes-devtools/strace/strace/mips-SIGEMT.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 794648d84672bbda30a920a05540b56cd155ed9d 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/ptest-spacesave.patch b/meta/recipes-devtools/strace/strace/ptest-spacesave.patch index c5d8ff9207..4e86ccadc5 100644 --- a/meta/recipes-devtools/strace/strace/ptest-spacesave.patch +++ b/meta/recipes-devtools/strace/strace/ptest-spacesave.patch @@ -22,7 +22,7 @@ index 3540204..5e1e7c9 100755 $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 3a51fb0be9..1224229e8f 100755 --- a/meta/recipes-devtools/strace/strace/run-ptest +++ b/meta/recipes-devtools/strace/strace/run-ptest @@ -1,6 +1,11 @@ #!/bin/sh + +set -u + export TIMEOUT_DURATION=240 -chown nobody tests -chown nobody tests/* -chown nobody ../ptest -su nobody -c "make -B -C tests -k test-suite.log" +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/uintptr_t.patch b/meta/recipes-devtools/strace/strace/uintptr_t.patch deleted file mode 100644 index 088d685af0..0000000000 --- a/meta/recipes-devtools/strace/strace/uintptr_t.patch +++ /dev/null @@ -1,27 +0,0 @@ -From a6c9366bfbcef6f3f4bb068b1f1a5623935b5013 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Tue, 5 Nov 2019 20:05:08 -0800 -Subject: [PATCH] include stdint.h for getting uintptr_t definition - -fixes do_compile_ptest_base -tests/fanotify_mark.c:191:23: error: 'uintptr_t' undeclared (first use in this function); did you mean 'intptr_t'? - -Upstream-Status: Pending -Signed-off-by: Khem Raj <raj.khem@gmail.com> - ---- - tests/fanotify_mark.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/tests/fanotify_mark.c b/tests/fanotify_mark.c -index aade643..de579f3 100644 ---- a/tests/fanotify_mark.c -+++ b/tests/fanotify_mark.c -@@ -18,6 +18,7 @@ - - # include <limits.h> - # include <stdio.h> -+# include <stdint.h> - # include <unistd.h> - # include <sys/fanotify.h> - diff --git a/meta/recipes-devtools/strace/strace/update-gawk-paths.patch b/meta/recipes-devtools/strace/strace/update-gawk-paths.patch index 0c683496ae..a16ede95c2 100644 --- a/meta/recipes-devtools/strace/strace/update-gawk-paths.patch +++ b/meta/recipes-devtools/strace/strace/update-gawk-paths.patch @@ -125,3 +125,33 @@ index dce78f5..573d9ea 100644 # # 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. + # |