Commit graph Crafter.Debug/tests/ShouldServeOverQuic/main.cpp
Author SHA1 Message Date
5d34df7afb
fix(cli): print lldb by its path, and report a held app as held
Tried on the example with the app's sandbox, two things were wrong:
- `debugger` printed `flatpak enter <id> lldb -p <pid>`, and flatpak
  enter runs a command without the sandbox's PATH, which /app/bin is
  on: "Failed to execute child process lldb". It now prints the path
  it found, /app/bin/lldb, which attached, listed threads and detached.
- With the app held by that debugger, the handshake times out, and
  the client said "cannot reach basic on port ..." and exited 3, no
  instance, though its lock said it lived. It now says the app is
  alive but not answering, stopped in a debugger or hung, prints how
  to attach, check and end it, and exits 5.

Environment::haveLldb becomes lldb, the path or empty. ShouldServeOverQuic
covers the second with an instance whose lock is held and whose port
is silent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 03:21:41 +01:00
fbb5809aea
test(transport): drive a listening session over loopback
ShouldServeOverQuic runs a Session that listens for real and reaches it
with the client's own transport. It covers:
- the discovery record, and its removal when the Session ends;
- status, call, a mistyped command, get and set, and log --follow
  streaming as entries are logged and ending on time;
- six clients at once, and eight streams at once on one connection;
- a wrong token, a request that isn't JSON, and one over 1 MiB, each
  answered with an error;
- ending the Session with a follower waiting, which is told "shutting
  down" and is not sent a backlog it asked none of;
- a client finding the port dead in milliseconds.

The shutdown reply went missing in 4 runs of 30 until Crafter.Network's
~ClientQUIC let stopped streams finish before closing; 50 of 50 pass
since.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 03:07:09 +01:00