Skip to content

Commit a5e7ff5

Browse files
committed
Allow tests to run when min stack size is less than page size
We would like this to be possible under WebAssembly/emscripten which has a pretty high page size (64k). IIRC these check are really about saying that the tests have not themselves been verified under such conditions and not about the pthread spec containing such a requirement. I verified that all these tests run fine with stack size of 2k under emscripten.
1 parent 2e3f883 commit a5e7ff5

File tree

7 files changed

+14
-1
lines changed

7 files changed

+14
-1
lines changed

conformance/interfaces/pthread_create/threads_scenarii.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,12 @@ void scenar_init()
144144
#endif
145145

146146

147+
#ifndef __EMSCRIPTEN__
147148
if (minstacksize % pagesize)
148149
{
149150
UNTESTED("The min stack size is not a multiple of the page size");
150151
}
152+
#endif
151153

152154
for (i=0; i<NSCENAR; i++)
153155
{

conformance/interfaces/pthread_detach/threads_scenarii.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,12 @@ void scenar_init()
144144
#endif
145145

146146

147+
#ifndef __EMSCRIPTEN__
147148
if (minstacksize % pagesize)
148149
{
149150
UNTESTED("The min stack size is not a multiple of the page size");
150151
}
152+
#endif
151153

152154
for (i=0; i<NSCENAR; i++)
153155
{

conformance/interfaces/pthread_exit/threads_scenarii.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,12 @@ void scenar_init()
144144
#endif
145145

146146

147+
#ifndef __EMSCRIPTEN__
147148
if (minstacksize % pagesize)
148149
{
149150
UNTESTED("The min stack size is not a multiple of the page size");
150151
}
152+
#endif
151153

152154
for (i=0; i<NSCENAR; i++)
153155
{

conformance/interfaces/pthread_join/threads_scenarii.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,12 @@ void scenar_init()
131131
output( " min stack size: %li\n", minstacksize );
132132
#endif
133133

134-
134+
#ifndef __EMSCRIPTEN__
135135
if ( minstacksize % pagesize )
136136
{
137137
UNTESTED( "The min stack size is not a multiple of the page size" );
138138
}
139+
#endif
139140

140141
for ( i = 0; i < NSCENAR; i++ )
141142
{

stress/threads/pthread_create/threads_scenarii.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,12 @@ void scenar_init()
144144
#endif
145145

146146

147+
#ifndef __EMSCRIPTEN__
147148
if (minstacksize % pagesize)
148149
{
149150
UNTESTED("The min stack size is not a multiple of the page size");
150151
}
152+
#endif
151153

152154
for (i=0; i<NSCENAR; i++)
153155
{

stress/threads/pthread_exit/threads_scenarii.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,12 @@ void scenar_init()
144144
#endif
145145

146146

147+
#ifndef __EMSCRIPTEN__
147148
if (minstacksize % pagesize)
148149
{
149150
UNTESTED("The min stack size is not a multiple of the page size");
150151
}
152+
#endif
151153

152154
for (i=0; i<NSCENAR; i++)
153155
{

stress/threads/pthread_self/threads_scenarii.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,12 @@ void scenar_init()
182182
#endif
183183

184184

185+
#ifndef __EMSCRIPTEN__
185186
if (minstacksize % pagesize)
186187
{
187188
UNTESTED("The min stack size is not a multiple of the page size");
188189
}
190+
#endif
189191

190192
for (i=0; i<NSCENAR; i++)
191193
{

0 commit comments

Comments
 (0)