These tests exercise IREE's Hardware Abstraction Layer (HAL) in a way that checks for conformance across implementations and devices. The tests themselves are structured to help with HAL driver development by using individual features in isolation, demonstrating typical full-system usage, and pointing out where capabilities are optional.
Each HAL driver (in-tree or out-of-tree) can use the iree_hal_cts_test_suite() CMake function to create a set of tests. See the documentation in iree_hal_cts_test_suite.cmake and cts_test_base.h for concrete details.
In general, error states are only lightly tested because the low level APIs that IREE's HAL is designed to thinly abstract over often assume programmer usage will be correct and treat errors as undefined behavior. See the Vulkan spec:
While the generic tests in the CTS may not be able to check for error conditions exhaustively, individual HAL implementations can implement stricter behavior or enable higher level checks like what the Vulkan Validation Layers provide.
iree_hal_driver_t) and device (iree_hal_device_t) creation, tested in driver_test, are both prerequisites for all tests.