test_macos_xdma

Classes

FakeMacOSXDMAClient

FakeIOKitBindings

Functions

test_macos_xdma_client_open_all_probes_only_the_canonical_service(...) → None

test_identify_macos_xdma_device_finds_dau_register_window() → None

test_identify_macos_xdma_device_rejects_non_dau_bitstream() → None

test_discover_macos_xdma_devices_skips_unhealthy_or_wrong_bitstreams() → None

test_discover_macos_xdma_devices_reports_no_user_client_as_no_devices() → None

test_probe_macos_xdma_reports_services_tried_when_no_driverkit_service_is_visible() → None

test_probe_macos_xdma_reports_matched_service_without_open_user_client() → None

test_probe_macos_xdma_reports_visible_service_with_wrong_bitstream() → None

test_macos_xdma_dma_roundtrip_carries_buffers() → None

test_macos_xdma_device_close_releases_user_client() → None

test_the_real_client_checks_bar_index_and_offset_before_calling_the_dext() → None

The user client hands the scalars to the dext as unsigned 64-bit values;

Module Contents

class test_macos_xdma.FakeMacOSXDMAClient
values: dict[tuple[int, int], int]
info: dau_driver.macos_xdma.MacOSXDMADeviceInfo
closed: bool = False
memory: bytearray
read_bar_u32(bar_index: int, offset: int) → int
write_bar_u32(bar_index: int, offset: int, value: int) → None
get_info() → dau_driver.macos_xdma.MacOSXDMADeviceInfo
_ensure_memory(end: int) → None
dma_read(device_offset: int, length: int) → bytes
dma_write(device_offset: int, data: bytes | bytearray | memoryview) → int
close() → None
class test_macos_xdma.FakeIOKitBindings
requests: list[str] = []
_iterated = False
matching_iterators(service_name: str) → tuple[int, ...]
next_service(iterator: int) → int
open_service(service: int) → int
release(obj: int) → None
close(connection: int) → None
test_macos_xdma.test_macos_xdma_client_open_all_probes_only_the_canonical_service(monkeypatch: pytest.MonkeyPatch) → None
test_macos_xdma.test_identify_macos_xdma_device_finds_dau_register_window() → None
test_macos_xdma.test_identify_macos_xdma_device_rejects_non_dau_bitstream() → None
test_macos_xdma.test_discover_macos_xdma_devices_skips_unhealthy_or_wrong_bitstreams() → None
test_macos_xdma.test_discover_macos_xdma_devices_reports_no_user_client_as_no_devices() → None
test_macos_xdma.test_probe_macos_xdma_reports_services_tried_when_no_driverkit_service_is_visible() → None
test_macos_xdma.test_probe_macos_xdma_reports_matched_service_without_open_user_client() → None
test_macos_xdma.test_probe_macos_xdma_reports_visible_service_with_wrong_bitstream() → None
test_macos_xdma.test_macos_xdma_dma_roundtrip_carries_buffers() → None
test_macos_xdma.test_macos_xdma_device_close_releases_user_client() → None
test_macos_xdma.test_the_real_client_checks_bar_index_and_offset_before_calling_the_dext() → None

The user client hands the scalars to the dext as unsigned 64-bit values; a negative offset would wrap to a huge one. The check runs before any binding is touched, so a bindings object that cannot be called proves it.