This PR fills in the rest of the test suites by adding tests for the following functions:
IOIteratorNext()
IOIteratorIsValid()
IOObjectRelease()
IORegistryEntryGetChildIterator()
IORegistryCreateIterator()
IORegistryEntryCreateIterator()
IORegistryEntryGetPath()
IORegistryEntryCopyPath()
IOObjectConformsTo()
IORegistryEntryGetLocationInPlane()
IOServiceNameMatching()
IORegistryEntryGetRegistryEntryID()
IORegistryEntryIDMatching()
IORegistryEntryFromPath()
IORegistryIteratorEnterEntry()
IORegistryIteratorExitEntry()
This PR also includes miscellaneous fixes:
Encoding was invalid for IORegistryEntryGetRegistryEntryID() — it's meant to be OUT(POINTER(uint64_t)) instead of OUT(uint64_t);
test_IORegistryEntryGetParentEntry() now invokes sysctl hw.model to properly match against the value returned by IORegistryGetName(); and
Functions that return bool can simply be annotated as def func(...) -> bool
For the 3rd aforementioned point, I am not 100% certain if this is acceptable and accurate. The test suites where a function returns bool seems to run just fine, and does return True.
EDIT: I wrote IORegistryEntryIDMatching as being the method that has a parameter of type OUT(POINTER(uint64_t)), but it's actually IORegistryEntryGetRegistryEntryID(). Apologies!
This PR fills in the rest of the test suites by adding tests for the following functions:
IOIteratorNext()
IOIteratorIsValid()
IOObjectRelease()
IORegistryEntryGetChildIterator()
IORegistryCreateIterator()
IORegistryEntryCreateIterator()
IORegistryEntryGetPath()
IORegistryEntryCopyPath()
IOObjectConformsTo()
IORegistryEntryGetLocationInPlane()
IOServiceNameMatching()
IORegistryEntryGetRegistryEntryID()
IORegistryEntryIDMatching()
IORegistryEntryFromPath()
IORegistryIteratorEnterEntry()
IORegistryIteratorExitEntry()
This PR also includes miscellaneous fixes:
IORegistryEntryGetRegistryEntryID()
— it's meant to beOUT(POINTER(uint64_t))
instead ofOUT(uint64_t)
;test_IORegistryEntryGetParentEntry()
now invokessysctl hw.model
to properly match against the value returned byIORegistryGetName()
; anddef func(...) -> bool
For the 3rd aforementioned point, I am not 100% certain if this is acceptable and accurate. The test suites where a function returns bool seems to run just fine, and does return
True
.EDIT: I wrote
IORegistryEntryIDMatching
as being the method that has a parameter of typeOUT(POINTER(uint64_t))
, but it's actuallyIORegistryEntryGetRegistryEntryID()
. Apologies!