diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/lit/binary/dylink.test | 15 | ||||
-rwxr-xr-x | test/lit/binary/dylink.test.wasm | bin | 0 -> 37 bytes | |||
-rw-r--r-- | test/lit/lit.cfg.py | 2 |
3 files changed, 17 insertions, 0 deletions
diff --git a/test/lit/binary/dylink.test b/test/lit/binary/dylink.test new file mode 100644 index 000000000..72341c9ba --- /dev/null +++ b/test/lit/binary/dylink.test @@ -0,0 +1,15 @@ +# Verify that extra bytes in the dylink section are preserved. +# +# `dylink.test.wasm` was generated using emscripten to build a side +# module with two TLS exports (which adds extra information to the +# dylink section) using: +# `emcc -s SIDE_MODULE side.c` +# +# side.c: +# _Thread_local int foo = 10; +# _Thread_local int bar = 11; +# +# and then removing all sections except the dylink section using: +# `llvm-objcopy --only-section=dylink` +RUN: wasm-opt -O1 %s.wasm -o %t.o +RUN: cmp %s.wasm %t.o diff --git a/test/lit/binary/dylink.test.wasm b/test/lit/binary/dylink.test.wasm Binary files differnew file mode 100755 index 000000000..401028d96 --- /dev/null +++ b/test/lit/binary/dylink.test.wasm diff --git a/test/lit/lit.cfg.py b/test/lit/lit.cfg.py index 23b0c3de6..ac89a5991 100644 --- a/test/lit/lit.cfg.py +++ b/test/lit/lit.cfg.py @@ -10,6 +10,8 @@ config.test_exec_root = os.path.join(config.binaryen_build_root, 'test') # Replace all Binaryen tools with their absolute paths bin_dir = os.path.join(config.binaryen_build_root, 'bin') +assert(os.path.isdir(bin_dir)) + for tool_file in os.listdir(bin_dir): tool_path = config.binaryen_build_root + '/bin/' + tool_file tool = tool_file[:-4] if tool_file.endswith('.exe') else tool_file |