806faea7
test: e2e isolates XDG_RUNTIME_DIR, so the default socket is hermetic
a73x 2026-09-01 15:00
Commit message
test/e2e_lib.sh
| Old | New | ||
|---|---|---|---|
| @@ -146,7 +146,16 @@ defer_rm "$XDG_STATE_HOME" | |||
| 146 | # touch the developer's real ~/.cache/mux. | 146 | # touch the developer's real ~/.cache/mux. |
| 147 | XDG_CACHE_HOME="${TMPDIR:-/tmp}/mux-e2e-cache-$$" | 147 | XDG_CACHE_HOME="${TMPDIR:-/tmp}/mux-e2e-cache-$$" |
| 148 | defer_rm "$XDG_CACHE_HOME" | 148 | defer_rm "$XDG_CACHE_HOME" |
| 149 | export XDG_CONFIG_HOME XDG_STATE_HOME XDG_CACHE_HOME | 149 | # And XDG_RUNTIME_DIR, which is not a home but names the DEFAULT SOCKET: |
| 150 | # every leg here spells --sock, but a leg with a bug in it does not — the | ||
| 151 | # 16_push group's first RED run sent `d upgrade` to the developer's LIVE | ||
| 152 | # daemon at /run/user/*/muxd.sock, and only the version rule stood between | ||
| 153 | # that and an e2e Debug build exec'd over their sessions. Isolated, a stray | ||
| 154 | # default dial reads "nothing listening" instead of someone's real daemon. | ||
| 155 | XDG_RUNTIME_DIR="${TMPDIR:-/tmp}/mux-e2e-run-$$" | ||
| 156 | mkdir -p "$XDG_RUNTIME_DIR" | ||
| 157 | defer_rm "$XDG_RUNTIME_DIR" | ||
| 158 | export XDG_CONFIG_HOME XDG_STATE_HOME XDG_CACHE_HOME XDG_RUNTIME_DIR | ||
| 150 | # ...and the same argument for $SHELL, which is not an XDG home but is read | 159 | # ...and the same argument for $SHELL, which is not an XDG home but is read |
| 151 | # the same way: every daemon this suite AUTO-STARTS gets no --shell flag and | 160 | # the same way: every daemon this suite AUTO-STARTS gets no --shell flag and |
| 152 | # resolves $SHELL, so without this the suite runs the developer's login | 161 | # resolves $SHELL, so without this the suite runs the developer's login |