Skip to content

Commit 2fca55a

Browse files
authored
tests: Remove redundant/duplicate decorator @no_memory64. NFC (#17248)
1 parent df69d56 commit 2fca55a

File tree

1 file changed

+28
-43
lines changed

1 file changed

+28
-43
lines changed

tests/test_core.py

Lines changed: 28 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -340,21 +340,6 @@ def decorated(self, *args, **kwargs):
340340
return decorator
341341

342342

343-
def no_memory64(note):
344-
assert not callable(note)
345-
346-
def decorator(f):
347-
assert callable(f)
348-
349-
@wraps(f)
350-
def decorated(self, *args, **kwargs):
351-
if self.get_setting('MEMORY64'):
352-
self.skipTest(note)
353-
f(self, *args, **kwargs)
354-
return decorated
355-
return decorator
356-
357-
358343
def no_wasmfs(note):
359344
assert not callable(note)
360345

@@ -617,7 +602,7 @@ def test_bswap64(self):
617602
def test_sha1(self):
618603
self.do_runf(test_file('sha1.c'), 'SHA1=15dd99a1991e0b3826fede3deffc1feba42278e6')
619604

620-
@no_memory64('tests 32-bit specific sizes')
605+
@no_wasm64('tests 32-bit specific sizes')
621606
def test_wasm32_unknown_emscripten(self):
622607
# No other configuration is supported, so always run this.
623608
self.do_runf(test_file('wasm32-unknown-emscripten.c'), '')
@@ -1025,7 +1010,7 @@ def test_mallocstruct(self):
10251010

10261011
@no_asan('ASan does not support custom memory allocators')
10271012
@no_lsan('LSan does not support custom memory allocators')
1028-
@no_memory64('emmalloc does not yet support MEMORY64')
1013+
@no_wasm64('emmalloc does not yet support MEMORY64')
10291014
@parameterized({
10301015
'normal': [],
10311016
'memvalidate': ['-DEMMALLOC_MEMVALIDATE'],
@@ -1045,7 +1030,7 @@ def test_emmalloc(self, *args):
10451030

10461031
@no_asan('ASan does not support custom memory allocators')
10471032
@no_lsan('LSan does not support custom memory allocators')
1048-
@no_memory64('emmalloc does not yet support MEMORY64')
1033+
@no_wasm64('emmalloc does not yet support MEMORY64')
10491034
def test_emmalloc_usable_size(self, *args):
10501035
self.set_setting('MALLOC', 'emmalloc')
10511036
self.emcc_args += list(args)
@@ -1056,7 +1041,7 @@ def test_emmalloc_usable_size(self, *args):
10561041
@no_asan('ASan does not support custom memory allocators')
10571042
@no_lsan('LSan does not support custom memory allocators')
10581043
@no_ubsan('UBSan changes memory consumption')
1059-
@no_memory64('emmalloc does not yet support MEMORY64')
1044+
@no_wasm64('emmalloc does not yet support MEMORY64')
10601045
def test_emmalloc_memory_statistics(self, *args):
10611046

10621047
self.set_setting('MALLOC', 'emmalloc')
@@ -1067,15 +1052,15 @@ def test_emmalloc_memory_statistics(self, *args):
10671052
@no_optimize('output is sensitive to optimization flags, so only test unoptimized builds')
10681053
@no_asan('ASan does not support custom memory allocators')
10691054
@no_lsan('LSan does not support custom memory allocators')
1070-
@no_memory64('emmalloc does not yet support MEMORY64')
1055+
@no_wasm64('emmalloc does not yet support MEMORY64')
10711056
def test_emmalloc_trim(self, *args):
10721057
self.set_setting('MALLOC', 'emmalloc')
10731058
self.emcc_args += ['-sINITIAL_MEMORY=128MB', '-sALLOW_MEMORY_GROWTH', '-sMAXIMUM_MEMORY=2147418112'] + list(args)
10741059

10751060
self.do_core_test('test_emmalloc_trim.cpp')
10761061

10771062
# Test case against https://github.com/emscripten-core/emscripten/issues/10363
1078-
@no_memory64('emmalloc does not yet support MEMORY64')
1063+
@no_wasm64('emmalloc does not yet support MEMORY64')
10791064
def test_emmalloc_memalign_corruption(self, *args):
10801065
self.set_setting('MALLOC', 'emmalloc')
10811066
self.do_core_test('emmalloc_memalign_corruption.cpp')
@@ -2399,7 +2384,7 @@ def test_memorygrowth_3_force_fail_reallocBuffer(self):
23992384
})
24002385
@no_asan('requires more memory when growing')
24012386
@no_lsan('requires more memory when growing')
2402-
@no_memory64('does not fail under wasm64')
2387+
@no_wasm64('does not fail under wasm64')
24032388
def test_aborting_new(self, args):
24042389
# test that C++ new properly errors if we fail to malloc when growth is
24052390
# enabled, with or without growth
@@ -2830,7 +2815,7 @@ def test_pthread_abort_interrupt(self):
28302815

28312816
@no_asan('ASan does not support custom memory allocators')
28322817
@no_lsan('LSan does not support custom memory allocators')
2833-
@no_memory64('emmalloc does not yet support MEMORY64')
2818+
@no_wasm64('emmalloc does not yet support MEMORY64')
28342819
@node_pthreads
28352820
def test_pthread_emmalloc(self):
28362821
self.emcc_args += ['-fno-builtin']
@@ -7164,7 +7149,7 @@ def test_large_exported_response(self):
71647149
self.do_run(src, 'waka 4999!')
71657150
self.assertContained('_exported_func_from_response_file_1', read_file('src.js'))
71667151

7167-
@no_memory64('gives: TypeError: WebAssembly.Table.set(): Argument 1 must be null or a WebAssembly function')
7152+
@no_wasm64('gives: TypeError: WebAssembly.Table.set(): Argument 1 must be null or a WebAssembly function')
71687153
def test_add_function(self):
71697154
self.set_setting('INVOKE_RUN', 0)
71707155
self.set_setting('WASM_ASYNC_COMPILATION', 0)
@@ -7946,7 +7931,7 @@ def test_setlocale(self):
79467931
def test_vswprintf_utf8(self):
79477932
self.do_run_in_out_file_test('vswprintf_utf8.c')
79487933

7949-
@no_memory64('TODO: asyncify for wasm64')
7934+
@no_wasm64('TODO: asyncify for wasm64')
79507935
@with_asyncify_and_stack_switching
79517936
def test_async_hello(self):
79527937
# needs to flush stdio streams
@@ -7972,11 +7957,11 @@ def test_async_hello(self):
79727957
self.do_runf('main.c', 'HelloWorld!99')
79737958

79747959
@requires_v8
7975-
@no_memory64('TODO: asyncify for wasm64')
7960+
@no_wasm64('TODO: asyncify for wasm64')
79767961
def test_async_hello_v8(self):
79777962
self.test_async_hello()
79787963

7979-
@no_memory64('TODO: asyncify for wasm64')
7964+
@no_wasm64('TODO: asyncify for wasm64')
79807965
def test_async_ccall_bad(self):
79817966
# check bad ccall use
79827967
# needs to flush stdio streams
@@ -8007,7 +7992,7 @@ def test_async_ccall_bad(self):
80077992
self.emcc_args += ['--pre-js', 'pre.js']
80087993
self.do_runf('main.c', 'The call to main is running asynchronously.')
80097994

8010-
@no_memory64('TODO: asyncify for wasm64')
7995+
@no_wasm64('TODO: asyncify for wasm64')
80117996
@with_asyncify_and_stack_switching
80127997
def test_async_ccall_good(self):
80137998
# check reasonable ccall use
@@ -8037,7 +8022,7 @@ def test_async_ccall_good(self):
80378022
'': (False,),
80388023
'exit_runtime': (True,),
80398024
})
8040-
@no_memory64('TODO: asyncify for wasm64')
8025+
@no_wasm64('TODO: asyncify for wasm64')
80418026
def test_async_ccall_promise(self, exit_runtime):
80428027
self.set_setting('ASYNCIFY')
80438028
self.set_setting('EXIT_RUNTIME')
@@ -8077,7 +8062,7 @@ def test_async_ccall_promise(self, exit_runtime):
80778062
self.emcc_args += ['--pre-js', 'pre.js']
80788063
self.do_runf('main.c', 'stringf: first\nsecond\n6.4')
80798064

