Skip to content

Commit e79dcec

Browse files
committed
Skip pthread_create/ tests that either use signals or semaphores.
1 parent a33ea18 commit e79dcec

File tree

8 files changed

+52
-1
lines changed

8 files changed

+52
-1
lines changed

conformance/interfaces/pthread_create/1-4.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,12 @@ int main (int argc, char *argv[])
155155
void * rval;
156156
pthread_t child;
157157
int i;
158-
158+
159+
#ifdef __EMSCRIPTEN__
160+
printf("Test SKIPPED: semaphores are not currently supported (TODO).\n");
161+
exit(0);
162+
#endif
163+
159164
output_init();
160165

161166
td.tid=pthread_self();

conformance/interfaces/pthread_create/1-5.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,15 @@
9191
/********************************************************************************************/
9292
/*********************************** Test cases *****************************************/
9393
/********************************************************************************************/
94+
#ifdef __EMSCRIPTEN__
95+
int main()
96+
{
97+
printf("Test SKIPPED: semaphores are not currently supported (TODO).\n");
98+
exit(0);
99+
}
100+
#else
94101
#define STD_MAIN /* This allows main() to be defined in the included file */
102+
#endif
95103
#include "threads_scenarii.c"
96104

97105
/* This file will define the following objects:

conformance/interfaces/pthread_create/1-6.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,15 @@
8585
/********************************************************************************************/
8686
/*********************************** Test cases *****************************************/
8787
/********************************************************************************************/
88+
#ifdef __EMSCRIPTEN__
89+
int main()
90+
{
91+
printf("Test SKIPPED: semaphores are not currently supported (TODO).\n");
92+
exit(0);
93+
}
94+
#else
8895
#define STD_MAIN /* This allows main() to be defined in the included file */
96+
#endif
8997

9098
#include "threads_scenarii.c"
9199

conformance/interfaces/pthread_create/10-1.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
#include <unistd.h>
4949
#include <signal.h>
5050
#include <errno.h>
51+
#include <stdlib.h>
5152
#include "posixtest.h"
5253

5354
int created_thread; /* Flag indicating that the thread start routine was reached, and
@@ -96,6 +97,11 @@ int main()
9697
pthread_attr_t inv_attr;
9798
struct sigaction act;
9899

100+
#ifdef __EMSCRIPTEN__
101+
printf("Test SKIPPED: signals are not supported in Emscripten.\n");
102+
exit(0);
103+
#endif
104+
99105
/* Inializing flags. */
100106
segfault_flag = 1;
101107
created_thread = 0;

conformance/interfaces/pthread_create/14-1.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,11 @@ int main (int argc, char * argv[])
255255
pthread_t th_work, th_sig1, th_sig2;
256256
thestruct arg1, arg2;
257257
struct sigaction sa;
258+
259+
#ifdef __EMSCRIPTEN__
260+
printf("Test SKIPPED: signals are not supported in Emscripten.\n");
261+
exit(0);
262+
#endif
258263

259264
/* Initialize output routine */
260265
output_init();

conformance/interfaces/pthread_create/15-1.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,15 @@
8686
/*********************************** Test cases *****************************************/
8787
/********************************************************************************************/
8888

89+
#ifdef __EMSCRIPTEN__
90+
int main()
91+
{
92+
printf("Test SKIPPED: semaphores are not currently supported (TODO).\n");
93+
exit(0);
94+
}
95+
#else
8996
#define STD_MAIN
97+
#endif
9098
#include "threads_scenarii.c"
9199

92100
/* This file will define the following objects:

conformance/interfaces/pthread_create/8-1.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include <pthread.h>
2424
#include <stdio.h>
2525
#include <signal.h>
26+
#include <stdlib.h>
2627
#include "posixtest.h"
2728

2829
sigset_t th_pendingset, th_sigmask;
@@ -48,6 +49,11 @@ int main()
4849
sigset_t main_sigmask, main_pendingset;
4950
int ret;
5051

52+
#ifdef __EMSCRIPTEN__
53+
printf("Test SKIPPED: signals are not supported in Emscripten.\n");
54+
exit(0);
55+
#endif
56+
5157
/* Empty set of signal mask and blocked signals */
5258
if ( (sigemptyset(&main_sigmask) != 0) ||
5359
(sigemptyset(&main_pendingset) != 0) )

conformance/interfaces/pthread_create/8-2.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,11 @@ int main (int argc, char *argv[])
140140

141141
testdata_t td_parent, td_thread;
142142

143+
#ifdef __EMSCRIPTEN__
144+
printf("Test SKIPPED: signals are not supported in Emscripten.\n");
145+
exit(0);
146+
#endif
147+
143148
/* Initialize output routine */
144149
output_init();
145150

0 commit comments

Comments
 (0)