test: harden malformed client handling

This commit is contained in:
Samuel Onoja committed 2026-09-25 04:39:52 +01:00
1 parent 07de17a399
commit d18d5b5fc4
9 files changed
+380 -15

No files matched your search

+7
View File
@@ -6,6 +6,7 @@ soak_seconds="${FERESE_SOAK_SECONDS:-86400}"
iteration_delay="${FERESE_SOAK_DELAY:-0.15}"
client_program="${FERESE_SOAK_CLIENT:-foot}"
feresectl_program="${FERESECTL:-target/debug/feresectl}"
malformed_client_program="${FERESE_MALFORMED_CLIENT:-target/debug/ferese-malformed-client}"
compositor_pid="${FERESE_PID:-}"
log_path="${FERESE_SOAK_LOG:-/tmp/ferese-soak-$$.log}"
@@ -23,6 +24,10 @@ if [[ ! -x "$feresectl_program" ]]; then
cargo build -p feresectl
fi
if [[ ! -x "$malformed_client_program" ]]; then
cargo build -p ferese-malformed-client
fi
if ! command -v "$client_program" >/dev/null 2>&1; then
echo "soak client not found: $client_program" >&2
exit 2
@@ -135,6 +140,8 @@ while ((SECONDS < deadline)); do
launch_client
wait_for_focus
kill -TERM "${client_pids[-1]}" 2>/dev/null || true
"$malformed_client_program" >>"$log_path" 2>&1
control get-outputs
fi
reap_clients