8080-
@no_memory64('TODO: asyncify for wasm64')
8065+
@no_wasm64('TODO: asyncify for wasm64')
80818066
def test_fibers_asyncify(self):
80828067
self.set_setting('ASYNCIFY')
80838068
self.maybe_closure()
@@ -8100,7 +8085,7 @@ def test_asyncify_unused(self):
81008085
'onlylist_b_response': ([], True, '["main","__original_main","foo(int, double)","baz()","c_baz","Structy::funcy()"]'),
81018086
'onlylist_c_response': ([], False, '["main","__original_main","foo(int, double)","baz()","c_baz"]'),
81028087
})
8103-
@no_memory64('TODO: asyncify for wasm64')
8088+
@no_wasm64('TODO: asyncify for wasm64')
81048089
def test_asyncify_lists(self, args, should_pass, response=None):
81058090
if response is not None:
81068091
create_file('response.file', response)
@@ -8131,7 +8116,7 @@ def test_asyncify_lists(self, args, should_pass, response=None):
81318116
'ignoreindirect': (['-sASYNCIFY_IGNORE_INDIRECT'], False),
81328117
'add': (['-sASYNCIFY_IGNORE_INDIRECT', '-sASYNCIFY_ADD=["__original_main","main","virt()"]'], True),
81338118
})
8134-
@no_memory64('TODO: asyncify for wasm64')
8119+
@no_wasm64('TODO: asyncify for wasm64')
81358120
def test_asyncify_indirect_lists(self, args, should_pass):
81368121
self.set_setting('ASYNCIFY')
81378122
self.emcc_args += args
@@ -8145,12 +8130,12 @@ def test_asyncify_indirect_lists(self, args, should_pass):
81458130
raise
81468131

