mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: UYeol Jo <jouyeol8739@gmail.com>
To: shuah@kernel.org
Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
	richard.weiyang@gmail.com, akpm@linux-foundation.org,
	sef1548@gmail.com, UYeol Jo <jouyeol8739@gmail.com>
Subject: [PATCH v2] selftests/ipc: skip msgque test when MSG_COPY is unsupported
Date: Tue, 10 Feb 2026 22:53:59 +0900	[thread overview]
Message-ID: <20260210135359.178636-1-jouyeol8739@gmail.com> (raw)

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.

Signed-off-by: UYeol Jo <jouyeol8739@gmail.com>
---
v2:
 - Clarify in commit message why MSG_COPY returns -ENOSYS without
   CONFIG_CHECKPOINT_RESTORE (prepare_copy() stub).

 tools/testing/selftests/ipc/msgque.c | 3 +++
 1 file changed, 3 insertions(+)

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;
 		}
-- 
2.43.0


                 reply	other threads:[~2026-02-10 13:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260210135359.178636-1-jouyeol8739@gmail.com \
    --to=jouyeol8739@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=richard.weiyang@gmail.com \
    --cc=sef1548@gmail.com \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®