summaryrefslogtreecommitdiff
path: root/tests/test-sigprocmask.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2024-10-20 15:21:43 +0200
committerJörg Frings-Fürst <debian@jff.email>2024-10-20 15:21:43 +0200
commit4682deeb62247d34de87f8e777f99e2d337fd377 (patch)
tree5bd5b5605b5f3a4b3c8ea7468c34c23094afdef4 /tests/test-sigprocmask.c
parent00893e79fc62966067af1a106567db96bd170338 (diff)
New upstream version 1.3upstream/1.3upstream
Diffstat (limited to 'tests/test-sigprocmask.c')
-rw-r--r--tests/test-sigprocmask.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/test-sigprocmask.c b/tests/test-sigprocmask.c
index c712d77d..b9cdb6b0 100644
--- a/tests/test-sigprocmask.c
+++ b/tests/test-sigprocmask.c
@@ -29,6 +29,7 @@ SIGNATURE_CHECK (sigprocmask, int, (int, const sigset_t *, sigset_t *));
#include <stdlib.h>
#include <unistd.h>
+#include "virtualbox.h"
#include "macros.h"
#if !(defined _WIN32 && !defined __CYGWIN__)
@@ -44,6 +45,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;
intmax_t pid = getpid ();
char command[80];
@@ -79,7 +90,7 @@ main ()
before the call to sigprocmask() returns." */
ASSERT (sigint_occurred == 1);
- return 0;
+ return test_exit_status;
}
#else