]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
liburcu: ptest: add regression test suite
authorPratik Farkase <pratik.farkase@est.tech>
Fri, 8 May 2026 13:16:15 +0000 (15:16 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 5 Jun 2026 14:50:14 +0000 (15:50 +0100)
Add the upstream regression tests to the existing ptest for full
coverage of both unit and regression suites:

- rcutorture stress/perf tests across all RCU flavors (membarrier,
mb, bp, qsbr) with global, per-cpu, and per-thread configurations
- test_urcu_fork and test_urcu_fork_cxx for fork+RCU interaction

Move liburcu from PTESTS_FAST to PTESTS_SLOW as the regression tests
add ~6 minutes of runtime (total 379s).

Tested on qemux86-64 with ptest-runner: 122 PASS, 0 FAIL (379s).

Signed-off-by: Pratik Farkase <pratik.farkase@est.tech>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/conf/distro/include/ptest-packagelists.inc
meta/recipes-support/liburcu/liburcu/run-ptest
meta/recipes-support/liburcu/liburcu_0.15.6.bb

index ccac8e3bb3fff02e862ac11edfe176bd0fa3df56..66b7f10acf4f7b8ac4e402c91e7bb3144e793849 100644 (file)
@@ -51,7 +51,6 @@ PTESTS_FAST = "\
     libtest-warnings-perl \
     libtimedate-perl \
     libtry-tiny-perl \
-    liburcu \
     libusb1 \
     libxml-namespacesupport-perl \
     libxml-parser-perl \
@@ -134,6 +133,7 @@ PTESTS_SLOW = "\
     libmodule-build-perl \
     libpng \
     ${@bb.utils.contains('DISTRO_FEATURES', 'seccomp', 'libseccomp', '',d)} \
+    liburcu \
     lttng-tools \
     lz4 \
     openssh \
index 5f8fb4fcfe67f2716d82b28047d674600c3fbc0d..7dd1ee45e2d3093a5369ca498d7cc7c2f0f68e84 100755 (executable)
@@ -1,17 +1,28 @@
 #!/bin/sh
 
 PTEST_PATH=$(dirname "$0")
-cd "$PTEST_PATH/tests/unit" || exit 1
+cd "$PTEST_PATH" || exit 1
 
 export URCU_TESTS_SRCDIR="$PTEST_PATH/tests"
 export URCU_TESTS_BUILDDIR="$PTEST_PATH/tests"
 export URCU_TESTS_OS_TYPE="linux"
 
-for test in $(find . -maxdepth 1 -type f -executable -name "test_*" | sort); do
+# Unit tests
+for test in $(find tests/unit -maxdepth 1 -type f -executable -name "test_*" | sort); do
     testname=$(basename "$test")
-    if ./"$test"; then
-        echo "PASS: $testname"
+    if ./"$test" 2>&1; then
+        echo "PASS: unit/$testname"
     else
-        echo "FAIL: $testname"
+        echo "FAIL: unit/$testname"
+    fi
+done
+
+# Regression tests
+for test in $(find tests/regression -maxdepth 1 -type f -name "*.tap" -executable | sort); do
+    testname=$(basename "$test" .tap)
+    if ./"$test" 2>&1; then
+        echo "PASS: regression/$testname"
+    else
+        echo "FAIL: regression/$testname"
     fi
 done
index e02f797041882ab3d730f41d8f7d8c21163bc529..0883c6d031a92b7f1a719a0e23eb5b24770a4913 100644 (file)
@@ -22,7 +22,7 @@ inherit autotools multilib_header ptest
 
 CPPFLAGS:append:riscv64  = " -pthread -D_REENTRANT"
 
-RDEPENDS:${PN}-ptest += "bash"
+RDEPENDS:${PN}-ptest += "bash coreutils"
 
 do_install:append() {
     oe_multilib_header urcu/config.h
@@ -30,6 +30,7 @@ do_install:append() {
 
 do_compile_ptest() {
     oe_runmake -C ${B}/tests/unit check TESTS=
+    oe_runmake -C ${B}/tests/regression check TESTS=
 }
 
 do_install_ptest() {
@@ -45,6 +46,15 @@ do_install_ptest() {
     install -m 0755 ${S}/tests/unit/test_get_max_cpuid_from_sysfs ${D}${PTEST_PATH}/tests/unit/
     install -m 0755 ${S}/tests/unit/test_get_max_cpuid_from_sysfs_cxx ${D}${PTEST_PATH}/tests/unit/
 
+    install -d ${D}${PTEST_PATH}/tests/regression
+
+    find ${B}/tests/regression -maxdepth 1 -type f -executable \
+        ! -name "*.la" | while read -r t; do
+        ${B}/libtool --mode=install install -m 0755 "$t" ${D}${PTEST_PATH}/tests/regression/
+    done
+
+    install -m 0755 ${S}/tests/regression/*.tap ${D}${PTEST_PATH}/tests/regression/
+
     install -d ${D}${PTEST_PATH}/tests/utils
     install -m 0644 ${S}/tests/utils/tap.sh ${D}${PTEST_PATH}/tests/utils/
     install -m 0644 ${S}/tests/utils/utils.sh ${D}${PTEST_PATH}/tests/utils/