@@ -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 \
@@ -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
@@ -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/
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> --- .../distro/include/ptest-packagelists.inc | 2 +- .../recipes-support/liburcu/liburcu/run-ptest | 21 ++++++++++++++----- .../recipes-support/liburcu/liburcu_0.15.6.bb | 12 ++++++++++- 3 files changed, 28 insertions(+), 7 deletions(-)