Skip to contentSkip to conversation

selftests: ipc: Change operation not supported error number

PATCH Applied Paul White 1 participant 1 message Jul 20 Kselftest

lore
Share & tools
lore

Paul White

author
#0 lore raw

PATCH 1/1 selftests: ipc: Change operation not supported error number

The application doesn't know what ENOTSUPP means, as it is a kernelspace error code and the application doesn't have access to kernelspace error codes.I used EOPNOTSUPP in its place as that is an error number the application will recognize and know an operation is being attempted that it cannot support.

---
 tools/testing/selftests/ipc/msgque.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/ipc/msgque.c +1 -1
index 82f73cdae120..4b4c1abfac0f 100644
@@ -161,7 +161,7 @@ int dump_queue(struct msgque_data *msgque)
 		ret = msgrcv(msgque->msq_id, &msgque->messages[i].mtype,
 				MAX_MSG_SIZE, i, IPC_NOWAIT | MSG_COPY);
 		if (ret < 0) {
-			if (errno == ENOSYS)
+			if (errno == EOPNOTSUPP)
 				ksft_exit_skip("MSG_COPY not supported\n");
 
 			ksft_test_result_fail("Failed to copy IPC message: %m (%d)\n", errno);
Signature · 1 line
2.53.0