81478132
@no_asan('asyncify stack operations confuse asan')
8148-
@no_memory64('TODO: asyncify for wasm64')
8133+
@no_wasm64('TODO: asyncify for wasm64')
81498134
def test_emscripten_scan_registers(self):
81508135
self.set_setting('ASYNCIFY')
81518136
self.do_core_test('test_emscripten_scan_registers.cpp')
81528137

8153-
@no_memory64('TODO: asyncify for wasm64')
8138+
@no_wasm64('TODO: asyncify for wasm64')
81548139
def test_asyncify_assertions(self):
81558140
self.set_setting('ASYNCIFY')
81568141
self.set_setting('ASYNCIFY_IMPORTS', ['suspend'])
@@ -8159,7 +8144,7 @@ def test_asyncify_assertions(self):
81598144

81608145
@no_lsan('leaks asyncify stack during exit')
81618146
@no_asan('leaks asyncify stack during exit')
8162-
@no_memory64('TODO: asyncify for wasm64')
8147+
@no_wasm64('TODO: asyncify for wasm64')
81638148
def test_asyncify_during_exit(self):
81648149
self.set_setting('ASYNCIFY')
81658150
self.set_setting('ASSERTIONS')
@@ -8178,7 +8163,7 @@ def test_asyncify_main_module(self):
81788163
self.do_core_test('test_hello_world.c')
81798164

