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..86d414829b 100644
--- a/meta/recipes-devtools/rsync/rsync_3.4.2.bb
+++ b/meta/recipes-devtools/rsync/rsync_3.4.2.bb
@@ -15,12 +15,17 @@ 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 \
+    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 +67,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"
