riscv64 ptest fixes
cover riscv64 ptest fixes
This series re-enables the strace, python3 & tcl8 ptests on riscv64 & fixes the three riscv64 failures that are not timeouts: lttng-tools, tcl/tcl8 & python3-numpy. Patches 2, 3 & 6 only edit the riscv64 lists in ptest-packagelists.inc; patch 1 skips one slow strace test on riscv64 & patches 4, 5 & 7 carry the fixes.
I sent these results to Khem Raj & Trevor Gamblin before posting. Trevor suggested profiling the per-test durations under QEMU first; patch 1 skips the slowest test found (see "Per-test durations" below).
Where to look:
- Patch 7 works round a confirmed GCC 15+ bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127908
GCC moves the float-to-integer conversion above the range check in its inline ceil/floor/trunc, so ceil(+-inf) raises FE_INVALID. -fno-fp-int-builtin-inexact makes GCC call libm instead.
- Patch 4 carries an lttng-tools fix under review upstream:
https://review.lttng.org/c/lttng-tools/+/18903
- Patch 5 skips binary-40.3, which expects a negative float NaN to stay negative when widened to double. RISC-V returns the positive canonical NaN, as the ISA requires. Reported on an existing MIPS ticket:
https://core.tcl-lang.org/tcl/tktview/bf029ced86
Testing:
- qemuriscv64: testimage of core-image-ptest-<pkg> with the autobuilder's PTEST_RUNNER_TIMEOUT of 450 s (a test is killed after 450 s without output), on my machine, a Xeon E5-1680 v3 from 2014 (a plough-horse rather than a stallion). An autobuilder worker will be faster per core, but busier.
- VisionFive 2 v1.3B (JH7110, 4x U74, 8 GB): each package in core-image-minimal, ptest-runner -t 1800.
package qemuriscv64 VisionFive 2 strace 1081 pass, 0 fail, 24 min 1212 pass, 0 fail python3 44546 pass, 0 fail, 71 min 44698 pass, 0 fail tcl8 152 pass, 0 fail, 10 min only failure was binary-40.3
Per-test durations under QEMU (TCG), as the longest time without output is what the 450 s limit measures:
- strace (make -j4, every output line timestamped): the longest gap is 283 s, ending with qual_fault-syscall.test, which patch 1 skips on riscv64. Next are filtering_syscall-syntax.test (139 s), trace_creds.gen.test (90 s) & strace--tips-full.test (65 s); the rest are under 50 s.
- python3: regrtest -j4 prints a progress line at least every 30 s, so the longest gap in the full run is around 30 s. Its slowest modules (test_concurrent_futures.test_process_pool, about 17 min, & the test_multiprocessing_* modules, 6-11 min) are made of many short cases: run one at a time, no single case takes over 71 s (MiscTestCase.test_large_pool, 69-71 s in each start method). So I have not skipped anything there.
- tcl8: tcltest prints once per test file. The longest is reg.test (115 s), then regexp.test (70 s) & io.test (45 s).
Still parked: tcl, lttng-tools, perl, python3-cffi, libpcap & zstd pass, but are too slow for the 450 s limit on my machine. Under TCG (QEMU's software CPU emulation), ptest-runner kills tcl in unicodeNormalize.test, lttng-tools in test_valid_filter, perl in t/re/regexp_qr_embed_thr (485 s alone, so perl may pass on a faster worker) & python3-cffi, each after 450 s without output. libpcap's run-ptest prints nothing until TESTrun finishes, which takes 9.5 min even on the board. zstd's compression/window-resize.sh exceeds the 200 s per-case limit in cli-tests.
To confirm that these fail only on time, I reran them under QEMU with this series, PTEST_RUNNER_TIMEOUT = "7200" & the cli-tests limit raised to 3600 s (local changes, not in this series). All passed with 0 failures, as they do on the board:
zstd 43 pass 10 min libpcap 14801 pass 24 min tcl 175 test files 46 min lttng-tools 2088 pass 85 min python3-numpy 45769 pass 104 min python3-cffi 1724 pass 187 min perl 2729 pass 219 min
python3-numpy stays parked too: patch 7 fixes its only failure (72 cases of test_unary_spurious_fpexception), but under the 450 s limit numpy 2.5.4 is killed before pytest prints its first result.
glib-2.0 is left parked. It passed one run on QEMU (308 pass, 31 min) & on the board, but it was parked for intermittent failures, which one run cannot rule out:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=15891
https://bugzilla.yoctoproject.org/show_bug.cgi?id=16230
The numpy results above are for 2.5.3, before the rebase. numpy 2.5.4 with patch 7, under QEMU with the 7200 s limit: 45993 pass, 0 fail, 87 min. One earlier 2.5.4 run had a single failure, a wall-clock check in f2py (test_nameargspattern_backtracking) that requires a regex search to take under 0.2 s & measured 0.22 s under TCG; it passed on the rerun.
OOHehir (7):
strace: skip qual_fault-syscall.test on riscv64 ptest-packagelists.inc: re-enable strace for riscv64 ptest-packagelists.inc: re-enable python3 for riscv64
lttng-tools: skip kernel cases when kernel tests are disabled tcl, tcl8: skip binary-40.3 on RISC-V ptest-packagelists.inc: re-enable tcl8 for riscv64
python3-numpy: call libm for ceil/floor/trunc on riscv64
.../distro/include/ptest-packagelists.inc | 7 +- .../python/python3-numpy_2.5.4.bb | 7 ++ meta/recipes-devtools/strace/strace_7.2.bb | 13 +++ meta/recipes-devtools/tcltk/tcl/run-ptest | 5 + meta/recipes-devtools/tcltk8/tcl8/run-ptest | 5 + ...our-LTTNG_TOOLS_DISABLE_KERNEL_TESTS.patch | 108 ++++++++++++++++++ .../lttng/lttng-tools_2.16.0.bb | 1 + 7 files changed, 141 insertions(+), 5 deletions(-) create mode 100644 meta/recipes-kernel/lttng/lttng-tools/0001-tests-honour-LTTNG_TOOLS_DISABLE_KERNEL_TESTS.patch
Signature · 1 line
2.43.0
PATCH 1/7 strace: skip qual_fault-syscall.test on riscv64
On qemuriscv64, the strace ptest goes 283 s without output while qual_fault-syscall.test finishes. That is 63% of the 450 s ptest-runner limit, leaving little margin on a loaded autobuilder, so skip it there before strace is re-enabled for riscv64.
The longest gaps between outputs in core-image-ptest-strace on qemuriscv64 (make -j4, every output line timestamped), with the test that ended each:
- qual_fault-syscall.test (283 s)
- filtering_syscall-syntax.test (139 s)
- trace_creds.gen.test (90 s)
- strace--tips-full.test (65 s)
The rest are under 50 s.
strace is not machine-specific, so the skip is keyed on riscv64, as the gnutls skips in cc848c403a are. It therefore also applies to riscv64 hardware, where the test passes (VisionFive 2).
--- meta/recipes-devtools/strace/strace_7.2.bb | 13 +++++++++++++ 1 file changed, 13 insertions(+)
meta/recipes-devtools/strace/strace_7.2.bb +13 -0
@@ -57,6 +57,19 @@ do_install_ptest() { -i ${D}/${PTEST_PATH}/${TESTDIR}/Makefile } +# Tests that go too long without output under QEMU for the qemuriscv64 ptest +# runs. strace is not machine-specific, so this also skips them on riscv64 +# hardware. +STRACE_PTEST_SKIP ?= "" +STRACE_PTEST_SKIP:riscv64 = "qual_fault-syscall" + +do_install_ptest:append() { + for t in ${STRACE_PTEST_SKIP}; do + sed -i -e '1a . "${srcdir=.}/init.sh"\nskip_ "Too slow under QEMU on riscv64"' \ + ${D}${PTEST_PATH}/${TESTDIR}/$t.test + done +} + RDEPENDS:${PN}-ptest += "make coreutils grep gawk sed locale-base-en-us" BBCLASSEXTEND = "native"
Signature · 1 line
2.43.0
PATCH 2/7 ptest-packagelists.inc: re-enable strace for riscv64
In reply to OOHehirstrace was parked with the other failing riscv64 ptests in 22736c5281 & passes now. core-image-ptest-strace on qemuriscv64, with the previous
commit: 1081 pass, 0 fail, in 24 min. On a VisionFive 2 (JH7110): 1212 pass, 0 fail.
--- meta/conf/distro/include/ptest-packagelists.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/conf/distro/include/ptest-packagelists.inc +2 -2
@@ -167,8 +167,8 @@ PTESTS_PROBLEMS:append:riscv32 = " lttng-tools strace" PTESTS_SLOW:append:libc-musl = " libc-test" # These tests don't yet pass for riscv64 -PTESTS_SLOW:remove:riscv64 = "tcl tcl8 python3-cffi strace lttng-tools python3-numpy perl glib-2.0 zstd libpcap" -PTESTS_PROBLEMS:append:riscv64 = " tcl tcl8 python3-cffi strace lttng-tools python3-numpy perl glib-2.0 zstd libpcap" +PTESTS_SLOW:remove:riscv64 = "tcl tcl8 python3-cffi lttng-tools python3-numpy perl glib-2.0 zstd libpcap" +PTESTS_PROBLEMS:append:riscv64 = " tcl tcl8 python3-cffi lttng-tools python3-numpy perl glib-2.0 zstd libpcap" # These tests don't yet pass for musl qemuarm64 PTESTS_SLOW:remove:libc-musl:qemuarm64 = "strace perl gnutls glib-2.0"
Signature · 1 line
2.43.0
PATCH 3/7 ptest-packagelists.inc: re-enable python3 for riscv64
In reply to OOHehirpython3 was parked in adc448b19e because it hung on qemuriscv64, still running after 42000 s. It no longer hangs. core-image-ptest-python3 on qemuriscv64, in two runs: 44546 & 44548 pass, 0 fail, 71 min each. On a VisionFive 2 (JH7110): 44698 pass, 0 fail.
--- meta/conf/distro/include/ptest-packagelists.inc | 3 --- 1 file changed, 3 deletions(-)
meta/conf/distro/include/ptest-packagelists.inc +0 -3
@@ -159,9 +159,6 @@ PTESTS_SLOW = "\ zstd \ " -# python3 ptests hang on qemuriscv64 -PTESTS_SLOW:remove:riscv64 = "python3" -PTESTS_PROBLEMS:append:riscv64 = " python3" PTESTS_SLOW:remove:riscv32 = "lttng-tools strace " PTESTS_PROBLEMS:append:riscv32 = " lttng-tools strace" PTESTS_SLOW:append:libc-musl = " libc-test"
Signature · 1 line
2.43.0
PATCH 4/7 lttng-tools: skip kernel cases when kernel tests are disabled
In reply to OOHehirrun-ptest sets LTTNG_TOOLS_DISABLE_KERNEL_TESTS when lttng-modules is not installed, as on riscv64, but kernel/test_event_disable.py & tools/save-load/test_save_load.py check only for root & fail with "Kernel tracer not available". Carry the fix sent upstream.
--- ...our-LTTNG_TOOLS_DISABLE_KERNEL_TESTS.patch | 108 ++++++++++++++++++ .../lttng/lttng-tools_2.16.0.bb | 1 + 2 files changed, 109 insertions(+) create mode 100644 meta/recipes-kernel/lttng/lttng-tools/0001-tests-honour-LTTNG_TOOLS_DISABLE_KERNEL_TESTS.patch
meta/recipes-kernel/lttng/lttng-tools/0001-tests-honour-LTTNG_TOOLS_DISABLE_KERNEL_TESTS.patch new file +108 -0
@@ -0,0 +1,108 @@ +From f56f36ecd7481d96c99876e8a6f4a609197e7132 Mon Sep 17 00:00:00 2001 +From: OOHehir <[email protected]> +Date: Tue, 13 Oct 2026 09:41:51 +0100 +Subject: [PATCH] Fix: tests: honour LTTNG_TOOLS_DISABLE_KERNEL_TESTS in two + Python tests +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +OBSERVED ISSUE +━━━━━━━━━━━━━━ +On a target without lttng-modules, kernel/test_event_disable.py & the +kernel cases of tools/save-load/test_save_load.py fail with "Kernel tracer +not available", although the test run sets LTTNG_TOOLS_DISABLE_KERNEL_TESTS=1. +Observed with the Yocto Project ptest on riscv64, which ships no lttng-modules. + +CAUSE +━━━━━ +Both scripts only check that they run as root before running kernel cases, +while the other Python tests use lttngtest._Environment.run_kernel_tests(), +which also honours LTTNG_TOOLS_DISABLE_KERNEL_TESTS. + +SOLUTION +━━━━━━━━ +Use run_kernel_tests() in both scripts. It checks for root as before, & also +honours LTTNG_TOOLS_DISABLE_KERNEL_TESTS. + +Under review on Gerrit: https://review.lttng.org/c/lttng-tools/+/18903 + +Upstream-Status: Submitted [https://lists.lttng.org/pipermail/lttng-dev/2026-October/031100.html] +Signed-off-by: OOHehir <[email protected]> +--- + tests/regression/kernel/test_event_disable.py | 7 ++----- + tests/regression/tools/save-load/test_save_load.py | 9 ++++----- + 2 files changed, 6 insertions(+), 10 deletions(-) + +diff --git a/tests/regression/kernel/test_event_disable.py b/tests/regression/kernel/test_event_disable.py +index da9f146..a373544 100755 +--- a/tests/regression/kernel/test_event_disable.py ++++ b/tests/regression/kernel/test_event_disable.py +@@ -15,7 +15,6 @@ Validates that disabling events works correctly: + - Disabling by name disables all matching rules regardless of filters + """ + +-import os + import pathlib + import sys + import traceback +@@ -307,11 +306,9 @@ if __name__ == "__main__": + ), + ] + +- is_root = os.getuid() == 0 +- +- if not is_root: ++ if not lttngtest._Environment.run_kernel_tests(): + tap = lttngtest.TapGenerator(len(kernel_tests)) +- tap.skip_all_remaining("Kernel tests require root privileges") ++ tap.skip_all_remaining("Kernel tests not enabled") + sys.exit(0) + + tap = lttngtest.TapGenerator(len(kernel_tests)) +diff --git a/tests/regression/tools/save-load/test_save_load.py b/tests/regression/tools/save-load/test_save_load.py +index 9dd8042..1983263 100755 +--- a/tests/regression/tools/save-load/test_save_load.py ++++ b/tests/regression/tools/save-load/test_save_load.py +@@ -13,7 +13,6 @@ through save/load cycles, including: + - Kernel syscalls and tracepoints + """ + +-import os + import pathlib + import sys + import traceback +@@ -953,11 +952,11 @@ if __name__ == "__main__": + ), + ] + +- is_root = os.getuid() == 0 ++ run_kernel_tests = lttngtest._Environment.run_kernel_tests() + allows_destructive = lttngtest._Environment.allows_destructive() + + total_tests = len(user_tests) + len(agent_tests) +- if is_root: ++ if run_kernel_tests: + total_tests += len(kernel_tests) + if allows_destructive: + total_tests += len(destructive_kernel_tests) +@@ -971,7 +970,7 @@ if __name__ == "__main__": + for test_name, test_func, kwargs in agent_tests: + run_test(tap, test_env, test_func, test_name, **kwargs) + +- if is_root: ++ if run_kernel_tests: + with lttngtest.test_environment( + with_sessiond=True, log=tap.diagnostic, enable_kernel_domain=True + ) as test_env: +@@ -986,6 +985,6 @@ if __name__ == "__main__": + "Skipping destructive kernel tests (LTTNG_ENABLE_DESTRUCTIVE_TESTS not set)" + ) + else: +- tap.diagnostic("Skipping kernel tests (not running as root)") ++ tap.diagnostic("Skipping kernel tests (not enabled)") + + sys.exit(0 if tap.is_successful else 1) +-- +2.43.0 +
meta/recipes-kernel/lttng/lttng-tools_2.16.0.bb +1 -0
@@ -72,6 +72,7 @@ SRC_URI = "https://lttng.org/files/lttng-tools/lttng-tools-${PV}.tar.bz2 \ file://disable-tests2.patch \ file://0001-m4-ax_am_macros_static.m4-do-not-write-generation-da.patch \ file://muslfix.patch \ + file://0001-tests-honour-LTTNG_TOOLS_DISABLE_KERNEL_TESTS.patch \ " SRC_URI[sha256sum] = "b8b3244894e49e773d4942b8899f768057974edf75c18dbb48b65bb123c7b2c7"
Signature · 1 line
2.43.0
PATCH 5/7 tcl, tcl8: skip binary-40.3 on RISC-V
In reply to OOHehirbinary-40.3 expects a negative float NaN to stay negative when widened to double. RISC-V returns the positive canonical NaN instead, as the ISA requires, so the test always fails there. Reported upstream on the matching MIPS ticket.
--- meta/recipes-devtools/tcltk/tcl/run-ptest | 5 +++++ meta/recipes-devtools/tcltk8/tcl8/run-ptest | 5 +++++ 2 files changed, 10 insertions(+)
meta/recipes-devtools/tcltk/tcl/run-ptest +5 -0
@@ -38,6 +38,11 @@ SKIP="$SKIP httpProxy-\*" SKIP="$SKIP mutex-condition-\*" # Timer-related tests are going to be fragile (16324) SKIP="$SKIP timer-\*" +# RISC-V widens a negative float NaN to the positive canonical NaN, so the +# sign check fails: https://core.tcl-lang.org/tcl/tktview/bf029ced86 +case "$(uname -m)" in +riscv*) SKIP="$SKIP binary-40.3" ;; +esac # Run all tests in tests/*.test unless tests are specified as arguments TESTS=${*:-tests/*.test}
meta/recipes-devtools/tcltk8/tcl8/run-ptest +5 -0
@@ -36,6 +36,11 @@ SKIP="$SKIP http11-\*" SKIP="$SKIP httpProxy-\*" # Timer-related tests are going to be fragile (16324) SKIP="$SKIP timer-\*" +# RISC-V widens a negative float NaN to the positive canonical NaN, so the +# sign check fails: https://core.tcl-lang.org/tcl/tktview/bf029ced86 +case "$(uname -m)" in +riscv*) SKIP="$SKIP binary-40.3" ;; +esac # Run all tests in tests/*.test unless tests are specified as arguments TESTS=${*:-tests/*.test}
Signature · 1 line
2.43.0
Re: [OE-core] [PATCH 5/7] tcl, tcl8: skip binary-40.3 on RISC-V
Quoted 6 lines · OOHehir via lists.openembedded.org
binary-40.3 expects a negative float NaN to stay negative when widened to double. RISC-V returns the positive canonical NaN instead, as the ISA requires, so the test always fails there. Reported upstream on the matching MIPS ticket.
Signed-off-by OOHehir <[email protected]>---
Hi,
Thanks for your patch. Something looks wrong here, tcl/tcl8 ptests started to fail on non-riscv architectures with a syntax error:
AssertionError:
Failed ptests:
{'tcl': 'START: ptest-runner\n'
'2026-10-17T09:16\n'
'/usr/lib/tcl/ptest/run-ptest: line 73: syntax error: unexpected '
'newline (expecting ")")\n'
'\n'
'ERROR: Exit status is 2\n'
'DURATION: 0\n'}ptests which had no test results:
['tcl']
Failed ptests:
{'tcl8': 'START: ptest-runner\n'
'2026-10-17T09:16\n'
'/usr/lib/tcl8/ptest/run-ptest: line 69: syntax error: unexpected '
'newline (expecting ")")\n'
'\n'
'ERROR: Exit status is 2\n'
'DURATION: 0\n'}ptests which had no test results:
['tcl8']
https://autobuilder.yoctoproject.org/valkyrie/#/builders/109/builds/1396
https://autobuilder.yoctoproject.org/valkyrie/#/builders/110/builds/1385
Can you have a look at the issue?
Thanks,
Mathieu
Signature · 3 lines
Mathieu Dubois-Briand, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Re: [OE-core] [PATCH 5/7] tcl, tcl8: skip binary-40.3 on RISC-V
Hello Mathieu,
Thanks for this. It looks like it was in the musl build during do_install_ptest:append:libc-musl. I've modified the tcl recipes' sed so it only matches at the start of the line. I ran some tests locally & was able to recreate the issue. My v2 patches now build & install a valid run-ptest on musl & glibc. I will send v2 of the series shortly.
Regards,
Owen
PATCH 6/7 ptest-packagelists.inc: re-enable tcl8 for riscv64
In reply to OOHehirThe previous commit skips binary-40.3, its only failure on riscv64. core-image-ptest-tcl8 on qemuriscv64: 152 pass, 0 fail, 607 s. On a VisionFive 2 (JH7110), binary-40.3 was the only failure.
tcl stays parked: under TCG, unicodeNormalize.test prints nothing for more than 450 s & ptest-runner kills it. The binary-40.3 skip still helps tcl on hardware.
--- meta/conf/distro/include/ptest-packagelists.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/conf/distro/include/ptest-packagelists.inc +2 -2
@@ -164,8 +164,8 @@ PTESTS_PROBLEMS:append:riscv32 = " lttng-tools strace" PTESTS_SLOW:append:libc-musl = " libc-test" # These tests don't yet pass for riscv64 -PTESTS_SLOW:remove:riscv64 = "tcl tcl8 python3-cffi lttng-tools python3-numpy perl glib-2.0 zstd libpcap" -PTESTS_PROBLEMS:append:riscv64 = " tcl tcl8 python3-cffi lttng-tools python3-numpy perl glib-2.0 zstd libpcap" +PTESTS_SLOW:remove:riscv64 = "tcl python3-cffi lttng-tools python3-numpy perl glib-2.0 zstd libpcap" +PTESTS_PROBLEMS:append:riscv64 = " tcl python3-cffi lttng-tools python3-numpy perl glib-2.0 zstd libpcap" # These tests don't yet pass for musl qemuarm64 PTESTS_SLOW:remove:libc-musl:qemuarm64 = "strace perl gnutls glib-2.0"
Signature · 1 line
2.43.0
PATCH 7/7 python3-numpy: call libm for ceil/floor/trunc on riscv64
In reply to OOHehirnumpy builds with -std=c11, so GCC 15 onwards expands ceil/floor/trunc inline on riscv64, & its first scheduling pass moves the fcvt above the |x| < 2^52 check. ceil(+-inf) & ceil(1e300) then raise FE_INVALID, & the 72 cases of test_unary_spurious_fpexception fail. Confirmed as
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127908.
-fno-fp-int-builtin-inexact makes GCC call libm, which handles these inputs correctly. python3-numpy-ptest on a VisionFive 2 (JH7110), with 2.5.3: 45770 pass, 0 fail. On qemuriscv64 with PTEST_RUNNER_TIMEOUT = "7200", with 2.5.4: 45993 pass, 0 fail.
--- meta/recipes-devtools/python/python3-numpy_2.5.4.bb | 7 +++++++ 1 file changed, 7 insertions(+)
meta/recipes-devtools/python/python3-numpy_2.5.4.bb +7 -0
@@ -26,6 +26,13 @@ PACKAGECONFIG[svml] = "-Ddisable-svml=false,-Ddisable-svml=true" # the overflow tests fail with compiler-rt on aarch64 LDFLAGS:append:toolchain-clang:aarch64 = " -rtlib=libgcc -unwindlib=libgcc" +# GCC 15 onwards expands ceil/floor/trunc inline on riscv64 but runs the fcvt +# before the range check, so +-inf raises FE_INVALID & numpy's +# test_unary_spurious_fpexception fails. Make it call libm instead. +# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127908 +CFLAGS:append:toolchain-gcc:riscv64 = " -fno-fp-int-builtin-inexact" +CXXFLAGS:append:toolchain-gcc:riscv64 = " -fno-fp-int-builtin-inexact" + # To ensure reproducibility, remove entries from __config__ which expose build # machine details, such as build paths, host paths, and hardware configuration. strip_build_info() {
Signature · 1 line
2.43.0
v2 cover riscv64 ptest fixes
In reply to OOHehirFrom: OOHehir <[email protected]>
Changes in v2:
- New patch 5: on musl, the tcl & tcl8 recipes add a skip after every line containing SKIP="$SKIP, so v1's skip inside a case arm left run-ptest with a syntax error (reported by Mathieu Dubois-Briand). Building tcl & tcl8 to do_install_ptest_base for qemux86-64 & syntax-checking the installed
run-ptest: v1 reproduces the autobuilder error on musl, v2 passes on musl & glibc.
- Patches 1 & 8: shorter recipe comments, no functional change.
This series re-enables the strace, python3 & tcl8 ptests on riscv64 & fixes the three riscv64 failures that are not timeouts: lttng-tools, tcl/tcl8 & python3-numpy. Patches 2, 3 & 7 only edit the riscv64 lists in ptest-packagelists.inc; patch 1 skips one slow strace test on riscv64 & patches 4, 6 & 8 carry the fixes. Patch 5 makes the tcl recipes' musl sed safe for patch 6.
I sent these results to Khem Raj & Trevor Gamblin before posting. Trevor suggested profiling the per-test durations under QEMU first; patch 1 skips the slowest test found (see "Per-test durations" below).
Where to look:
- Patch 8 works round a confirmed GCC 15+ bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127908
GCC moves the float-to-integer conversion above the range check in its inline ceil/floor/trunc, so ceil(+-inf) raises FE_INVALID. -fno-fp-int-builtin-inexact makes GCC call libm instead.
- Patch 4 carries an lttng-tools fix under review upstream:
https://review.lttng.org/c/lttng-tools/+/18903
- Patch 6 skips binary-40.3, which expects a negative float NaN to stay negative when widened to double. RISC-V returns the positive canonical NaN, as the ISA requires. Reported on an existing MIPS ticket:
https://core.tcl-lang.org/tcl/tktview/bf029ced86
Testing:
- qemuriscv64: testimage of core-image-ptest-<pkg> with the autobuilder's PTEST_RUNNER_TIMEOUT of 450 s (a test is killed after 450 s without output), on my machine, a Xeon E5-1680 v3 from 2014 (a plough-horse rather than a stallion). An autobuilder worker will be faster per core, but busier.
- VisionFive 2 v1.3B (JH7110, 4x U74, 8 GB): each package in core-image-minimal, ptest-runner -t 1800.
package qemuriscv64 VisionFive 2 strace 1081 pass, 0 fail, 24 min 1212 pass, 0 fail python3 44546 pass, 0 fail, 71 min 44698 pass, 0 fail tcl8 152 pass, 0 fail, 10 min only failure was binary-40.3
Per-test durations under QEMU (TCG), as the longest time without output is what the 450 s limit measures:
- strace (make -j4, every output line timestamped): the longest gap is 283 s, ending with qual_fault-syscall.test, which patch 1 skips on riscv64. Next are filtering_syscall-syntax.test (139 s), trace_creds.gen.test (90 s) & strace--tips-full.test (65 s); the rest are under 50 s.
- python3: regrtest -j4 prints a progress line at least every 30 s, so the longest gap in the full run is around 30 s. Its slowest modules (test_concurrent_futures.test_process_pool, about 17 min, & the test_multiprocessing_* modules, 6-11 min) are made of many short cases: run one at a time, no single case takes over 71 s (MiscTestCase.test_large_pool, 69-71 s in each start method). So I have not skipped anything there.
- tcl8: tcltest prints once per test file. The longest is reg.test (115 s), then regexp.test (70 s) & io.test (45 s).
Still parked: tcl, lttng-tools, perl, python3-cffi, libpcap & zstd pass, but are too slow for the 450 s limit on my machine. Under TCG (QEMU's software CPU emulation), ptest-runner kills tcl in unicodeNormalize.test, lttng-tools in test_valid_filter, perl in t/re/regexp_qr_embed_thr (485 s alone, so perl may pass on a faster worker) & python3-cffi, each after 450 s without output. libpcap's run-ptest prints nothing until TESTrun finishes, which takes 9.5 min even on the board. zstd's compression/window-resize.sh exceeds the 200 s per-case limit in cli-tests.
To confirm that these fail only on time, I reran them under QEMU with this series, PTEST_RUNNER_TIMEOUT = "7200" & the cli-tests limit raised to 3600 s (local changes, not in this series). All passed with 0 failures, as they do on the board:
zstd 43 pass 10 min libpcap 14801 pass 24 min tcl 175 test files 46 min lttng-tools 2088 pass 85 min python3-numpy 45769 pass 104 min python3-cffi 1724 pass 187 min perl 2729 pass 219 min
python3-numpy stays parked too: patch 8 fixes its only failure (72 cases of test_unary_spurious_fpexception), but under the 450 s limit numpy 2.5.4 is killed before pytest prints its first result.
glib-2.0 is left parked. It passed one run on QEMU (308 pass, 31 min) & on the board, but it was parked for intermittent failures, which one run cannot rule out:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=15891
https://bugzilla.yoctoproject.org/show_bug.cgi?id=16230
The numpy results above are for 2.5.3, before the rebase. numpy 2.5.4 with patch 8, under QEMU with the 7200 s limit: 45993 pass, 0 fail, 87 min. One earlier 2.5.4 run had a single failure, a wall-clock check in f2py (test_nameargspattern_backtracking) that requires a regex search to take under 0.2 s & measured 0.22 s under TCG; it passed on the rerun.
OOHehir (8):
strace: skip qual_fault-syscall.test on riscv64 ptest-packagelists.inc: re-enable strace for riscv64 ptest-packagelists.inc: re-enable python3 for riscv64
lttng-tools: skip kernel cases when kernel tests are disabled tcl, tcl8: anchor the musl unixInit-3 skip to top-level SKIP lines tcl, tcl8: skip binary-40.3 on RISC-V ptest-packagelists.inc: re-enable tcl8 for riscv64
python3-numpy: call libm for ceil/floor/trunc on riscv64
.../distro/include/ptest-packagelists.inc | 7 +- .../python/python3-numpy_2.5.4.bb | 5 + meta/recipes-devtools/strace/strace_7.2.bb | 12 ++ meta/recipes-devtools/tcltk/tcl/run-ptest | 5 + meta/recipes-devtools/tcltk/tcl_9.1.0.bb | 2 +- meta/recipes-devtools/tcltk8/tcl8/run-ptest | 5 + meta/recipes-devtools/tcltk8/tcl8_8.6.18.bb | 2 +- ...our-LTTNG_TOOLS_DISABLE_KERNEL_TESTS.patch | 108 ++++++++++++++++++ .../lttng/lttng-tools_2.16.0.bb | 1 + 9 files changed, 140 insertions(+), 7 deletions(-) create mode 100644 meta/recipes-kernel/lttng/lttng-tools/0001-tests-honour-LTTNG_TOOLS_DISABLE_KERNEL_TESTS.patch
Signature · 1 line
2.43.0
PATCH v2 1/8 strace: skip qual_fault-syscall.test on riscv64
On qemuriscv64, the strace ptest goes 283 s without output while qual_fault-syscall.test finishes. That is 63% of the 450 s ptest-runner limit, leaving little margin on a loaded autobuilder, so skip it there before strace is re-enabled for riscv64.
The longest gaps between outputs in core-image-ptest-strace on qemuriscv64 (make -j4, every output line timestamped), with the test that ended each:
- qual_fault-syscall.test (283 s)
- filtering_syscall-syntax.test (139 s)
- trace_creds.gen.test (90 s)
- strace--tips-full.test (65 s)
The rest are under 50 s.
strace is not machine-specific, so the skip is keyed on riscv64, as the gnutls skips in cc848c403a are. It therefore also applies to riscv64 hardware, where the test passes (VisionFive 2).
--- meta/recipes-devtools/strace/strace_7.2.bb | 12 ++++++++++++ 1 file changed, 12 insertions(+)
meta/recipes-devtools/strace/strace_7.2.bb +12 -0
@@ -57,6 +57,18 @@ do_install_ptest() { -i ${D}/${PTEST_PATH}/${TESTDIR}/Makefile } +# Too long without output for ptest-runner on qemuriscv64. Keyed on riscv64, as +# strace is not machine-specific, so also skipped on riscv64 hardware. +STRACE_PTEST_SKIP ?= "" +STRACE_PTEST_SKIP:riscv64 = "qual_fault-syscall" + +do_install_ptest:append() { + for t in ${STRACE_PTEST_SKIP}; do + sed -i -e '1a . "${srcdir=.}/init.sh"\nskip_ "Too slow under QEMU on riscv64"' \ + ${D}${PTEST_PATH}/${TESTDIR}/$t.test + done +} + RDEPENDS:${PN}-ptest += "make coreutils grep gawk sed locale-base-en-us" BBCLASSEXTEND = "native"
Signature · 1 line
2.43.0
PATCH v2 2/8 ptest-packagelists.inc: re-enable strace for riscv64
In reply to OOHehirstrace was parked with the other failing riscv64 ptests in 22736c5281 & passes now. core-image-ptest-strace on qemuriscv64, with the previous
commit: 1081 pass, 0 fail, in 24 min. On a VisionFive 2 (JH7110): 1212 pass, 0 fail.
--- meta/conf/distro/include/ptest-packagelists.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/conf/distro/include/ptest-packagelists.inc +2 -2
@@ -167,8 +167,8 @@ PTESTS_PROBLEMS:append:riscv32 = " lttng-tools strace" PTESTS_SLOW:append:libc-musl = " libc-test" # These tests don't yet pass for riscv64 -PTESTS_SLOW:remove:riscv64 = "tcl tcl8 python3-cffi strace lttng-tools python3-numpy perl glib-2.0 zstd libpcap" -PTESTS_PROBLEMS:append:riscv64 = " tcl tcl8 python3-cffi strace lttng-tools python3-numpy perl glib-2.0 zstd libpcap" +PTESTS_SLOW:remove:riscv64 = "tcl tcl8 python3-cffi lttng-tools python3-numpy perl glib-2.0 zstd libpcap" +PTESTS_PROBLEMS:append:riscv64 = " tcl tcl8 python3-cffi lttng-tools python3-numpy perl glib-2.0 zstd libpcap" # These tests don't yet pass for musl qemuarm64 PTESTS_SLOW:remove:libc-musl:qemuarm64 = "strace perl gnutls glib-2.0"
Signature · 1 line
2.43.0
PATCH v2 3/8 ptest-packagelists.inc: re-enable python3 for riscv64
In reply to OOHehirpython3 was parked in adc448b19e because it hung on qemuriscv64, still running after 42000 s. It no longer hangs. core-image-ptest-python3 on qemuriscv64, in two runs: 44546 & 44548 pass, 0 fail, 71 min each. On a VisionFive 2 (JH7110): 44698 pass, 0 fail.
--- meta/conf/distro/include/ptest-packagelists.inc | 3 --- 1 file changed, 3 deletions(-)
meta/conf/distro/include/ptest-packagelists.inc +0 -3
@@ -159,9 +159,6 @@ PTESTS_SLOW = "\ zstd \ " -# python3 ptests hang on qemuriscv64 -PTESTS_SLOW:remove:riscv64 = "python3" -PTESTS_PROBLEMS:append:riscv64 = " python3" PTESTS_SLOW:remove:riscv32 = "lttng-tools strace " PTESTS_PROBLEMS:append:riscv32 = " lttng-tools strace" PTESTS_SLOW:append:libc-musl = " libc-test"
Signature · 1 line
2.43.0
PATCH v2 4/8 lttng-tools: skip kernel cases when kernel tests are disabled
In reply to OOHehirrun-ptest sets LTTNG_TOOLS_DISABLE_KERNEL_TESTS when lttng-modules is not installed, as on riscv64, but kernel/test_event_disable.py & tools/save-load/test_save_load.py check only for root & fail with "Kernel tracer not available". Carry the fix sent upstream.
--- ...our-LTTNG_TOOLS_DISABLE_KERNEL_TESTS.patch | 108 ++++++++++++++++++ .../lttng/lttng-tools_2.16.0.bb | 1 + 2 files changed, 109 insertions(+) create mode 100644 meta/recipes-kernel/lttng/lttng-tools/0001-tests-honour-LTTNG_TOOLS_DISABLE_KERNEL_TESTS.patch
meta/recipes-kernel/lttng/lttng-tools/0001-tests-honour-LTTNG_TOOLS_DISABLE_KERNEL_TESTS.patch new file +108 -0
@@ -0,0 +1,108 @@ +From f56f36ecd7481d96c99876e8a6f4a609197e7132 Mon Sep 17 00:00:00 2001 +From: OOHehir <[email protected]> +Date: Tue, 13 Oct 2026 09:41:51 +0100 +Subject: [PATCH] Fix: tests: honour LTTNG_TOOLS_DISABLE_KERNEL_TESTS in two + Python tests +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +OBSERVED ISSUE +━━━━━━━━━━━━━━ +On a target without lttng-modules, kernel/test_event_disable.py & the +kernel cases of tools/save-load/test_save_load.py fail with "Kernel tracer +not available", although the test run sets LTTNG_TOOLS_DISABLE_KERNEL_TESTS=1. +Observed with the Yocto Project ptest on riscv64, which ships no lttng-modules. + +CAUSE +━━━━━ +Both scripts only check that they run as root before running kernel cases, +while the other Python tests use lttngtest._Environment.run_kernel_tests(), +which also honours LTTNG_TOOLS_DISABLE_KERNEL_TESTS. + +SOLUTION +━━━━━━━━ +Use run_kernel_tests() in both scripts. It checks for root as before, & also +honours LTTNG_TOOLS_DISABLE_KERNEL_TESTS. + +Under review on Gerrit: https://review.lttng.org/c/lttng-tools/+/18903 + +Upstream-Status: Submitted [https://lists.lttng.org/pipermail/lttng-dev/2026-October/031100.html] +Signed-off-by: OOHehir <[email protected]> +--- + tests/regression/kernel/test_event_disable.py | 7 ++----- + tests/regression/tools/save-load/test_save_load.py | 9 ++++----- + 2 files changed, 6 insertions(+), 10 deletions(-) + +diff --git a/tests/regression/kernel/test_event_disable.py b/tests/regression/kernel/test_event_disable.py +index da9f146..a373544 100755 +--- a/tests/regression/kernel/test_event_disable.py ++++ b/tests/regression/kernel/test_event_disable.py +@@ -15,7 +15,6 @@ Validates that disabling events works correctly: + - Disabling by name disables all matching rules regardless of filters + """ + +-import os + import pathlib + import sys + import traceback +@@ -307,11 +306,9 @@ if __name__ == "__main__": + ), + ] + +- is_root = os.getuid() == 0 +- +- if not is_root: ++ if not lttngtest._Environment.run_kernel_tests(): + tap = lttngtest.TapGenerator(len(kernel_tests)) +- tap.skip_all_remaining("Kernel tests require root privileges") ++ tap.skip_all_remaining("Kernel tests not enabled") + sys.exit(0) + + tap = lttngtest.TapGenerator(len(kernel_tests)) +diff --git a/tests/regression/tools/save-load/test_save_load.py b/tests/regression/tools/save-load/test_save_load.py +index 9dd8042..1983263 100755 +--- a/tests/regression/tools/save-load/test_save_load.py ++++ b/tests/regression/tools/save-load/test_save_load.py +@@ -13,7 +13,6 @@ through save/load cycles, including: + - Kernel syscalls and tracepoints + """ + +-import os + import pathlib + import sys + import traceback +@@ -953,11 +952,11 @@ if __name__ == "__main__": + ), + ] + +- is_root = os.getuid() == 0 ++ run_kernel_tests = lttngtest._Environment.run_kernel_tests() + allows_destructive = lttngtest._Environment.allows_destructive() + + total_tests = len(user_tests) + len(agent_tests) +- if is_root: ++ if run_kernel_tests: + total_tests += len(kernel_tests) + if allows_destructive: + total_tests += len(destructive_kernel_tests) +@@ -971,7 +970,7 @@ if __name__ == "__main__": + for test_name, test_func, kwargs in agent_tests: + run_test(tap, test_env, test_func, test_name, **kwargs) + +- if is_root: ++ if run_kernel_tests: + with lttngtest.test_environment( + with_sessiond=True, log=tap.diagnostic, enable_kernel_domain=True + ) as test_env: +@@ -986,6 +985,6 @@ if __name__ == "__main__": + "Skipping destructive kernel tests (LTTNG_ENABLE_DESTRUCTIVE_TESTS not set)" + ) + else: +- tap.diagnostic("Skipping kernel tests (not running as root)") ++ tap.diagnostic("Skipping kernel tests (not enabled)") + + sys.exit(0 if tap.is_successful else 1) +-- +2.43.0 +
meta/recipes-kernel/lttng/lttng-tools_2.16.0.bb +1 -0
@@ -72,6 +72,7 @@ SRC_URI = "https://lttng.org/files/lttng-tools/lttng-tools-${PV}.tar.bz2 \ file://disable-tests2.patch \ file://0001-m4-ax_am_macros_static.m4-do-not-write-generation-da.patch \ file://muslfix.patch \ + file://0001-tests-honour-LTTNG_TOOLS_DISABLE_KERNEL_TESTS.patch \ " SRC_URI[sha256sum] = "b8b3244894e49e773d4942b8899f768057974edf75c18dbb48b65bb123c7b2c7"
Signature · 1 line
2.43.0
PATCH v2 5/8 tcl, tcl8: anchor the musl unixInit-3 skip to top-level SKIP lines
In reply to OOHehirOn musl, do_install_ptest adds the unixInit-3 skip after every line of run-ptest containing SKIP="$SKIP. A SKIP set inside a case arm then gets two lines between ;; & esac, & run-ptest fails with a syntax error before running any test. The next commit adds such an arm.
--- meta/recipes-devtools/tcltk/tcl_9.1.0.bb | 2 +- meta/recipes-devtools/tcltk8/tcl8_8.6.18.bb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
meta/recipes-devtools/tcltk/tcl_9.1.0.bb +1 -1
@@ -85,7 +85,7 @@ do_install_ptest() { do_install_ptest:append:libc-musl () { # Assumes locales other than provided by musl-locales - sed -i '/SKIP="$SKIP.*$/a # unixInit-3* is suppressed due to hardcoded locale assumptions\nSKIP="$SKIP unixInit-3\\\*"' ${D}${PTEST_PATH}/run-ptest + sed -i '/^SKIP="$SKIP.*$/a # unixInit-3* is suppressed due to hardcoded locale assumptions\nSKIP="$SKIP unixInit-3\\\*"' ${D}${PTEST_PATH}/run-ptest } # Fix some paths that might be used by Tcl extensions
meta/recipes-devtools/tcltk8/tcl8_8.6.18.bb +1 -1
@@ -86,7 +86,7 @@ do_install_ptest() { do_install_ptest:append:libc-musl () { # Assumes locales other than provided by musl-locales - sed -i '/SKIP="$SKIP.*$/a # unixInit-3* is suppressed due to hardcoded locale assumptions\nSKIP="$SKIP unixInit-3\\\*"' ${D}${PTEST_PATH}/run-ptest + sed -i '/^SKIP="$SKIP.*$/a # unixInit-3* is suppressed due to hardcoded locale assumptions\nSKIP="$SKIP unixInit-3\\\*"' ${D}${PTEST_PATH}/run-ptest } # Fix some paths that might be used by Tcl extensions
Signature · 1 line
2.43.0
Re: [OE-core] [PATCH v2 5/8] tcl, tcl8: anchor the musl unixInit-3 skip to top-level SKIP lines
Hi Owen,
Quoted 3 lines · Owen O'Hehir via lists.openembedded.org
On musl,
do_install_ptestadds the unixInit-3 skip after every line of run-ptest containing SKIP="$SKIP.
That’s… not the intended behaviour.
The intention was to add it once, but obviously the sed wasn’t constructed correctly. A better solution here would be to add a variable to the recipe (say SKIPPED_TESTS) which we sed into the run-ptest. We can keep the bulk of the entries in the run-ptest, but this would let the recipe add overridden skips too.
Something like:
In run-ptest:
SKIP=“"
Then in the recipe:
SKIPPED_TESTS = “”
# comment about why this is needed SKIPPED_TESTS:append:musl = “ unixInit-3*” # another comment SKIPPED_TESTS:append:riscv64 = “ binary-40.3*”
do_install_ptest:append () {
sed -i -e "s|SKIP=“"|SKIP=\"${SKIPPED_TESTS}\"|" ${D}${PTEST_PATH}/run-ptest
}
For an example, see the python3 recipe.
Ross
Re: [OE-core] [PATCH v2 5/8] tcl, tcl8: anchor the musl unixInit-3 skip to top-level SKIP lines
Ross,
Ok, I'll take a look & hopefully have something in a day or two.
Regards,
Owen
Quoted 38 lines · On Mon 19 Oct 2026, 13:07 Ross Burton, <[email protected]> wrote:
Hi Owen,
Quoted 3 lines · Owen O'Hehir via lists.openembedded.org
On musl,
do_install_ptestadds the unixInit-3 skip after every line of run-ptest containing SKIP="$SKIP.That’s… not the intended behaviour.
The intention was to add it once, but obviously the sed wasn’t constructed correctly. A better solution here would be to add a variable to the recipe (say
SKIPPED_TESTS) which we sed into the run-ptest. We can keep the bulk of the entries in the run-ptest, but this would let the recipe add overridden skips too.Something like:
In run-ptest:
SKIP=“"
Then in the recipe:
SKIPPED_TESTS= “”# comment about why this is needed SKIPPED_TESTS:append:musl = “ unixInit-3*” # another comment SKIPPED_TESTS:append:riscv64 = “ binary-40.3*”do_install_ptest:append () {
sed -i -e "s|SKIP=“"|SKIP=\"${SKIPPED_TESTS}\"|"
${D}${PTEST_PATH}/run-ptest
}For an example, see the python3 recipe.
Ross
PATCH v2 6/8 tcl, tcl8: skip binary-40.3 on RISC-V
In reply to OOHehirbinary-40.3 expects a negative float NaN to stay negative when widened to double. RISC-V returns the positive canonical NaN instead, as the ISA requires, so the test always fails there. Reported upstream on the matching MIPS ticket.
--- meta/recipes-devtools/tcltk/tcl/run-ptest | 5 +++++ meta/recipes-devtools/tcltk8/tcl8/run-ptest | 5 +++++ 2 files changed, 10 insertions(+)
meta/recipes-devtools/tcltk/tcl/run-ptest +5 -0
@@ -38,6 +38,11 @@ SKIP="$SKIP httpProxy-\*" SKIP="$SKIP mutex-condition-\*" # Timer-related tests are going to be fragile (16324) SKIP="$SKIP timer-\*" +# RISC-V widens a negative float NaN to the positive canonical NaN, so the +# sign check fails: https://core.tcl-lang.org/tcl/tktview/bf029ced86 +case "$(uname -m)" in +riscv*) SKIP="$SKIP binary-40.3" ;; +esac # Run all tests in tests/*.test unless tests are specified as arguments TESTS=${*:-tests/*.test}
meta/recipes-devtools/tcltk8/tcl8/run-ptest +5 -0
@@ -36,6 +36,11 @@ SKIP="$SKIP http11-\*" SKIP="$SKIP httpProxy-\*" # Timer-related tests are going to be fragile (16324) SKIP="$SKIP timer-\*" +# RISC-V widens a negative float NaN to the positive canonical NaN, so the +# sign check fails: https://core.tcl-lang.org/tcl/tktview/bf029ced86 +case "$(uname -m)" in +riscv*) SKIP="$SKIP binary-40.3" ;; +esac # Run all tests in tests/*.test unless tests are specified as arguments TESTS=${*:-tests/*.test}
Signature · 1 line
2.43.0
PATCH v2 7/8 ptest-packagelists.inc: re-enable tcl8 for riscv64
In reply to OOHehirThe previous commit skips binary-40.3, its only failure on riscv64. core-image-ptest-tcl8 on qemuriscv64: 152 pass, 0 fail, 607 s. On a VisionFive 2 (JH7110), binary-40.3 was the only failure.
tcl stays parked: under TCG, unicodeNormalize.test prints nothing for more than 450 s & ptest-runner kills it. The binary-40.3 skip still helps tcl on hardware.
--- meta/conf/distro/include/ptest-packagelists.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/conf/distro/include/ptest-packagelists.inc +2 -2
@@ -164,8 +164,8 @@ PTESTS_PROBLEMS:append:riscv32 = " lttng-tools strace" PTESTS_SLOW:append:libc-musl = " libc-test" # These tests don't yet pass for riscv64 -PTESTS_SLOW:remove:riscv64 = "tcl tcl8 python3-cffi lttng-tools python3-numpy perl glib-2.0 zstd libpcap" -PTESTS_PROBLEMS:append:riscv64 = " tcl tcl8 python3-cffi lttng-tools python3-numpy perl glib-2.0 zstd libpcap" +PTESTS_SLOW:remove:riscv64 = "tcl python3-cffi lttng-tools python3-numpy perl glib-2.0 zstd libpcap" +PTESTS_PROBLEMS:append:riscv64 = " tcl python3-cffi lttng-tools python3-numpy perl glib-2.0 zstd libpcap" # These tests don't yet pass for musl qemuarm64 PTESTS_SLOW:remove:libc-musl:qemuarm64 = "strace perl gnutls glib-2.0"
Signature · 1 line
2.43.0
PATCH v2 8/8 python3-numpy: call libm for ceil/floor/trunc on riscv64
In reply to OOHehirnumpy builds with -std=c11, so GCC 15 onwards expands ceil/floor/trunc inline on riscv64, & its first scheduling pass moves the fcvt above the |x| < 2^52 check. ceil(+-inf) & ceil(1e300) then raise FE_INVALID, & the 72 cases of test_unary_spurious_fpexception fail. Confirmed as
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127908.
-fno-fp-int-builtin-inexact makes GCC call libm, which handles these inputs correctly. python3-numpy-ptest on a VisionFive 2 (JH7110), with 2.5.3: 45770 pass, 0 fail. On qemuriscv64 with PTEST_RUNNER_TIMEOUT = "7200", with 2.5.4: 45993 pass, 0 fail.
--- meta/recipes-devtools/python/python3-numpy_2.5.4.bb | 5 +++++ 1 file changed, 5 insertions(+)
meta/recipes-devtools/python/python3-numpy_2.5.4.bb +5 -0
@@ -26,6 +26,11 @@ PACKAGECONFIG[svml] = "-Ddisable-svml=false,-Ddisable-svml=true" # the overflow tests fail with compiler-rt on aarch64 LDFLAGS:append:toolchain-clang:aarch64 = " -rtlib=libgcc -unwindlib=libgcc" +# GCC 15+ inlines ceil/floor/trunc on riscv64 with the fcvt ahead of the range +# check, so +-inf raises FE_INVALID; call libm instead. GCC PR 127908. +CFLAGS:append:toolchain-gcc:riscv64 = " -fno-fp-int-builtin-inexact" +CXXFLAGS:append:toolchain-gcc:riscv64 = " -fno-fp-int-builtin-inexact" + # To ensure reproducibility, remove entries from __config__ which expose build # machine details, such as build paths, host paths, and hardware configuration. strip_build_info() {
Signature · 1 line
2.43.0
I have looked at the patches, I think it improves the ptests on RV64 in general, we may still see some issues on AB due to load etc. so waiting to see the AB run results. Overall looks good, thanks for working on it.
Quoted 147 lines · OOHehir
From: OOHehir <[email protected]>
Changes in v2:
- New patch 5: on musl, the tcl & tcl8 recipes add a skip after every line containing SKIP="$SKIP, so v1's skip inside a case arm left run-ptest
with a
syntax error (reported by Mathieu Dubois-Briand). Building tcl & tcl8 todo_install_ptest_basefor qemux86-64 & syntax-checking the installed
run-ptest: v1 reproduces the autobuilder error on musl, v2 passes on
musl &
glibc.
- Patches 1 & 8: shorter recipe comments, no functional change.This series re-enables the strace, python3 & tcl8 ptests on riscv64 & fixes the
three riscv64 failures that are not timeouts: lttng-tools, tcl/tcl8 & python3-numpy. Patches 2, 3 & 7 only edit the riscv64 lists in ptest-packagelists.inc; patch 1 skips one slow strace test on riscv64 & patches 4, 6 & 8 carry the fixes. Patch 5 makes the tcl recipes' musl sed safe for patch 6.I sent these results to Khem Raj & Trevor Gamblin before posting. Trevor suggested profiling the per-test durations under QEMU first; patch 1 skips the slowest test found (see "Per-test durations" below).
Where to look:
- Patch 8 works round a confirmed GCC 15+ bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127908
GCC moves the float-to-integer conversion above the range check in its inline ceil/floor/trunc, so ceil(+-inf) raisesFE_INVALID. -fno-fp-int-builtin-inexact makes GCC call libm instead.
- Patch 4 carries an lttng-tools fix under review upstream:
https://review.lttng.org/c/lttng-tools/+/18903
- Patch 6 skips binary-40.3, which expects a negative float NaN to stay negative
when widened to double. RISC-V returns the positive canonical NaN, as
the ISA
requires. Reported on an existing MIPS ticket:
https://core.tcl-lang.org/tcl/tktview/bf029ced86Testing:
- qemuriscv64: testimage of core-image-ptest-<pkg> with the autobuilder'sPTEST_RUNNER_TIMEOUTof 450 s (a test is killed after 450 s without
output),
on my machine, a Xeon E5-1680 v3 from 2014 (a plough-horse rather than a stallion). An autobuilder worker will be faster per core, but busier.
- VisionFive 2 v1.3B (JH7110, 4x U74, 8 GB): each package in core-image-minimal, ptest-runner -t 1800.package qemuriscv64 VisionFive 2 strace 1081 pass, 0 fail, 24 min 1212 pass, 0 fail python3 44546 pass, 0 fail, 71 min 44698 pass, 0 fail tcl8 152 pass, 0 fail, 10 min only failure was binary-40.3Per-test durations under QEMU (TCG), as the longest time without output is what the 450 s limit measures:
- strace (make -j4, every output line timestamped): the longest gap is 283 s,
ending with qual_fault-syscall.test, which patch 1 skips on riscv64.
Next are
filtering_syscall-syntax.test (139 s), trace_creds.gen.test (90 s) & strace--tips-full.test (65 s); the rest are under 50 s.
- python3: regrtest -j4 prints a progress line at least every 30 s, so the longest gap in the full run is around 30 s. Its slowest modules (test_concurrent_futures.test_process_pool, about 17 min, & the test_multiprocessing_* modules, 6-11 min) are made of many short cases:
run
one at a time, no single case takes over 71 s
(MiscTestCase.test_large_pool,
69-71 s in each start method). So I have not skipped anything there.
- tcl8: tcltest prints once per test file. The longest is reg.test (115 s), then regexp.test (70 s) & io.test (45 s).Still parked: tcl, lttng-tools, perl, python3-cffi, libpcap & zstd pass, but
are too slow for the 450 s limit on my machine. Under TCG (QEMU's software CPU
emulation), ptest-runner kills tcl in unicodeNormalize.test, lttng-tools intest_valid_filter, perl in t/re/regexp_qr_embed_thr (485 s alone, so perl may
pass on a faster worker) & python3-cffi, each after 450 s without output. libpcap's run-ptest prints nothing until TESTrun finishes, which takes 9.5 min
even on the board. zstd'scompression/window-resize.shexceeds the 200 s per-case limit in cli-tests.To confirm that these fail only on time, I reran them under QEMU with this series,
PTEST_RUNNER_TIMEOUT= "7200" & the cli-tests limit raised to 3600 s
(local changes, not in this series). All passed with 0 failures, as they do on
the board:zstd 43 pass 10 min libpcap 14801 pass 24 min tcl 175 test files 46 min lttng-tools 2088 pass 85 min python3-numpy 45769 pass 104 min python3-cffi 1724 pass 187 min perl 2729 pass 219 minpython3-numpy stays parked too: patch 8 fixes its only failure (72 cases of
test_unary_spurious_fpexception), but under the 450 s limit numpy 2.5.4 is killed before pytest prints its first result.glib-2.0 is left parked. It passed one run on QEMU (308 pass, 31 min) & on the
board, but it was parked for intermittent failures, which one run cannot rule
out:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=15891
https://bugzilla.yoctoproject.org/show_bug.cgi?id=16230The numpy results above are for 2.5.3, before the rebase. numpy 2.5.4 with patch 8, under QEMU with the 7200 s limit: 45993 pass, 0 fail, 87 min. One earlier 2.5.4 run had a single failure, a wall-clock check in f2py (
test_nameargspattern_backtracking) that requires a regex search to take under
0.2 s & measured 0.22 s under TCG; it passed on the rerun.OOHehir (8):
strace: skip qual_fault-syscall.test on riscv64 ptest-packagelists.inc: re-enable strace for riscv64 ptest-packagelists.inc: re-enable python3 for riscv64
lttng-tools: skip kernel cases when kernel tests are disabled tcl, tcl8: anchor the musl unixInit-3 skip to top-level SKIP lines tcl, tcl8: skip binary-40.3 on RISC-V ptest-packagelists.inc: re-enable tcl8 for riscv64
python3-numpy: call libm for ceil/floor/trunc on riscv64.../distro/include/ptest-packagelists.inc | 7 +- .../python/python3-numpy_2.5.4.bb | 5 + meta/recipes-devtools/strace/strace_7.2.bb | 12 ++ meta/recipes-devtools/tcltk/tcl/run-ptest | 5 + meta/recipes-devtools/tcltk/tcl_9.1.0.bb | 2 +- meta/recipes-devtools/tcltk8/tcl8/run-ptest | 5 + meta/recipes-devtools/tcltk8/tcl8_8.6.18.bb | 2 +- ...our-LTTNG_TOOLS_DISABLE_KERNEL_TESTS.patch | 108 ++++++++++++++++++ .../lttng/lttng-tools_2.16.0.bb | 1 + 9 files changed, 140 insertions(+), 7 deletions(-) create mode 100644
meta/recipes-kernel/lttng/lttng-tools/0001-tests-honour-LTTNG_TOOLS_DISABLE_KERNEL_TESTS.patch--
2.43.0
v3 cover riscv64 ptest fixes
In reply to OOHehirFrom: OOHehir <[email protected]>
Changes in v3:
- v2 patches 1-4 & 8 are in master; this resend carries only the tcl patches.
- Patch 1 replaces v2's anchored sed, as Ross Burton suggested: the recipes set SKIPPED_TESTS, which do_install_ptest writes into run-ptest's empty SKIP="", as python3 does. The musl unixInit-3 skip moves there.
- Patch 2 sets SKIPPED_TESTS:append:riscv32 & :riscv64 in place of v2's case on uname -m.
- Patch 3 is unchanged.
Patch 2 skips binary-40.3, which expects a negative float NaN to stay negative when widened to double. RISC-V returns the positive canonical NaN, as the ISA requires. Reported on an existing MIPS ticket:
https://core.tcl-lang.org/tcl/tktview/bf029ced86
Testing: tcl & tcl8 built to do_install_ptest_base for qemuriscv32 (glibc), qemuriscv64 (glibc & musl) & qemux86-64 (musl); each installed run-ptest passes dash/busybox -n & checkbashisms, with SKIP set to:
qemuriscv32 glibc " binary-40.3" qemuriscv64 glibc " binary-40.3" qemuriscv64 musl " unixInit-3* binary-40.3" qemux86-64 musl " unixInit-3*"
core-image-ptest-tcl8 testimage, ptest-runner -t 450 (slirp, 4 vCPUs):
qemuriscv64 152 pass, 0 fail, 614 s
qemuriscv32 152 pass, 0 fail, 686 s
Not in this series: tcl8's tcl_package_preprocess mixes tab & space indentation & passes tclConfig.sh to sed twice. I can send a cleanup if that is wanted.
v2: https://lists.openembedded.org/g/openembedded-core/message/248079
OOHehir (3):
tcl, tcl8: set override-specific ptest skips in SKIPPED_TESTS tcl, tcl8: skip binary-40.3 on RISC-V ptest-packagelists.inc: re-enable tcl8 for riscv64
meta/conf/distro/include/ptest-packagelists.inc | 4 ++-- meta/recipes-devtools/tcltk/tcl_9.1.0.bb | 15 ++++++++++----- meta/recipes-devtools/tcltk8/tcl8_8.6.18.bb | 15 ++++++++++----- 3 files changed, 22 insertions(+), 12 deletions(-)
Signature · 1 line
2.43.0
PATCH v3 1/3 tcl, tcl8: set override-specific ptest skips in SKIPPED_TESTS
In reply to OOHehirFrom: OOHehir <[email protected]>
On musl, the sed meant to add the unixInit-3 skip once added it after every SKIP="$SKIP line in run-ptest, & a skip set inside a case arm left run-ptest with a syntax error. Write SKIPPED_TESTS into run-ptest's empty SKIP="" instead, as python3 does; the common skips stay in run-ptest.
--- meta/recipes-devtools/tcltk/tcl_9.1.0.bb | 11 ++++++----- meta/recipes-devtools/tcltk8/tcl8_8.6.18.bb | 11 ++++++----- 2 files changed, 12 insertions(+), 10 deletions(-)
meta/recipes-devtools/tcltk/tcl_9.1.0.bb +6 -5
@@ -78,14 +78,15 @@ do_compile_ptest() { oe_runmake tcltest } +# Override-specific skips; do_install_ptest needs the empty SKIP="" in run-ptest +SKIPPED_TESTS = "" +# Assumes locales other than provided by musl-locales +SKIPPED_TESTS:append:libc-musl = " unixInit-3*" + do_install_ptest() { cp ${B}/tcltest ${D}${PTEST_PATH} cp -r ${S}/tests ${D}${PTEST_PATH} -} - -do_install_ptest:append:libc-musl () { - # Assumes locales other than provided by musl-locales - sed -i '/SKIP="$SKIP.*$/a # unixInit-3* is suppressed due to hardcoded locale assumptions\nSKIP="$SKIP unixInit-3\\\*"' ${D}${PTEST_PATH}/run-ptest + sed -i -e 's|^SKIP=""$|SKIP="${SKIPPED_TESTS}"|' ${D}${PTEST_PATH}/run-ptest } # Fix some paths that might be used by Tcl extensions
meta/recipes-devtools/tcltk8/tcl8_8.6.18.bb +6 -5
@@ -79,14 +79,15 @@ do_compile_ptest() { oe_runmake tcltest } +# Override-specific skips; do_install_ptest needs the empty SKIP="" in run-ptest +SKIPPED_TESTS = "" +# Assumes locales other than provided by musl-locales +SKIPPED_TESTS:append:libc-musl = " unixInit-3*" + do_install_ptest() { cp ${B}/tcltest ${D}${PTEST_PATH} cp -r ${S}/tests ${D}${PTEST_PATH} -} - -do_install_ptest:append:libc-musl () { - # Assumes locales other than provided by musl-locales - sed -i '/SKIP="$SKIP.*$/a # unixInit-3* is suppressed due to hardcoded locale assumptions\nSKIP="$SKIP unixInit-3\\\*"' ${D}${PTEST_PATH}/run-ptest + sed -i -e 's|^SKIP=""$|SKIP="${SKIPPED_TESTS}"|' ${D}${PTEST_PATH}/run-ptest } # Fix some paths that might be used by Tcl extensions
Signature · 1 line
2.43.0
PATCH v3 2/3 tcl, tcl8: skip binary-40.3 on RISC-V
In reply to OOHehirFrom: OOHehir <[email protected]>
binary-40.3 expects a negative float NaN to stay negative when widened to double. RISC-V returns the positive canonical NaN instead, as the ISA requires, so the test always fails there. Reported upstream on the matching MIPS ticket.
--- meta/recipes-devtools/tcltk/tcl_9.1.0.bb | 4 ++++ meta/recipes-devtools/tcltk8/tcl8_8.6.18.bb | 4 ++++ 2 files changed, 8 insertions(+)
meta/recipes-devtools/tcltk/tcl_9.1.0.bb +4 -0
@@ -82,6 +82,10 @@ do_compile_ptest() { SKIPPED_TESTS = "" # Assumes locales other than provided by musl-locales SKIPPED_TESTS:append:libc-musl = " unixInit-3*" +# RISC-V widens a negative float NaN to the positive canonical NaN, so the +# sign check fails: https://core.tcl-lang.org/tcl/tktview/bf029ced86 +SKIPPED_TESTS:append:riscv32 = " binary-40.3" +SKIPPED_TESTS:append:riscv64 = " binary-40.3" do_install_ptest() { cp ${B}/tcltest ${D}${PTEST_PATH}
meta/recipes-devtools/tcltk8/tcl8_8.6.18.bb +4 -0
@@ -83,6 +83,10 @@ do_compile_ptest() { SKIPPED_TESTS = "" # Assumes locales other than provided by musl-locales SKIPPED_TESTS:append:libc-musl = " unixInit-3*" +# RISC-V widens a negative float NaN to the positive canonical NaN, so the +# sign check fails: https://core.tcl-lang.org/tcl/tktview/bf029ced86 +SKIPPED_TESTS:append:riscv32 = " binary-40.3" +SKIPPED_TESTS:append:riscv64 = " binary-40.3" do_install_ptest() { cp ${B}/tcltest ${D}${PTEST_PATH}
Signature · 1 line
2.43.0
PATCH v3 3/3 ptest-packagelists.inc: re-enable tcl8 for riscv64
In reply to OOHehirFrom: OOHehir <[email protected]>
The previous commit skips binary-40.3, its only failure on riscv64. core-image-ptest-tcl8 on qemuriscv64: 152 pass, 0 fail, 607 s. On a VisionFive 2 (JH7110), binary-40.3 was the only failure.
tcl stays parked: under TCG, unicodeNormalize.test prints nothing for more than 450 s & ptest-runner kills it. The binary-40.3 skip still helps tcl on hardware.
--- meta/conf/distro/include/ptest-packagelists.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/conf/distro/include/ptest-packagelists.inc +2 -2
@@ -164,8 +164,8 @@ PTESTS_PROBLEMS:append:riscv32 = " lttng-tools strace" PTESTS_SLOW:append:libc-musl = " libc-test" # These tests don't yet pass for riscv64 -PTESTS_SLOW:remove:riscv64 = "tcl tcl8 python3-cffi lttng-tools python3-numpy perl glib-2.0 zstd libpcap" -PTESTS_PROBLEMS:append:riscv64 = " tcl tcl8 python3-cffi lttng-tools python3-numpy perl glib-2.0 zstd libpcap" +PTESTS_SLOW:remove:riscv64 = "tcl python3-cffi lttng-tools python3-numpy perl glib-2.0 zstd libpcap" +PTESTS_PROBLEMS:append:riscv64 = " tcl python3-cffi lttng-tools python3-numpy perl glib-2.0 zstd libpcap" # These tests don't yet pass for musl qemuarm64 PTESTS_SLOW:remove:libc-musl:qemuarm64 = "strace perl gnutls glib-2.0"
Signature · 1 line
2.43.0