81808165
@no_asan('asyncify stack operations confuse asan')
8181-
@no_memory64('TODO: asyncify for wasm64')
8166+
@no_wasm64('TODO: asyncify for wasm64')
81828167
@no_wasm2js('TODO: lazy loading in wasm2js')
81838168
@parameterized({
81848169
'conditional': (True,),
@@ -8754,7 +8739,7 @@ def test_template_class_deduction(self):
87548739

87558740
@no_wasm2js('TODO: ASAN in wasm2js')
87568741
@no_safe_heap('asan does not work with SAFE_HEAP')
8757-
@no_memory64('TODO: ASAN in memory64')
8742+
@no_wasm64('TODO: ASAN in memory64')
87588743
@parameterized({
87598744
'c': ['test_asan_no_error.c'],
87608745
'cpp': ['test_asan_no_error.cpp'],
@@ -8770,7 +8755,7 @@ def test_asan_no_error(self, name):
87708755
# stores, and then the stores identified as dead, which leaves nothing for
87718756
# asan to test. here we want to test asan itself, so we work around that.
87728757
@no_safe_heap('asan does not work with SAFE_HEAP')
8773-
@no_memory64('TODO: ASAN in memory64')
8758+
@no_wasm64('TODO: ASAN in memory64')
87748759
@parameterized({
87758760
'use_after_free_c': ('test_asan_use_after_free.c', [
87768761
'AddressSanitizer: heap-use-after-free on address',
@@ -8842,7 +8827,7 @@ def test_asan(self, name, expected_output, cflags=None):
88428827

88438828
@no_safe_heap('asan does not work with SAFE_HEAP')
88448829
@no_wasm2js('TODO: ASAN in wasm2js')
8845-
@no_memory64('TODO: ASAN in memory64')
8830+
@no_wasm64('TODO: ASAN in memory64')
88468831
def test_asan_js_stack_op(self):
88478832
self.emcc_args.append('-fsanitize=address')
88488833
self.set_setting('ALLOW_MEMORY_GROWTH')
@@ -8852,15 +8837,15 @@ def test_asan_js_stack_op(self):
88528837

88538838
@no_safe_heap('asan does not work with SAFE_HEAP')
88548839
@no_wasm2js('TODO: ASAN in wasm2js')
8855-
@no_memory64('TODO: ASAN in memory64')
8840+
@no_wasm64('TODO: ASAN in memory64')
88568841
def test_asan_api(self):
88578842
self.emcc_args.append('-fsanitize=address')
88588843
self.set_setting('INITIAL_MEMORY', '300mb')
88598844
self.do_core_test('test_asan_api.c')
88608845

88618846
@no_safe_heap('asan does not work with SAFE_HEAP')
88628847
@no_wasm2js('TODO: ASAN in wasm2js')
8863-
@no_memory64('TODO: ASAN in memory64')
8848+
@no_wasm64('TODO: ASAN in memory64')
88648849
def test_asan_modularized_with_closure(self):
88658850
# the bug is that createModule() returns undefined, instead of the
88668851
# proper Promise object.
@@ -9311,7 +9296,7 @@ def test_emscripten_stack(self):
93119296
self.do_core_test('test_stack_get_free.c')
93129297

93139298
# Tests settings.ABORT_ON_WASM_EXCEPTIONS
9314-
@no_memory64('missing "crashing"')
9299+
@no_wasm64('missing "crashing"')
93159300
def test_abort_on_exceptions(self):
93169301
# Explictly disable EXIT_RUNTIME, since otherwise addOnPostRun does not work.
93179302
# https://github.com/emscripten-core/emscripten/issues/15080
@@ -9371,7 +9356,7 @@ def test_embind_lib_with_asyncify(self, args):
93719356
self.do_core_test('embind_lib_with_asyncify.cpp')
93729357

93739358
@no_asan('asyncify stack operations confuse asan')
9374-
@no_memory64('TODO: asyncify for wasm64')
9359+
@no_wasm64('TODO: asyncify for wasm64')
93759360
def test_em_async_js(self):
93769361
self.uses_es6 = True
93779362
self.set_setting('ASYNCIFY')

0 commit comments

Comments
 (0)