Skip to content

Commit 5555065

Browse files
committed
test_core.py: remove @no_wasm decorator
See: #12335
1 parent 4153f96 commit 5555065

File tree

1 file changed

+3
-81
lines changed

1 file changed

+3
-81
lines changed

tests/test_core.py

Lines changed: 3 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
from tools import shared, building
2525
from runner import RunnerCore, path_from_root, requires_native_clang
2626
from runner import skip_if, no_wasm_backend, needs_dlfcn, no_windows, is_slow_test, create_test_file, parameterized
27-
from runner import js_engines_modify, wasm_engines_modify, env_modify, with_env_modify
27+
from runner import js_engines_modify, wasm_engines_modify, env_modify, with_env_modify, disabled
2828
from runner import NON_ZERO
2929
import clang_native
3030

@@ -104,14 +104,6 @@ def metafunc(self, native_exceptions):
104104
return metafunc
105105

106106

107-
def no_wasm(note=''):
108-
assert not callable(note)
109-
110-
def decorated(f):
111-
return skip_if(f, 'is_wasm', note)
112-
return decorated
113-
114-
115107
def no_wasm2js(note=''):
116108
assert not callable(note)
117109

@@ -2721,7 +2713,7 @@ def test_dlfcn_i64(self):
27212713
self.do_run(src, '|65830|')
27222714

27232715
@needs_dlfcn
2724-
@no_wasm('EM_ASM in shared wasm modules, stored inside the wasm somehow')
2716+
@disabled('EM_ASM in not yet supported in SIDE_MODULE')
27252717
def test_dlfcn_em_asm(self):
27262718
self.prep_dlfcn_lib()
27272719
create_test_file('liblib.cpp', '''
@@ -3767,76 +3759,6 @@ def test_dylink_static_funcpointers(self):
37673759
expected='hello 0\nhello 1\nhello 2\n',
37683760
header='typedef void (*voidfunc)(); void sidey(voidfunc f);', force_c=True)
37693761

3770-
@no_wasm('uses function tables in an asm.js specific way')
3771-
@needs_dlfcn
3772-
def test_dylink_asmjs_funcpointers(self):
3773-
self.dylink_test(
3774-
main=r'''
3775-
#include "header.h"
3776-
#include <emscripten.h>
3777-
void left1() { printf("left1\n"); }
3778-
void left2() { printf("left2\n"); }
3779-
voidfunc getleft1() { return left1; }
3780-
voidfunc getleft2() { return left2; }
3781-
int main(int argc, char **argv) {
3782-
printf("main\n");
3783-
EM_ASM({
3784-
// make the function table sizes a non-power-of-two
3785-
var newSize = alignFunctionTables();
3786-
//out('old size of function tables: ' + newSize);
3787-
while ((newSize & 3) !== 3) {
3788-
Module['FUNCTION_TABLE_v'].push(0);
3789-
newSize = alignFunctionTables();
3790-
}
3791-
//out('new size of function tables: ' + newSize);
3792-
// when masked, the two function pointers 1 and 2 should not happen to fall back to the right place
3793-
assert(((newSize+1) & 3) !== 1 || ((newSize+2) & 3) !== 2);
3794-
loadDynamicLibrary('liblib.so');
3795-
});
3796-
volatilevoidfunc f;
3797-
f = (volatilevoidfunc)left1;
3798-
f();
3799-
f = (volatilevoidfunc)left2;
3800-
f();
3801-
f = (volatilevoidfunc)getright1();
3802-
f();
3803-
f = (volatilevoidfunc)getright2();
3804-
f();
3805-
second();
3806-
return 0;
3807-
}
3808-
''',
3809-
side=r'''
3810-
#include "header.h"
3811-
void right1() { printf("right1\n"); }
3812-
void right2() { printf("right2\n"); }
3813-
voidfunc getright1() { return right1; }
3814-
voidfunc getright2() { return right2; }
3815-
void second() {
3816-
printf("second\n");
3817-
volatilevoidfunc f;
3818-
f = (volatilevoidfunc)getleft1();
3819-
f();
3820-
f = (volatilevoidfunc)getleft2();
3821-
f();
3822-
f = (volatilevoidfunc)right1;
3823-
f();
3824-
f = (volatilevoidfunc)right2;
3825-
f();
3826-
}
3827-
''',
3828-
expected='main\nleft1\nleft2\nright1\nright2\nsecond\nleft1\nleft2\nright1\nright2\n',
3829-
header='''
3830-
#include <stdio.h>
3831-
typedef void (*voidfunc)();
3832-
typedef volatile voidfunc volatilevoidfunc;
3833-
voidfunc getleft1();
3834-
voidfunc getleft2();
3835-
voidfunc getright1();
3836-
voidfunc getright2();
3837-
void second();
3838-
''', need_reverse=False, auto_load=False, force_c=True)
3839-
38403762
@needs_dlfcn
38413763
def test_dylink_funcpointers_wrapper(self):
38423764
self.dylink_test(
@@ -7264,7 +7186,7 @@ def post(filename):
72647186

72657187
self.do_run_in_out_file_test('tests', 'core', 'modularize_closure_pre.c', post_build=post)
72667188

7267-
@no_wasm2js('source maps support')
7189+
@no_wasm2js('symbol names look different wasm2js backtraces')
72687190
def test_emscripten_log(self):
72697191
self.banned_js_engines = [V8_ENGINE] # v8 doesn't support console.log
72707192
self.emcc_args += ['-s', 'DEMANGLE_SUPPORT=1']

0 commit comments

Comments
 (0)