summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests/psxsignal03
diff options
context:
space:
mode:
authorJoel Sherrill <joel@rtems.org>2019-09-10 12:53:31 -0500
committerJoel Sherrill <joel@rtems.org>2019-09-24 16:27:57 -0500
commit8798372261ed1df999bc9f4f3f0be0a230480041 (patch)
tree0762d89609e1bb4717335838f56b254fdaaba2e9 /testsuites/psxtests/psxsignal03
parentrtems: Add rtems_interrupt_server_entry_move() (diff)
downloadrtems-8798372261ed1df999bc9f4f3f0be0a230480041.tar.bz2
Correct initial POSIX signals mask
+ Modify POSIX thread create extension to ensure expected initial signal mask is provided to system threads, initial tasks and threads, and inheritied by tasks and threads. + Adds psxsignal07 to verify functionality when using a POSIX Initialization thread and POSIX threads. + Adds psxsignal08 to verify functionality when using a Classic API Initialization task and Classic API tasks. Closes #3794.
Diffstat (limited to 'testsuites/psxtests/psxsignal03')
-rw-r--r--testsuites/psxtests/psxsignal03/init.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/testsuites/psxtests/psxsignal03/init.c b/testsuites/psxtests/psxsignal03/init.c
index b51ff36313..fcf7192664 100644
--- a/testsuites/psxtests/psxsignal03/init.c
+++ b/testsuites/psxtests/psxsignal03/init.c
@@ -64,6 +64,18 @@ const char *signal_name(int signo);
volatile bool Signal_occurred;
volatile pthread_t Signal_thread;
+static void block_all_signals(void)
+{
+ int sc;
+ sigset_t mask;
+
+ sc = sigfillset( &mask );
+ rtems_test_assert( !sc );
+
+ sc = pthread_sigmask( SIG_BLOCK, &mask, NULL );
+ rtems_test_assert( !sc );
+}
+
void Signal_handler(
int signo,
siginfo_t *info,
@@ -166,6 +178,8 @@ void *POSIX_Init(
TEST_BEGIN();
puts( "Init - Variation is: " TEST_STRING );
+ block_all_signals();
+
Signal_occurred = false;
act.sa_handler = NULL;