From 4682deeb62247d34de87f8e777f99e2d337fd377 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 20 Oct 2024 15:21:43 +0200 Subject: New upstream version 1.3 --- tests/test-pthread_sigmask2.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'tests/test-pthread_sigmask2.c') diff --git a/tests/test-pthread_sigmask2.c b/tests/test-pthread_sigmask2.c index d527eb8d..a847e6b3 100644 --- a/tests/test-pthread_sigmask2.c +++ b/tests/test-pthread_sigmask2.c @@ -25,6 +25,7 @@ #include #include +#include "virtualbox.h" #include "macros.h" #if USE_POSIX_THREADS || USE_ISOC_AND_POSIX_THREADS @@ -51,6 +52,16 @@ sigint_handler (_GL_UNUSED int sig) int main () { + /* This test occasionally fails on Linux (glibc or musl libc), in a + VirtualBox VM with paravirtualization = Default or KVM, with ≥ 2 CPUs. + Skip the test in this situation. */ + if (is_running_under_virtualbox_kvm () && num_cpus () > 1) + { + fputs ("Skipping test: avoiding VirtualBox bug with KVM paravirtualization\n", + stderr); + return 77; + } + sigset_t set; signal (SIGINT, sigint_handler); @@ -90,7 +101,7 @@ main () from "gcc -fsanitize=thread". */ ASSERT (pthread_join (killer_thread, NULL) == 0); - return 0; + return test_exit_status; } #else -- cgit v1.2.3