Skip to content

Commit 0a3b753

Browse files
authored
[dylink] Enable dylink tests in 4gb+ mode. NFC (#20900)
1 parent 1850b75 commit 0a3b753

File tree

3 files changed

+10
-19
lines changed

3 files changed

+10
-19
lines changed

test/common.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -660,10 +660,6 @@ def check_dylink(self):
660660
self.skipTest('no dynamic linking support in wasm2js yet')
661661
if '-fsanitize=undefined' in self.emcc_args:
662662
self.skipTest('no dynamic linking support in UBSan yet')
663-
# Dynamic linking requires IMPORTED_MEMORY which depends on the JS API
664-
# for creating 64-bit memories.
665-
if self.get_setting('GLOBAL_BASE') == '4gb':
666-
self.skipTest('no support for IMPORTED_MEMORY over 4gb yet')
667663

668664
def require_v8(self):
669665
if not config.V8_ENGINE or config.V8_ENGINE not in config.JS_ENGINES:

test/test_core.py

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3400,6 +3400,7 @@ def test_dlfcn_varargs(self):
34003400
@needs_dylink
34013401
@no_sanitize('contains ODR violation')
34023402
@no_2gb('output is sensitive to absolute data layout')
3403+
@no_4gb('output is sensitive to absolute data layout')
34033404
def test_dlfcn_alignment_and_zeroing(self):
34043405
self.set_setting('INITIAL_MEMORY', '16mb')
34053406
create_file('liblib.c', r'''
@@ -4390,21 +4391,6 @@ def test_dylink_static_funcpointer_float(self):
43904391
expected='hello 1: 56.779999\ngot: 1\nhello 1: 12.340000\n',
43914392
header='typedef float (*floatfunc)(float);', force_c=True)
43924393

4393-
@needs_dylink
4394-
def test_missing_signatures(self):
4395-
create_file('test_sig.c', r'''#include <emscripten.h>
4396-
int main() {
4397-
return 0 == ( (long)&emscripten_run_script_string +
4398-
(long)&emscripten_run_script );
4399-
}''')
4400-
self.set_setting('MAIN_MODULE', 1)
4401-
# also test main module with 4GB of memory. we need to emit a "maximum"
4402-
# clause then, even though 4GB is the maximum; see
4403-
# https://github.com/emscripten-core/emscripten/issues/14130
4404-
self.set_setting('ALLOW_MEMORY_GROWTH', '1')
4405-
self.set_setting('MAXIMUM_MEMORY', '4GB')
4406-
self.do_runf('test_sig.c', '')
4407-
44084394
@needs_dylink
44094395
def test_dylink_global_init(self):
44104396
self.dylink_test(r'''

test/test_other.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5282,6 +5282,15 @@ def test_syscall_no_filesystem(self):
52825282
def test_dylink_no_filesystem(self):
52835283
self.run_process([EMCC, test_file('hello_world.c'), '-sMAIN_MODULE=2', '-sNO_FILESYSTEM'])
52845284

5285+
def test_dylink_4gb_max(self):
5286+
# Test main module with 4GB of memory. we need to emit a "maximum"
5287+
# clause then, even though 4GB is the maximum; see
5288+
# https://github.com/emscripten-core/emscripten/issues/14130
5289+
self.set_setting('MAIN_MODULE', '1')
5290+
self.set_setting('ALLOW_MEMORY_GROWTH', '1')
5291+
self.set_setting('MAXIMUM_MEMORY', '4GB')
5292+
self.do_runf(test_file('hello_world.c'))
5293+
52855294
def test_dashS(self):
52865295
self.run_process([EMCC, test_file('hello_world.c'), '-S'])
52875296
self.assertExists('hello_world.s')

0 commit comments

Comments
 (0)