[PATCH v2] strace: handle loaded test systems
DORMANTno replies
From: Ross Burton <hidden>
Date: 2021-10-21 14:30:11
Subsystem:
the rest · Maintainer:
Linus Torvalds
If the host is loaded when running the tests there is a good chance that strace-T.test will fail, as it does a sleep(1) and checks that the nanosleep() call lasted for 0.9-1.1 seconds. As this isn't reliable when the host is loaded, disable the test. [ YOCTO #14596 ] Signed-off-by: Ross Burton <redacted> --- .../strace/strace/ptest-sleep.patch | 20 +++++++++++++++++++ meta/recipes-devtools/strace/strace_5.14.bb | 1 + 2 files changed, 21 insertions(+) create mode 100644 meta/recipes-devtools/strace/strace/ptest-sleep.patch
diff --git a/meta/recipes-devtools/strace/strace/ptest-sleep.patch b/meta/recipes-devtools/strace/strace/ptest-sleep.patch
new file mode 100644
index 0000000000..310e7140b6
--- /dev/null
+++ b/meta/recipes-devtools/strace/strace/ptest-sleep.patch@@ -0,0 +1,20 @@ +The strace-T test executes sleep(1) and verifies that the nanosleep() syscall +lasted between 0.9 and 1.2 seconds, which is too unreliable when the system is +under load. + +Upstream-Status: Inappropriate +Signed-off-by: Ross Burton <ross.burton@arm.com> + +diff --git a/tests/strace-T.test b/tests/strace-T.test +index adca3e872..d4acfe9a2 100755 +--- a/tests/strace-T.test ++++ b/tests/strace-T.test +@@ -9,6 +9,8 @@ + + . "${srcdir=.}/init.sh" + ++skip_ "Test not reliable under load" ++ + T_opt="${1:--T}" + + run_prog ../sleep 0
diff --git a/meta/recipes-devtools/strace/strace_5.14.bb b/meta/recipes-devtools/strace/strace_5.14.bb
index a81bda04ba..9ae1367337 100644
--- a/meta/recipes-devtools/strace/strace_5.14.bb
+++ b/meta/recipes-devtools/strace/strace_5.14.bb@@ -13,6 +13,7 @@ SRC_URI = "https://strace.io/files/${PV}/strace-${PV}.tar.xz \ file://0001-caps-abbrev.awk-fix-gawk-s-path.patch \ file://ptest-spacesave.patch \ file://0001-strace-fix-reproducibilty-issues.patch \ + file://ptest-sleep.patch \ " SRC_URI[sha256sum] = "901bee6db5e17debad4530dd9ffb4dc9a96c4a656edbe1c3141b7cb307b11e73"
--
2.25.1