summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2014-05-30 10:18:36 -0400
committerMatthias Clasen <mclasen@redhat.com>2014-05-30 10:22:35 -0400
commit367dbdce367fd504804a1256dc393534d6784bfc (patch)
tree1e16104dd6770357a0ebd83fdb52f234c743deca /tests
parent79f930f6dc23c05fef7fdcaaeed0df230698453e (diff)
Fix the mapping test in continuous
It turns out that due to a recent gdm change, the inherited signal mask has SIGUSR1 blocked - which is bad news for tests using SIGUSR1. Fix the test by explicitly checking the signal mask before using SIGUSR1.
Diffstat (limited to 'tests')
-rw-r--r--tests/mapping-test.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/mapping-test.c b/tests/mapping-test.c
index e3c45b643..9128e3570 100644
--- a/tests/mapping-test.c
+++ b/tests/mapping-test.c
@@ -285,6 +285,17 @@ main (int argc,
char *argv[])
{
int ret;
+#ifndef G_OS_WIN32
+ sigset_t sig_mask, old_mask;
+
+ sigemptyset (&sig_mask);
+ sigaddset (&sig_mask, SIGUSR1);
+ if (sigprocmask (SIG_UNBLOCK, &sig_mask, &old_mask) == 0)
+ {
+ if (sigismember (&old_mask, SIGUSR1))
+ g_message ("SIGUSR1 was blocked, unblocking it");
+ }
+#endif
dir = g_get_current_dir ();
filename = g_build_filename (dir, "maptest", NULL);