Files
RedBear-OS/local
vasilito 2d7f7880c9 redox-driver-core: F5 — regression tests for single enumeration per probe
Adds two AtomicUsize-counting bus regression tests that verify
each registered bus's enumerate_devices() is called exactly once
per DeviceManager::enumerate() call. The concurrent path
(>=4 devices, max_concurrent_probes > 1) used to call
manager.enumerate() recursively (G8 in the v3.0 assessment); the
v2.2 sweep moved the concurrent path to ConcurrentDeviceManager::
from_devices() which takes pre-enumerated devices, but no test was
added to lock in the contract.

Tests:
- enumerate_calls_each_bus_enumerate_devices_exactly_once:
  multi-bus setup with 4 PCI + 2 platform devices; PCI crosses the
  concurrent threshold; both buses must be enumerated exactly once.
- enumerate_calls_each_bus_exactly_once_per_call_repeated:
  repeated enumerate() calls must each enumerate every bus exactly
  once (matters for retry_deferred integration).

Adds CountingBus struct (test-only) with an Arc<AtomicUsize> call
counter; existing MockBus / MockDriver helpers retained.

35 redox-driver-core tests pass (was 33).
2026-07-27 12:41:58 +09:00
..