* [OE-core][master][PATCH v2] rsync: add ptest support
@ 2026-06-02 12:01 Nikhil R
2026-06-03 6:01 ` Mathieu Dubois-Briand
0 siblings, 1 reply; 2+ messages in thread
From: Nikhil R @ 2026-06-02 12:01 UTC (permalink / raw)
To: openembedded-core; +Cc: Nikhil R
Package the upstream rsync testsuite and helper binaries
into rsync-ptest package and add a run-ptest wrapper for
executing the tests.
backup.test is skipped due to intermittent failures
observed on qemux86-64.
The issue has been reported upstream:
https://github.com/RsyncProject/rsync/issues/941
Tested on qemux86-64 using ptest-runner with all
executed tests passing.
Signed-off-by: Nikhil R <nikhilar2410@gmail.com>
---
.../distro/include/ptest-packagelists.inc | 1 +
meta/recipes-devtools/rsync/files/run-ptest | 17 +++++++
meta/recipes-devtools/rsync/rsync_3.4.2.bb | 46 ++++++++++++++++++-
3 files changed, 63 insertions(+), 1 deletion(-)
create mode 100644 meta/recipes-devtools/rsync/files/run-ptest
diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
index 50b6a8a41e..40af77a697 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -95,6 +95,7 @@ PTESTS_FAST = "\
qemu \
quilt \
rpm-sequoia \
+ rsync \
sed \
slang \
utfcpp \
diff --git a/meta/recipes-devtools/rsync/files/run-ptest b/meta/recipes-devtools/rsync/files/run-ptest
new file mode 100644
index 0000000000..762efd23a3
--- /dev/null
+++ b/meta/recipes-devtools/rsync/files/run-ptest
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+cd $(dirname $0)
+
+# backup.test intermittently fails on qemux86-64
+# (observed ~5 failures in 20 runs).
+# Upstream: https://github.com/RsyncProject/rsync/issues/941
+TESTS=$(cd testsuite && \
+ ls *.test | \
+ sed 's/\.test$//' | \
+ grep -v '^backup$')
+
+python3 runtests.py \
+ --rsync-bin=/usr/bin/rsync \
+ --tooldir=$(pwd) \
+ --srcdir=$(pwd) \
+ $TESTS
diff --git a/meta/recipes-devtools/rsync/rsync_3.4.2.bb b/meta/recipes-devtools/rsync/rsync_3.4.2.bb
index 5fe1bc2c2b..29f89284fb 100644
--- a/meta/recipes-devtools/rsync/rsync_3.4.2.bb
+++ b/meta/recipes-devtools/rsync/rsync_3.4.2.bb
@@ -15,12 +15,18 @@ SRC_URI = "https://download.samba.org/pub/${BPN}/src/${BP}.tar.gz \
file://makefile-no-rebuild.patch \
file://determism.patch \
file://0001-Add-missing-prototypes-to-function-declarations.patch \
+ file://run-ptest \
"
SRC_URI[sha256sum] = "ff10aa2c151cd4b2dbbe6135126dbc854046113d2dfb49572a348233267eb315"
+RDEPENDS:${PN}-ptest += "\
+ python3-core \
+ python3-asyncio \
+ bash \
+"
# Out-of-tree builds don't install the documentation currently
# https://github.com/RsyncProject/rsync/issues/846
-inherit autotools-brokensep
+inherit autotools-brokensep ptest
PACKAGECONFIG ??= "acl attr \
${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \
@@ -62,6 +68,44 @@ do_install:append() {
install -m 0644 ${UNPACKDIR}/rsyncd.conf ${D}${sysconfdir}
}
+# Avoid "make check" since it executes the testsuite during the build.
+# Only build the helper binaries required by the ptest package.
+do_compile_ptest() {
+ oe_runmake \
+ tls \
+ getgroups \
+ getfsdev \
+ testrun \
+ trimslash \
+ t_unsafe \
+ wildtest \
+ simdtest
+}
+
+do_install_ptest() {
+ install -d ${D}${PTEST_PATH}
+ install -d ${D}${PTEST_PATH}/support
+ cp -r ${S}/support/* ${D}${PTEST_PATH}/support/
+
+ # Several upstream tests access files directly from ${srcdir}
+ # (e.g. fuzzy.test, itemize.test, mkpath.test and wildmatch.test).
+ install -m 0644 ${S}/configure.ac ${D}${PTEST_PATH}/
+ install -m 0644 ${S}/rsync.c ${D}${PTEST_PATH}/
+ install -m 0644 ${S}/rsync.h ${D}${PTEST_PATH}/
+ install -m 0644 ${S}/wildtest.txt ${D}${PTEST_PATH}/
+
+ install -m 0755 ${S}/runtests.py ${D}${PTEST_PATH}/
+ install -m 0644 ${B}/config.h ${D}${PTEST_PATH}/
+ install -m 0644 ${S}/config.sub ${D}${PTEST_PATH}/
+
+ cp -r ${S}/testsuite ${D}${PTEST_PATH}/
+
+ for p in tls getgroups getfsdev testrun trimslash t_unsafe wildtest simdtest; do
+ install -m 0755 ${B}/$p ${D}${PTEST_PATH}/
+ done
+
+}
+
BBCLASSEXTEND = "native nativesdk"
CVE_STATUS[CVE-2024-12084] = "fixed-version: fixed since v3.4.0"
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-06-03 6:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-02 12:01 [OE-core][master][PATCH v2] rsync: add ptest support Nikhil R
2026-06-03 6:01 ` Mathieu Dubois-Briand
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.