24
24
from tools import shared , building
25
25
from runner import RunnerCore , path_from_root , requires_native_clang
26
26
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
28
28
from runner import NON_ZERO
29
29
import clang_native
30
30
@@ -104,14 +104,6 @@ def metafunc(self, native_exceptions):
104
104
return metafunc
105
105
106
106
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
-
115
107
def no_wasm2js (note = '' ):
116
108
assert not callable (note )
117
109
@@ -2721,7 +2713,7 @@ def test_dlfcn_i64(self):
2721
2713
self .do_run (src , '|65830|' )
2722
2714
2723
2715
@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 ' )
2725
2717
def test_dlfcn_em_asm (self ):
2726
2718
self .prep_dlfcn_lib ()
2727
2719
create_test_file ('liblib.cpp' , '''
@@ -3771,76 +3763,6 @@ def test_dylink_static_funcpointers(self):
3771
3763
expected = 'hello 0\n hello 1\n hello 2\n ' ,
3772
3764
header = 'typedef void (*voidfunc)(); void sidey(voidfunc f);' , force_c = True )
3773
3765
3774
- @no_wasm ('uses function tables in an asm.js specific way' )
3775
- @needs_dlfcn
3776
- def test_dylink_asmjs_funcpointers (self ):
3777
- self .dylink_test (
3778
- main = r'''
3779
- #include "header.h"
3780
- #include <emscripten.h>
3781
- void left1() { printf("left1\n"); }
3782
- void left2() { printf("left2\n"); }
3783
- voidfunc getleft1() { return left1; }
3784
- voidfunc getleft2() { return left2; }
3785
- int main(int argc, char **argv) {
3786
- printf("main\n");
3787
- EM_ASM({
3788
- // make the function table sizes a non-power-of-two
3789
- var newSize = alignFunctionTables();
3790
- //out('old size of function tables: ' + newSize);
3791
- while ((newSize & 3) !== 3) {
3792
- Module['FUNCTION_TABLE_v'].push(0);
3793
- newSize = alignFunctionTables();
3794
- }
3795
- //out('new size of function tables: ' + newSize);
3796
- // when masked, the two function pointers 1 and 2 should not happen to fall back to the right place
3797
- assert(((newSize+1) & 3) !== 1 || ((newSize+2) & 3) !== 2);
3798
- loadDynamicLibrary('liblib.so');
3799
- });
3800
- volatilevoidfunc f;
3801
- f = (volatilevoidfunc)left1;
3802
- f();
3803
- f = (volatilevoidfunc)left2;
3804
- f();
3805
- f = (volatilevoidfunc)getright1();
3806
- f();
3807
- f = (volatilevoidfunc)getright2();
3808
- f();
3809
- second();
3810
- return 0;
3811
- }
3812
- ''' ,
3813
- side = r'''
3814
- #include "header.h"
3815
- void right1() { printf("right1\n"); }
3816
- void right2() { printf("right2\n"); }
3817
- voidfunc getright1() { return right1; }
3818
- voidfunc getright2() { return right2; }
3819
- void second() {
3820
- printf("second\n");
3821
- volatilevoidfunc f;
3822
- f = (volatilevoidfunc)getleft1();
3823
- f();
3824
- f = (volatilevoidfunc)getleft2();
3825
- f();
3826
- f = (volatilevoidfunc)right1;
3827
- f();
3828
- f = (volatilevoidfunc)right2;
3829
- f();
3830
- }
3831
- ''' ,
3832
- expected = 'main\n left1\n left2\n right1\n right2\n second\n left1\n left2\n right1\n right2\n ' ,
3833
- header = '''
3834
- #include <stdio.h>
3835
- typedef void (*voidfunc)();
3836
- typedef volatile voidfunc volatilevoidfunc;
3837
- voidfunc getleft1();
3838
- voidfunc getleft2();
3839
- voidfunc getright1();
3840
- voidfunc getright2();
3841
- void second();
3842
- ''' , need_reverse = False , auto_load = False , force_c = True )
3843
-
3844
3766
@needs_dlfcn
3845
3767
def test_dylink_funcpointers_wrapper (self ):
3846
3768
self .dylink_test (
@@ -7272,8 +7194,7 @@ def post(filename):
7272
7194
7273
7195
self .do_run_in_out_file_test ('tests' , 'core' , 'modularize_closure_pre.c' , post_build = post )
7274
7196
7275
- @no_wasm ('wasmifying destroys debug info and stack tracability' )
7276
- @no_wasm2js ('source maps support' )
7197
+ @no_wasm2js ('symbol names look different wasm2js backtraces' )
7277
7198
def test_emscripten_log (self ):
7278
7199
self .banned_js_engines = [V8_ENGINE ] # v8 doesn't support console.log
7279
7200
self .emcc_args += ['-s' , 'DEMANGLE_SUPPORT=1' ]
@@ -7282,10 +7203,9 @@ def test_emscripten_log(self):
7282
7203
self .emcc_args += ['-DRUN_FROM_JS_SHELL' ]
7283
7204
self .do_run_in_out_file_test ('tests' , 'emscripten_log' , 'emscripten_log.cpp' )
7284
7205
# test closure compiler as well
7285
- if self .run_name == 'asm2' :
7286
- print ('closure' )
7287
- self .emcc_args += ['--closure' , '1' , '-g1' ] # extra testing
7288
- self .do_run_in_out_file_test ('tests' , 'emscripten_log' , 'emscripten_log_with_closure' )
7206
+ print ('closure' )
7207
+ self .emcc_args += ['--closure' , '1' , '-g1' ] # extra testing
7208
+ self .do_run_in_out_file_test ('tests' , 'emscripten_log' , 'emscripten_log_with_closure.cpp' )
7289
7209
7290
7210
def test_float_literals (self ):
7291
7211
self .do_run_in_out_file_test ('tests' , 'test_float_literals.cpp' )
0 commit comments