From 88b4d77b18afa997ef7df52f68655e733ab77305 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 27 Jun 2026 20:13:05 +1000 Subject: [PATCH] testsuite: fall back to the static contract when the 3.2.7 oracle can't exec daemon-symlink-escape-matrix prefers the in-tree old_versions/rsync_3.2.7 as its legacy oracle, but that is a Linux x86-64 static binary. On a full checkout (the per-platform CI runners) it is present yet cannot exec on a BSD/macOS/Solaris host, so start_test_daemon() crashed with OSError ENOEXEC and failed the test. (The git-archive fleet never hit this: .gitattributes export-ignores old_versions/, so the binary is absent there and the test already took its static-contract path.) Probe the selected oracle binary (rsync --version) and degrade to the static contract on any OSError, the same path used when no oracle binary is present. --- testsuite/daemon-symlink-escape-matrix_test.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/testsuite/daemon-symlink-escape-matrix_test.py b/testsuite/daemon-symlink-escape-matrix_test.py index 4c092d41..75d94677 100644 --- a/testsuite/daemon-symlink-escape-matrix_test.py +++ b/testsuite/daemon-symlink-escape-matrix_test.py @@ -78,6 +78,16 @@ if RSYNC_PEER != RSYNC: elif (_repo / 'old_versions' / 'rsync_3.2.7').is_file(): ORACLE_BIN = str(_repo / 'old_versions' / 'rsync_3.2.7') +# The in-tree oracle is a Linux x86-64 static binary, so on a non-Linux runner +# (BSD/macOS/Solaris) it is present but cannot exec. Probe it and degrade to the +# static contract on any exec failure rather than crashing with ENOEXEC. +if ORACLE_BIN: + try: + subprocess.run([ORACLE_BIN, '--version'], + stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, timeout=15) + except OSError: + ORACLE_BIN = None + TYPES = ('rel-within', 'rel-outside', 'rel-transits', 'abs-outside', 'abs-inside') OUTSIDE = {'rel-outside', 'abs-outside'} VECTORS = ('read', 'write', 'read-plain', 'write-plain', 'compare-dest')