Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

UYeol Jo and committed by
Andrew Morton
225ba47f 513d08ac

+3
+3
tools/testing/selftests/ipc/msgque.c
··· 161 161 ret = msgrcv(msgque->msq_id, &msgque->messages[i].mtype, 162 162 MAX_MSG_SIZE, i, IPC_NOWAIT | MSG_COPY); 163 163 if (ret < 0) { 164 + if (errno == ENOSYS) 165 + ksft_exit_skip("MSG_COPY not supported\n"); 166 + 164 167 ksft_test_result_fail("Failed to copy IPC message: %m (%d)\n", errno); 165 168 return -errno; 166 169 }