Files
rsync/testsuite/exitcodes.py
Andrew Tridgell e16a001d39 testsuite/runtests: count XFAIL (exit 78) as expected, not a failure
The regression tests use test_xfail() (exit 78) to assert a known, documented
residual on platforms where the fix can't apply -- e.g. link-dest-relative-basis
XFAILs where the receiver has no openat2/O_RESOLVE_BENEATH and the portable
resolver rejects the '..' for safety.  runtests.py counted exit 78 in the
generic else->failed branch, so a bare XFAIL failed the whole suite; tally it
separately ('N xfailed (expected)') and exclude it from the failure exit code.
Also add --race-timeout plumbing (race_timeout env) for race tests.
2026-06-04 06:09:25 +10:00

18 lines
601 B
Python

"""Exit codes a test reports to runtests.py (autotools test convention).
Shared by runtests.py (the harness, which reads these from each test) and
rsyncfns.py (the helpers, which exit with them) so the 0/1/2/77/78 values are
named in exactly one place. This module has no import-time side effects, so
runtests.py can import it without pulling in rsyncfns's environment checks.
"""
import enum
class Exit(enum.IntEnum):
PASS = 0
FAIL = 1
ERROR = 2 # the test could not run (e.g. missing environment)
SKIP = 77
XFAIL = 78 # expected failure: a known, documented residual