From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konstantin Khorenko Date: Mon, 24 Aug 2026 18:22:24 +0200 Subject: Re: [Devel] [PATCH vz10] selftests/rseq: skip syscall_errors_test when libc owns the registration In-Reply-To: <20260821152454.797561-1-eva.kurchatova@virtuozzo.com> References: <20260821152454.797561-1-eva.kurchatova@virtuozzo.com> Message-ID: List-Id: nack. After that we just get all tests SKIPPED, while we should better unregister rseq and execute the test. Mainstream has also fixed that but in different way - it prevents glibc registering rseq from the very beginning: cb48828f06af ("selftests/rseq: Don't run tests with runner scripts outside of the scripts") -- Best regards, Konstantin Khorenko, Virtuozzo Linux Kernel Team On 8/21/26 17:24, Eva Kurchatova wrote: > 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 > --- > 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 */