test(ble,crypto): GATT descriptor fuzz + conn-param boundary + crypto KAT determinism (P2-14/P1-11)
P2-14 — test/ble/test_gatt_fuzz_ext/: 28 tests in two sections.
Section 1 (9 tests): GATT descriptor access behavioral tests for the three
descriptor callbacks (accessReportRefInput, accessReportRefOutput, accessPresFormat)
in nimble_host_raw.cpp. Inline copies verify correct static payloads ({0x01,0x01},
{0x01,0x02}, 7-byte battery PresFormat) and that no callback dereferences om_data
on a WRITE op. Three source-scan assertions confirm the production callbacks are
safe in the same way.
Section 2 (19 tests): conn-param boundary fuzz extending test_conn_params_policy
with exact floor/ceiling values for each E6 parameter (interval 6/60, latency 30,
timeout 100/600), one-unit over/under boundary cases, zero-value edge cases
(zero interval, zero timeout, all-zeros tuple), UINT16_MAX adversarial inputs,
and clampToPolicy idempotency for renegotiate cases.
MTU negotiation skipped: s_mtu is written directly in the BLE_GAP_EVENT_MTU
handler with no pure policy function — device-only.
P1-11 — test/crypto/test_crypto_selftest/: 6 tests.
cryptoSelftest::run() is guarded by #ifdef ESP_PLATFORM (uses
platform/serial_transport.h + psa/crypto.h headers); the run()/runAndReport()
functions are device-only — HIL route is the CRYPTOKAT serial command
(qa/tests/hardware/test_crypto.py).
This suite pins the native PSA backend: PBKDF2-HMAC-SHA256 RFC 7914 §11 KAT
(exact expected bytes), HMAC-SHA256 RFC 4231 TC1 KAT (exact expected bytes),
and determinism assertions for both primitives plus AES-CBC vault envelope
round-trip. Guards the "no HW-SHA flakiness on host" contract.
P2-15 assessed: tabbed_vault_view.cpp / stick_vault_view.cpp pure-logic
candidates (clampUp/clampDown, scrollWindowTop) are already covered by
test_two_button_nav and test_menu_list_component. wrapMono uses
display::setFont/textWidth — not natively testable. TOTP display text is
hardcoded. Route to HIL/screenshot-tested, no new seam needed.
Claude-Session: https://claude.ai/code/session_01SLSU3WoYEyX1J7qWXxmyKo