Skip to content

Commit

Permalink
[test] Remove some unnecessary usage of TOTAL_MEMORY and INITIAL_MEMO…
Browse files Browse the repository at this point in the history
…RY. NFC
  • Loading branch information
sbc100 committed Feb 9, 2024
1 parent 833448b commit a57bca0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/test_browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -3880,17 +3880,17 @@ def prep_no_SAB(self):
@requires_threads
def test_pthread_c11_threads(self):
self.btest_exit('pthread/test_pthread_c11_threads.c',
args=['-gsource-map', '-std=gnu11', '-pthread', '-sPROXY_TO_PTHREAD', '-sTOTAL_MEMORY=64mb'])
args=['-gsource-map', '-std=gnu11', '-pthread', '-sPROXY_TO_PTHREAD'])

@requires_threads
def test_pthread_pool_size_strict(self):
# Check that it doesn't fail with sufficient number of threads in the pool.
self.btest_exit('pthread/test_pthread_c11_threads.c',
args=['-g2', '-std=gnu11', '-pthread', '-sPTHREAD_POOL_SIZE=4', '-sPTHREAD_POOL_SIZE_STRICT=2', '-sTOTAL_MEMORY=64mb'])
args=['-g2', '-std=gnu11', '-pthread', '-sPTHREAD_POOL_SIZE=4', '-sPTHREAD_POOL_SIZE_STRICT=2'])
# Check that it fails instead of deadlocking on insufficient number of threads in the pool.
self.btest('pthread/test_pthread_c11_threads.c',
expected='abort:Assertion failed: thrd_create(&t4, thread_main, NULL) == thrd_success',
args=['-g2', '-std=gnu11', '-pthread', '-sPTHREAD_POOL_SIZE=3', '-sPTHREAD_POOL_SIZE_STRICT=2', '-sTOTAL_MEMORY=64mb'])
args=['-g2', '-std=gnu11', '-pthread', '-sPTHREAD_POOL_SIZE=3', '-sPTHREAD_POOL_SIZE_STRICT=2'])

@requires_threads
def test_pthread_in_pthread_pool_size_strict(self):
Expand All @@ -3911,7 +3911,7 @@ def test_pthread_atomics(self, args):
# Test 64-bit atomics.
@requires_threads
def test_pthread_64bit_atomics(self):
self.btest_exit('pthread/test_pthread_64bit_atomics.c', args=['-sINITIAL_MEMORY=64MB', '-O3', '-pthread', '-sPTHREAD_POOL_SIZE=8'])
self.btest_exit('pthread/test_pthread_64bit_atomics.c', args=['-O3', '-pthread', '-sPTHREAD_POOL_SIZE=8'])

# Test 64-bit C++11 atomics.
@parameterized({
Expand Down Expand Up @@ -4233,7 +4233,7 @@ def test_pthread_proxying_in_futex_wait(self):
def test_pthread_sbrk(self, args):
# With aborting malloc = 1, test allocating memory in threads
# With aborting malloc = 0, allocate so much memory in threads that some of the allocations fail.
self.btest_exit('pthread/test_pthread_sbrk.cpp', args=['-O3', '-pthread', '-sPTHREAD_POOL_SIZE=8', '-sINITIAL_MEMORY=128MB'] + args)
self.btest_exit('pthread/test_pthread_sbrk.cpp', args=['-O3', '-pthread', '-sPTHREAD_POOL_SIZE=8'] + args)

# Test that -sABORTING_MALLOC=0 works in both pthreads and non-pthreads
# builds. (sbrk fails gracefully)
Expand Down

0 comments on commit a57bca0

Please sign in to comment.