summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUYeol Jo <jouyeol8739@gmail.com>2026-02-10 16:53:59 +0300
committerAndrew Morton <akpm@linux-foundation.org>2026-03-28 07:19:34 +0300
commit225ba47fb9ec17440781563ea729f3fe67f1b5b8 (patch)
tree44f8dd6f0e63db271b9f5a6b28b61a1f925af9fe
parent513d08ace4e51d320ecc19e0a50b1192b217269b (diff)
downloadlinux-225ba47fb9ec17440781563ea729f3fe67f1b5b8.tar.xz
selftests/ipc: skip msgque test when MSG_COPY is unsupported
msgque kselftest uses msgrcv(..., MSG_COPY) to copy messages. When the kernel is built without CONFIG_CHECKPOINT_RESTORE, prepare_copy() is stubbed out and msgrcv() returns -ENOSYS. The test currently reports this as a failure even though it is simply a missing feature/configuration. Skip the test when msgrcv() fails with ENOSYS. Link: https://lkml.kernel.org/r/20260210135359.178636-1-jouyeol8739@gmail.com Signed-off-by: UYeol Jo <jouyeol8739@gmail.com> Cc: Shuah Khan <shuah@kernel.org> Cc: Wei Yang <richard.weiyang@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r--tools/testing/selftests/ipc/msgque.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/testing/selftests/ipc/msgque.c b/tools/testing/selftests/ipc/msgque.c
index e107379d185c..82f73cdae120 100644
--- a/tools/testing/selftests/ipc/msgque.c
+++ b/tools/testing/selftests/ipc/msgque.c
@@ -161,6 +161,9 @@ 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)
+ ksft_exit_skip("MSG_COPY not supported\n");
+
ksft_test_result_fail("Failed to copy IPC message: %m (%d)\n", errno);
return -errno;
}