diff options
-rw-r--r-- | tests/run_inference_test.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/run_inference_test.cpp b/tests/run_inference_test.cpp index ef2266e..480e26f 100644 --- a/tests/run_inference_test.cpp +++ b/tests/run_inference_test.cpp @@ -47,6 +47,19 @@ void testPing(const Device &device) { TEST_ASSERT(r == 0); } +void testDriverVersion(const Device &device) { + int r; + struct ethosu_uapi_kernel_driver_version version = {}; + try { + r = device.ioctl(ETHOSU_IOCTL_DRIVER_VERSION_GET, &version); + } catch (std::exception &e) { throw TestFailureException("Driver version test: ", e.what()); } + + TEST_ASSERT(r == 0); + TEST_ASSERT(version.major == ETHOSU_KERNEL_DRIVER_VERSION_MAJOR); + TEST_ASSERT(version.minor == ETHOSU_KERNEL_DRIVER_VERSION_MINOR); + TEST_ASSERT(version.patch == ETHOSU_KERNEL_DRIVER_VERSION_PATCH); +} + void testCapabilties(const Device &device) { Capabilities capabilities; try { @@ -139,6 +152,7 @@ int main() { try { testPing(device); + testDriverVersion(device); testCapabilties(device); testNetworkInfoNotExistentIndex(device); testNetworkInfoBuffer(device); |