summaryrefslogtreecommitdiff
path: root/tests/test-pthread_sigmask2.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2024-10-20 15:22:21 +0200
committerJörg Frings-Fürst <debian@jff.email>2024-10-20 15:22:21 +0200
commit1d8b9e17ea13630aec475484da09ebba0366f7c8 (patch)
tree0c801f68561bfb0930a4ade80d7ca3a7940887ab /tests/test-pthread_sigmask2.c
parent84e26c587987e8484d55db4165f188b40c09e94b (diff)
parent630f99f29bd31a76d8d24da2975a045452c763ef (diff)
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'tests/test-pthread_sigmask2.c')
-rw-r--r--tests/test-pthread_sigmask2.c13
1 files changed, 12 insertions, 1 deletions
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 <stdio.h>
#include <unistd.h>
+#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