OpenVZ / Virtuozzo kernel development (devel@openvz.org)
 help / color / mirror / Atom feed
From: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
Subject: [Devel] [PATCH vz10] selftests/rseq: skip syscall_errors_test when libc owns the registration
Date: Fri, 21 Aug 2026 18:24:53 +0300	[thread overview]
Message-ID: <20260821152454.797561-1-eva.kurchatova@virtuozzo.com> (raw)

The test requires the calling thread to be unregistered and expects
EFAULT when registering an invalid address. glibc >= 2.35 registers
rseq for every thread at startup, so the kernel rejects the second
registration with EINVAL before it ever touches the address.

https://virtuozzo.atlassian.net/browse/VSTOR-139675
Feature: fix selftests
Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
---
 tools/testing/selftests/rseq/syscall_errors_test.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/tools/testing/selftests/rseq/syscall_errors_test.c b/tools/testing/selftests/rseq/syscall_errors_test.c
index a5d9e1f8a2dc..9e6bf6b1df96 100644
--- a/tools/testing/selftests/rseq/syscall_errors_test.c
+++ b/tools/testing/selftests/rseq/syscall_errors_test.c
@@ -34,6 +34,15 @@ int main(void)
 		goto error;
 	}
 
+	/*
+	 * The expectations below only hold for a thread which is not
+	 * registered, while glibc >= 2.35 registers every thread at startup.
+	 */
+	if (rseq_current_cpu_raw() >= 0) {
+		fprintf(stderr, "rseq is already registered, skipping\n");
+		return 4;
+	}
+
 	/* The current thread is NOT registered. */
 
 	/* EINVAL */
-- 
2.55.0


             reply	other threads:[~2026-08-21 15:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-21 15:24 Eva Kurchatova [this message]
2026-08-24 16:22 ` Konstantin Khorenko
2026-08-24 16:32 ` [Devel] [PATCH vz10] ms/selftests/rseq: Don't run tests with runner scripts outside of the scripts Konstantin Khorenko
2026-08-24 16:32   ` [Devel] [PATCH RHEL10 COMMIT] " Konstantin Khorenko

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=20260821152454.797561-1-eva.kurchatova@virtuozzo.com \
    --to=eva.kurchatova@virtuozzo.com \
    /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