Skip to contentSkip to conversation

strace: handle loaded test systems

PATCH New Ross Burton 1 participant 1 message Oct 21, 2021

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 strace: handle loaded test systems

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 ]

---
 .../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
meta/recipes-devtools/strace/strace/ptest-sleep.patch new file +20 -0
new file mode 100644
index 0000000000..310e7140b6
@@ -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 <[email protected]>
+
+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
meta/recipes-devtools/strace/strace_5.14.bb +1 -0
index a81bda04ba..9ae1367337 100644
@@ -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"
 
Signature · 1 line
2.25.1