From 24d274983df9f7dbeebe8a890297d4f30d5bbca7 Mon Sep 17 00:00:00 2001 From: Heejin Ahn <aheejin@gmail.com> Date: Fri, 29 Nov 2019 18:33:41 -0800 Subject: Update spec test suite (#2484) This updates spec test suite to that of the current up-to-date version of https://github.com/WebAssembly/spec repo. - All failing tests are added in `BLACKLIST` in shared.py with reasons. - For tests that already existed and was passing and started failing after the update, we add the new test to the blacklist and preserve the old file by renaming it to 'old_[FILENAME].wast' not to lose test coverage. When the cause of the error is fixed or the unsupported construct gets support so the new test passes, we can delete the corresponding 'old_[FILENAME].wast' file. - Adds support for `spectest.print_[type] style imports. --- src/tools/wasm-shell.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/tools/wasm-shell.cpp') diff --git a/src/tools/wasm-shell.cpp b/src/tools/wasm-shell.cpp index 4f7624294..b83989a2d 100644 --- a/src/tools/wasm-shell.cpp +++ b/src/tools/wasm-shell.cpp @@ -164,7 +164,7 @@ static void run_asserts(Name moduleName, }; ModuleUtils::iterImportedGlobals(wasm, reportUnknownImport); ModuleUtils::iterImportedFunctions(wasm, [&](Importable* import) { - if (import->module == SPECTEST && import->base == PRINT) { + if (import->module == SPECTEST && import->base.startsWith(PRINT)) { // We can handle it. } else { reportUnknownImport(import); @@ -181,7 +181,7 @@ static void run_asserts(Name moduleName, // spec tests consider it illegal to use spectest.print in a table if (auto* import = wasm.getFunction(name)) { if (import->imported() && import->module == SPECTEST && - import->base == PRINT) { + import->base.startsWith(PRINT)) { std::cerr << "cannot put spectest.print in table\n"; invalid = true; } -- cgit v1.2.3