Skip to content

Consolidate examples/, rename executables + library target#207

Merged
josephnef merged 2 commits into
masterfrom
examples-refactor
Jul 6, 2026
Merged

Consolidate examples/, rename executables + library target#207
josephnef merged 2 commits into
masterfrom
examples-refactor

Conversation

@josephnef

Copy link
Copy Markdown
Collaborator

What

Three long-standing paper cuts, fixed in one clean break (no back-compat aliases):

1. One examples/ tree instead of three demo directories. demo/, txdemo/, and examples/ collapse into a single examples/, one directory per demo, with examples/common/ holding the shared stream_stdin.h framing + its selftest. All moves are git mv (history preserved).

2. Short executable names. The old names overflowed the kernel's 15-char comm limit — pkill -x WiFiDriverTxDemo (16 chars) was a silent no-op, and we've burned real debugging time on the truncated-comm workarounds scattered through the test scripts.

old new
WiFiDriverDemo / WiFiDriverTxDemo rxdemo / txdemo
StreamTxDemo / StreamDuplexDemo streamtx / duplex
SvcTxDemo / PrecoderDemo svctx / precoder
TxPowerStepDemo / WiFiSenseDemo txpower / sense

Every truncated workaround form (WiFiDriverTxDem, StreamDuplexD, StreamTxDem, …) is gone, including one latent bug: eu_kernel_baseline.sh ran pkill -x WiFiDriverDe, which matched nothing, ever. Selftest targets keep their names (ctest-only, never pkill targets).

3. Library target says what it is. CMake target + project() renamed WiFiDriverdevourer; link with devourer, archive is libdevourer.a. The WiFiDriver.h header and WiFiDriver class are unchanged — source-level consumers don't change a line.

All ~400 references across tests/, tools/, docs/, README, CLAUDE.md, and the CI workflow are updated in this one commit.

Validation

  • Fresh full build (all chips) — all 8 example binaries + libdevourer.a; ctest 10/10
  • Two gated per-chip configs (jaguar1-only; no-jaguar2) build + ctest green
  • The mingw CI job's exact target list resolves locally
  • Leftover grep: zero hits for old names / truncated forms / stale paths; remaining WiFiDriver occurrences are the class/header only
  • bash -n all test scripts, py_compile all python
  • On-air: txdemo → kernel RX 7119/7500 hits ✓; devourer/devourer rxdemo+txdemo 8000/8000 hits ✓ (8822CU→8812EU, ch36)

Note for downstream

Old-name binaries linger in stale build dirs — do a clean build, or a running stale WiFiDriverDemo will dodge pkill -x rxdemo.

🤖 Generated with Claude Code

josephnef and others added 2 commits July 6, 2026 20:40
Three long-standing paper cuts in one clean break:

- demo/, txdemo/, examples/ collapse into a single examples/ tree,
  one directory per demo (rx, tx, streamtx, duplex, svctx, precoder,
  txpower, sense, common for the shared stream_stdin.h framing).
- Executables get short lowercase names: rxdemo, txdemo, streamtx,
  duplex, svctx, precoder, txpower, sense. The old names overflowed
  the kernel's 15-char comm limit (WiFiDriverTxDemo = 16 chars), so
  `pkill -x WiFiDriverTxDemo` was a silent no-op — every truncated
  workaround form (WiFiDriverTxDem, StreamDuplexD, ...) in the test
  scripts is gone, including one pkill that never matched anything
  (WiFiDriverDe in eu_kernel_baseline.sh).
- CMake library target WiFiDriver -> devourer (and project() likewise);
  the WiFiDriver.h header and class are unchanged, so source-level
  consumers are untouched. Link with `devourer`, find the archive at
  libdevourer.a.

Selftest targets keep their names (ctest-only, never pkill targets).
Stale build dirs keep old-name binaries around — do a clean build.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@josephnef josephnef merged commit d1f4fef into master Jul 6, 2026
17 checks passed
@josephnef josephnef deleted the examples-refactor branch July 6, 2026 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant