|
| 1 | +# TEST-NEEDS.md — modshells |
| 2 | + |
| 3 | +> Generated 2026-03-29 by punishing audit. |
| 4 | +
|
| 5 | +## Current State |
| 6 | + |
| 7 | +| Category | Count | Notes | |
| 8 | +|-------------|-------|-------| |
| 9 | +| Unit tests | 1 | tests/test_shell_manager.adb | |
| 10 | +| Integration | 1 | tests/smoke_test.sh | |
| 11 | +| E2E | 0 | None | |
| 12 | +| Benchmarks | 0 | None | |
| 13 | + |
| 14 | +**Source modules:** 7 Ada source files: config_store (adb+ads), modshells main (adb), shell_manager (adb+ads), shell_validator (adb+ads). |
| 15 | + |
| 16 | +## What's Missing |
| 17 | + |
| 18 | +### P2P (Property-Based) Tests |
| 19 | +- [ ] Config store: property tests for config read/write roundtrip |
| 20 | +- [ ] Shell validator: arbitrary shell path/config validation |
| 21 | +- [ ] Shell manager: property tests for shell registration/deregistration invariants |
| 22 | + |
| 23 | +### E2E Tests |
| 24 | +- [ ] Full lifecycle: register shell -> configure -> validate -> switch -> use -> deregister |
| 25 | +- [ ] Multi-shell: register multiple shells, switch between them, verify isolation |
| 26 | +- [ ] Config persistence: save config -> restart -> verify restored |
| 27 | + |
| 28 | +### Aspect Tests |
| 29 | +- **Security:** No tests for shell path injection, config file tampering, privilege escalation through shell switching |
| 30 | +- **Performance:** No shell switching latency benchmarks |
| 31 | +- **Concurrency:** No tests for concurrent shell operations |
| 32 | +- **Error handling:** No tests for invalid shell paths, corrupted config, missing shell binaries |
| 33 | + |
| 34 | +### Build & Execution |
| 35 | +- [ ] GNAT compilation |
| 36 | +- [ ] Ada test runner (AUnit or similar) |
| 37 | +- [ ] Smoke test execution |
| 38 | + |
| 39 | +### Benchmarks Needed |
| 40 | +- [ ] Shell switching time |
| 41 | +- [ ] Config load/save time |
| 42 | +- [ ] Shell validation throughput |
| 43 | + |
| 44 | +### Self-Tests |
| 45 | +- [ ] Shell binary existence verification |
| 46 | +- [ ] Config file integrity check |
| 47 | + |
| 48 | +## Priority |
| 49 | + |
| 50 | +**HIGH.** 7 source files with 1 unit test and 1 smoke test. Shell management is security-sensitive (shell injection, privilege). The shell_validator and config_store both lack any tests. The smoke test covers only the happy path. |
| 51 | + |
| 52 | +## FAKE-FUZZ ALERT |
| 53 | + |
| 54 | +- `tests/fuzz/placeholder.txt` is a scorecard placeholder inherited from rsr-template-repo — it does NOT provide real fuzz testing |
| 55 | +- Replace with an actual fuzz harness (see rsr-template-repo/tests/fuzz/README.adoc) or remove the file |
| 56 | +- Priority: P2 — creates false impression of fuzz coverage |
0 commit comments