#!/usr/bin/env python3 # Python rewrite of testsuite/daemon.test. # # Basic daemon-mode operations against an in-process rsyncd: list # modules, list a hidden module, list a single-glob match, and the # atimes-format variant. We avoid actually starting a listening server # by using RSYNC_CONNECT_PROG to spawn the daemon as a child of rsync. # Rerun under the fleet harness's non-root pass (testsuite/fleettest.py): a # non-root rsyncd emits different uid/gid config, so exercise that path too. fleet_nonroot = True import os import subprocess from rsyncfns import ( CHKFILE, FROMDIR, OUTFILE, RSYNC, RSYNC_PEER, SCRATCHDIR, SRCDIR, TODIR, build_rsyncd_conf, get_rootuid, get_testuid, makepath, rsync_argv, run_rsync, start_test_daemon, test_fail, ) DAEMON_PORT = 12877 SSH = f"{SRCDIR / 'support' / 'lsh.sh'} --no-cd" def listed_paths(text: str) -> set: """The set of path names in an `rsync -r` listing. Each listing line is "