The hyprland IPC fixture was no longer used by the current test setup.
I removed the dead fixture so the test code reflects the actual execution path
and is easier to maintain.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
Hyprland tests did not explicitly verify descriptor behavior on key failure
paths.
I added focused tests for missing instance signature and connect-failure paths
that assert file descriptor counts stay stable across repeated attempts.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
Hyprland IPC had fd lifecycle risks on failure/shutdown paths and used a
spin-sleep listener model.
I initialized fd state defensively, tightened connect/close/shutdown handling,
moved to blocking read with newline framing, and added RAII-style fd cleanup in
socket1 reply paths.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
SafeSignal could queue events forever when worker threads emitted faster than
the main loop could consume, which risks memory growth and stale updates.
I added a queue cap with a drop-oldest policy so growth stays bounded under
burst load, plus a regression test that validates bounded delivery.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
SleeperThread concurrency paths needed stress coverage around wake/stop races.
I added a subprocess stress test that repeatedly interleaves wake_up() and
stop() and verifies the worker exits cleanly.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
SleeperThread control flags were shared across threads without consistent
synchronization.
I converted the run/signal flags to atomics and updated wait predicates and
lifecycle transitions to use explicit atomic loads/stores.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
We needed a regression test for reassignment safety after lifecycle fixes.
I added a subprocess test that reassigns SleeperThread workers and verifies the
process exits normally instead of terminating.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
Reassigning SleeperThread could replace a joinable std::thread and trigger
std::terminate.
I now stop and join any existing worker before reassignment, then reset control
state before starting the replacement worker.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
- Fix AudioBackend destructor: properly lock the PA mainloop before
disconnecting the context to prevent race conditions with PA callbacks
- Fix context leak on reconnect: call pa_context_unref() when the old
context is replaced after PA_CONTEXT_FAILED to avoid resource leaks
- Fix PA mainloop killed on reconnect (critical): PA_CONTEXT_TERMINATED
was unconditionally calling quit() on the mainloop, even during
reconnection when the old context fires TERMINATED after the new one
was created. This was killing the new context and preventing successful
reconnection, causing Waybar to appear frozen. The fix only quits
the mainloop when the terminating context is still the active one.
- Fix Wireplumber use-after-free: explicitly disconnect GObject signal
handlers for mixer_api_, def_nodes_api_, and om_ before clearing the
object references in the destructor to prevent callbacks from firing
with a destroyed self pointer.
- Fix GVariant memory leak in Wireplumber::handleScroll: unref the
GVariant created for the set-volume signal after the emit call.
Co-authored-by: Alexays <13947260+Alexays@users.noreply.github.com>
Don't attempt to use niri modules when socket connection fails. Prevents
rendering modules when running another compositor. In same concept as
previous Hyprland change
4295faa7c4
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>