aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMikael Olsson <mikael.olsson@arm.com>2024-04-04 15:27:50 +0200
committerMikael Olsson <mikael.olsson@arm.com>2024-04-04 15:27:50 +0200
commitb2f4a2cd2de6647c9e6d6d4db9108a81d4757e33 (patch)
treec46b88b13549f1e041cf00eb49b010c6578d168b /tests
parentacbebc6963aeb2cb38341561b7788a52e49c6c3e (diff)
downloadethos-u-linux-driver-stack-b2f4a2cd2de6647c9e6d6d4db9108a81d4757e33.tar.gz
Add IOCTL command names to driver library logging
Currently the driver library will log IOCTL commands as hexadecimal values, which makes it hard to know what command is being logged unless you know the command values. To make this easier, the driver library will now translate the command values into their respective names when logging. Change-Id: I7ef2f411b0261ea7819c1a7a6825422859031a25 Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/run_inference_test.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/run_inference_test.cpp b/tests/run_inference_test.cpp
index 88fc691..5e529e6 100644
--- a/tests/run_inference_test.cpp
+++ b/tests/run_inference_test.cpp
@@ -130,8 +130,7 @@ void testNetworkInfoUnparsableBuffer(const Device &device) {
}
void testNetworkInvalidType(const Device &device) {
- const std::string expected_error =
- std::string("IOCTL cmd=") + std::to_string(ETHOSU_IOCTL_NETWORK_CREATE) + " failed: " + std::strerror(EINVAL);
+ const std::string expected_error = std::string("IOCTL cmd=NETWORK_CREATE") + " failed: " + std::strerror(EINVAL);
struct ethosu_uapi_network_create net_req = {};
net_req.type = ETHOSU_UAPI_NETWORK_INDEX + 1;
try {
@@ -144,8 +143,7 @@ void testNetworkInvalidType(const Device &device) {
}
void testNetworkInvalidDataPtr(const Device &device) {
- const std::string expected_error =
- std::string("IOCTL cmd=") + std::to_string(ETHOSU_IOCTL_NETWORK_CREATE) + " failed: " + std::strerror(EINVAL);
+ const std::string expected_error = std::string("IOCTL cmd=NETWORK_CREATE") + " failed: " + std::strerror(EINVAL);
struct ethosu_uapi_network_create net_req = {};
net_req.type = ETHOSU_UAPI_NETWORK_USER_BUFFER;
net_req.network.data_ptr = 0U;
@@ -160,8 +158,7 @@ void testNetworkInvalidDataPtr(const Device &device) {
}
void testNetworkInvalidDataSize(const Device &device) {
- const std::string expected_error =
- std::string("IOCTL cmd=") + std::to_string(ETHOSU_IOCTL_NETWORK_CREATE) + " failed: " + std::strerror(EINVAL);
+ const std::string expected_error = std::string("IOCTL cmd=NETWORK_CREATE") + " failed: " + std::strerror(EINVAL);
struct ethosu_uapi_network_create net_req = {};
net_req.type = ETHOSU_UAPI_NETWORK_USER_BUFFER;
net_req.network.data_ptr = reinterpret_cast<uintptr_t>(networkModelData);