@@ -237,6 +237,8 @@ def setUp(self):
237
237
def require_wasm2js (self ):
238
238
if self .is_wasm64 ():
239
239
self .skipTest ('wasm2js is not compatible with MEMORY64' )
240
+ if self .is_2gb () or self .is_4gb ():
241
+ self .skipTest ('wasm2js does not support over 2gb of memory' )
240
242
241
243
def require_jspi (self ):
242
244
if not is_chrome ():
@@ -1525,7 +1527,9 @@ def test_idbstore_sync(self, asyncify):
1525
1527
1526
1528
def test_idbstore_sync_worker (self ):
1527
1529
secret = str (time .time ())
1528
- self .btest ('test_idbstore_sync_worker.c' , expected = '0' , args = ['-lidbstore.js' , f'-DSECRET="{ secret } "' , '-O3' , '-g2' , '--proxy-to-worker' , '-sINITIAL_MEMORY=80MB' , '-sASYNCIFY' ])
1530
+ if not self .is_2gb () and not self .is_4gb ():
1531
+ self .set_setting ('INITIAL_MEMORY' , '80mb' )
1532
+ self .btest ('test_idbstore_sync_worker.c' , expected = '0' , args = ['-lidbstore.js' , f'-DSECRET="{ secret } "' , '-O3' , '-g2' , '--proxy-to-worker' , '-sASYNCIFY' ])
1529
1533
1530
1534
def test_force_exit (self ):
1531
1535
self .btest_exit ('force_exit.c' , assert_returncode = 10 )
@@ -1816,6 +1820,7 @@ def test_glgears_animation(self, filename):
1816
1820
self .run_browser ('something.html' , '/report_gl_result?true' )
1817
1821
1818
1822
@requires_graphics_hardware
1823
+ @no_4gb ('assertion fails' )
1819
1824
def test_fulles2_sdlproc (self ):
1820
1825
self .btest_exit ('full_es2_sdlproc.c' , assert_returncode = 1 , args = ['-sGL_TESTING' , '-DHAVE_BUILTIN_SINCOS' , '-sFULL_ES2' , '-lGL' , '-lSDL' , '-lglut' , '-sGL_ENABLE_GET_PROC_ADDRESS' ])
1821
1826
@@ -1826,6 +1831,7 @@ def test_glgears_deriv(self):
1826
1831
assert 'gl-matrix' not in read_file ('test.html' ), 'Should not include glMatrix when not needed'
1827
1832
1828
1833
@requires_graphics_hardware
1834
+ @no_4gb ('fails to render' )
1829
1835
def test_glbook (self ):
1830
1836
self .emcc_args .append ('-Wno-int-conversion' )
1831
1837
self .emcc_args .append ('-Wno-pointer-sign' )
@@ -1859,6 +1865,7 @@ def book_path(path):
1859
1865
args = args )
1860
1866
1861
1867
@requires_graphics_hardware
1868
+ @no_4gb ('fails to render' )
1862
1869
@parameterized ({
1863
1870
'normal' : (['-sFULL_ES2' ],),
1864
1871
# Enabling FULL_ES3 also enables ES2 automatically
@@ -2017,6 +2024,7 @@ def test_gl_glteximage(self):
2017
2024
})
2018
2025
@requires_graphics_hardware
2019
2026
@requires_threads
2027
+ @no_4gb ('assertion failure' )
2020
2028
def test_gl_textures (self , args ):
2021
2029
self .btest_exit ('gl_textures.cpp' , args = ['-lGL' , '-g' , '-sSTACK_SIZE=1MB' ] + args )
2022
2030
@@ -2047,14 +2055,18 @@ def test_gl_renderers(self):
2047
2055
self .btest ('gl_renderers.c' , reference = 'gl_renderers.png' , args = ['-sGL_UNSAFE_OPTS=0' , '-sLEGACY_GL_EMULATION' , '-lGL' , '-lSDL' ])
2048
2056
2049
2057
@requires_graphics_hardware
2058
+ @no_2gb ('render fails' )
2059
+ @no_4gb ('render fails' )
2050
2060
def test_gl_stride (self ):
2051
2061
self .btest ('gl_stride.c' , reference = 'gl_stride.png' , args = ['-sGL_UNSAFE_OPTS=0' , '-sLEGACY_GL_EMULATION' , '-lGL' , '-lSDL' ])
2052
2062
2053
2063
@requires_graphics_hardware
2064
+ @no_4gb ('assertion failure' )
2054
2065
def test_gl_vertex_buffer_pre (self ):
2055
2066
self .btest ('gl_vertex_buffer_pre.c' , reference = 'gl_vertex_buffer_pre.png' , args = ['-sGL_UNSAFE_OPTS=0' , '-sLEGACY_GL_EMULATION' , '-lGL' , '-lSDL' ])
2056
2067
2057
2068
@requires_graphics_hardware
2069
+ @no_4gb ('assertion failure' )
2058
2070
def test_gl_vertex_buffer (self ):
2059
2071
self .btest ('gl_vertex_buffer.c' , reference = 'gl_vertex_buffer.png' , args = ['-sGL_UNSAFE_OPTS=0' , '-sLEGACY_GL_EMULATION' , '-lGL' , '-lSDL' ], reference_slack = 1 )
2060
2072
@@ -2310,6 +2322,7 @@ def test_tex_nonbyte(self):
2310
2322
self .btest ('tex_nonbyte.c' , reference = 'tex_nonbyte.png' , args = ['-sLEGACY_GL_EMULATION' , '-lGL' , '-lSDL' ])
2311
2323
2312
2324
@requires_graphics_hardware
2325
+ @no_4gb ('fails to render' )
2313
2326
def test_float_tex (self ):
2314
2327
self .btest ('float_tex.cpp' , reference = 'float_tex.png' , args = ['-lGL' , '-lglut' ])
2315
2328
@@ -5571,6 +5584,7 @@ def test_4gb(self):
5571
5584
5572
5585
# Tests that emmalloc supports up to 4GB Wasm heaps.
5573
5586
@no_firefox ('no 4GB support yet' )
5587
+ @no_4gb ('uses MAXIMUM_MEMORY' )
5574
5588
def test_emmalloc_4gb (self ):
5575
5589
# For now, keep this in browser as this suite runs serially, which
5576
5590
# means we don't compete for memory with anything else (and run it
@@ -5581,21 +5595,29 @@ def test_emmalloc_4gb(self):
5581
5595
# Test that it is possible to malloc() a huge 3GB memory block in 4GB mode using emmalloc.
5582
5596
# Also test emmalloc-memvalidate and emmalloc-memvalidate-verbose build configurations.
5583
5597
@no_firefox ('no 4GB support yet' )
5598
+ @no_2gb ('not enough space tp run in this mode' )
5584
5599
@parameterized ({
5585
5600
'' : (['-sMALLOC=emmalloc' ],),
5586
5601
'debug' : (['-sMALLOC=emmalloc-debug' ],),
5587
5602
'memvalidate' : (['-sMALLOC=emmalloc-memvalidate' ],),
5588
5603
'memvalidate_verbose' : (['-sMALLOC=emmalloc-memvalidate-verbose' ],),
5589
5604
})
5590
5605
def test_emmalloc_3gb (self , args ):
5591
- self .btest_exit ('alloc_3gb.c' ,
5592
- args = ['-sMAXIMUM_MEMORY=4GB' , '-sALLOW_MEMORY_GROWTH=1' ] + args )
5606
+ if self .is_4gb ():
5607
+ self .set_setting ('MAXIMUM_MEMORY' , '8GB' )
5608
+ else :
5609
+ self .set_setting ('MAXIMUM_MEMORY' , '4GB' )
5610
+ self .btest_exit ('alloc_3gb.c' , args = ['-sALLOW_MEMORY_GROWTH=1' ] + args )
5593
5611
5594
5612
# Test that it is possible to malloc() a huge 3GB memory block in 4GB mode using dlmalloc.
5595
5613
@no_firefox ('no 4GB support yet' )
5614
+ @no_2gb ('not enough space tp run in this mode' )
5596
5615
def test_dlmalloc_3gb (self ):
5597
- self .btest_exit ('alloc_3gb.c' ,
5598
- args = ['-sMALLOC=dlmalloc' , '-sMAXIMUM_MEMORY=4GB' , '-sALLOW_MEMORY_GROWTH=1' ])
5616
+ if self .is_4gb ():
5617
+ self .set_setting ('MAXIMUM_MEMORY' , '8GB' )
5618
+ else :
5619
+ self .set_setting ('MAXIMUM_MEMORY' , '4GB' )
5620
+ self .btest_exit ('alloc_3gb.c' , args = ['-sMALLOC=dlmalloc' , '-sALLOW_MEMORY_GROWTH=1' ])
5599
5621
5600
5622
@no_wasm64 ()
5601
5623
@parameterized ({
@@ -5649,7 +5671,9 @@ def test_wasmfs_opfs_errors(self):
5649
5671
5650
5672
@no_firefox ('no 4GB support yet' )
5651
5673
def test_emmalloc_memgrowth (self , * args ):
5652
- self .btest ('emmalloc_memgrowth.cpp' , expected = '0' , args = ['-sMALLOC=emmalloc' , '-sALLOW_MEMORY_GROWTH=1' , '-sABORTING_MALLOC=0' , '-sASSERTIONS=2' , '-sMINIMAL_RUNTIME=1' , '-sMAXIMUM_MEMORY=4GB' ])
5674
+ if not self .is_4gb ():
5675
+ self .set_setting ('MAXIMUM_MEMORY' , '4GB' )
5676
+ self .btest_exit ('emmalloc_memgrowth.cpp' , args = ['-sMALLOC=emmalloc' , '-sALLOW_MEMORY_GROWTH=1' , '-sABORTING_MALLOC=0' , '-sASSERTIONS=2' , '-sMINIMAL_RUNTIME=1' ])
5653
5677
5654
5678
@no_firefox ('no 4GB support yet' )
5655
5679
@no_2gb ('uses MAXIMUM_MEMORY' )
@@ -5902,6 +5926,8 @@ def setUp(self):
5902
5926
self .set_setting ('INITIAL_MEMORY' , '4200mb' )
5903
5927
self .set_setting ('GLOBAL_BASE' , '4gb' )
5904
5928
self .emcc_args .append ('-Wno-experimental' )
5929
+ # Without this we get a warning about GLOBAL_BASE being ignored when used with SIDE_MODULE
5930
+ self .emcc_args .append ('-Wno-unused-command-line-argument' )
5905
5931
self .require_wasm64 ()
5906
5932
5907
5933
@@ -5920,3 +5946,5 @@ def setUp(self):
5920
5946
super ().setUp ()
5921
5947
self .set_setting ('INITIAL_MEMORY' , '2200mb' )
5922
5948
self .set_setting ('GLOBAL_BASE' , '2gb' )
5949
+ # Without this we get a warning about GLOBAL_BASE being ignored when used with SIDE_MODULE
5950
+ self .emcc_args .append ('-Wno-unused-command-line-argument' )
0 commit comments