On 10 May 2026, at 09:04, Jhonata Poma-Hansen <[email protected]> wrote: > > Wire up upstream's runtests.py testsuite as a ptest package. The > testsuite runs rsync itself through 49 entries (41 PASS + 8 SKIP) > covering ACLs, xattrs, device nodes, hardlinks, symlinks, daemon > mode, filters, backup, batch, etc., including 3 CHECK_SYMLINKS > variants (chown-fake, devices-fake, xattrs-hlink).
Reading the commit log here makes me wonder if this should have an AI-assisted tag. Was this commit aided by an AI agent? > diff --git a/meta/recipes-devtools/rsync/files/run-ptest > b/meta/recipes-devtools/rsync/files/run-ptest > new file mode 100644 > index 0000000000..09678bf82e > --- /dev/null > +++ b/meta/recipes-devtools/rsync/files/run-ptest > @@ -0,0 +1,25 @@ > +#!/bin/sh > +cd "$(dirname "$0")" > + > +# runtests.py honours the same legacy environment variables that runtests.sh > +# (its predecessor, removed in rsync 3.4.2) used: Irrelevant background as we’re starting by invoking runtests.py. > +# rsync emits "PASS name", "FAIL name", "SKIP name (reason)", > +# "XFAIL name"; ptest-runner expects "PASS: name" / "FAIL: name" / > +# "SKIP: name". Transform on the fly. XFAIL is rsync's "expected fail" > +# and is counted as failure upstream, but it is a known-bad test and not > +# a regression, so report it as SKIP here so ptest does not fail on it. ptest-runner supports XFAIL and they’re not considered failures, so I’m not sure what you mean here. > + # Tests consume a handful of named source leaves via $srcdir: > + # *.c - hands_setup uses `cat $srcdir/*.c` as a text corpus > + # rsync.h - mkpath.test, itemize.test > + # configure.ac - itemize.test > + # config.sub - itemize.test > + # wildtest.txt - wildmatch.test > + # (Enumerated explicitly rather than globbed so future rsync releases > + # that add/rename top-level files don't silently change the ptest > + # package contents.) The comment says “enumerated explicitly” but then uses globs. > +# hardlinks.test ends with a single-directory transfer > +# > +# makepath "$fromdir/sym" "$todir" > +# checkit "$RSYNC -aH '$fromdir/sym' '$todir'" "$fromdir" "$todir" > +# > +# whose dir-diff phase compares the root mtime of $fromdir vs $todir. > +# makepath creates both at the same wall-clock instant, but $todir's root > +# mtime then gets re-bumped when rsync places sym/ inside it. On fast > +# targets the whole sequence finishes within a single second so the two > +# mtimes match; on slow emulated targets (qemuriscv64 in particular) the > +# $todir root ends up 1 second ahead of $fromdir, which the test treats > +# as a failure even though rsync's hardlink handling itself works > +# correctly. Replace the test with a SKIP stub on riscv where this race > +# is consistently triggered. Tracked at: YOCTO #16211. This sounds like an interesting way to get random failures on every system and is just more common on slower machines, please file a bug upstream about this. As I’ve said before on this list, ptests are primarily for integration testing. The maintainer overhead of 100+ lines of fragile shell/make to build and install a test suite that doesn’t want to be installed does need to be weighed against the benefit of having the tests. There’s a strong case to be made for picking a very small subset of the rsync tests and running just those in the ptest. Ross
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#237455): https://lists.openembedded.org/g/openembedded-core/message/237455 Mute This Topic: https://lists.openembedded.org/mt/119239446/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
