Ignore exit-code 23 when we expect a daemon-excluded file to be excluded.
[rsync.git] / testsuite / rsync.fns
index 926a42e544c2313fabf400d4e83caebc7d3a90cb..ac7920da7dc6d0760b54bc89129836e4e0c830b2 100644 (file)
@@ -256,6 +256,25 @@ gid = 0
        path = $scratchdir
        read only = no
 EOF
+
+    # Build a helper script to ignore exit code 23
+    ignore23="$scratchdir/ignore23"
+    echo "building help script $ignore23"
+
+    cat >"$ignore23" <<'EOT'
+if "${@}"; then
+    exit
+fi
+
+ret=$?
+
+if test $ret = 23; then
+    exit
+fi
+
+exit $ret
+EOT
+chmod +x "$ignore23"
 }