lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20260119112120.83592-1-jouyeol8739@gmail.com>
Date: Mon, 19 Jan 2026 20:21:20 +0900
From: UYeol Jo <jouyeol8739@...il.com>
To: Shuah Khan <shuah@...nel.org>
Cc: linux-kselftest@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	richard.weiyang@...il.com,
	akpm@...ux-foundation.org,
	sef1548@...il.com,
	jouyeol8739@...il.com
Subject: [PATCH] selftests/ipc: skip msgque test if MSG_COPY is not supported

The msgque test uses the MSG_COPY flag, which depends on
CONFIG_CHECKPOINT_RESTORE. On kernels where this option is disabled,
msgrcv() fails with ENOSYS.

Currently, the test reports this as a failure:

Change it to skip the test instead, as the failure is due to missing
kernel configuration rather than a bug in the IPC subsystem.
 # selftests: ipc: msgque
 # not ok 1 Failed to copy IPC message: Function not implemented (38)
 # not ok 2 Failed to dump queue: -38

After this patch, the test reports a skip instead of failure:
1..0 # SKIP MSG_COPY not supported

Signed-off-by: UYeol Jo <jouyeol8739@...il.com>
---
 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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