From 207881a32c6f150f4392c511a9ee850aa253b02c Mon Sep 17 00:00:00 2001 From: Colin Ihrig Date: Sun, 26 Apr 2020 13:19:23 -0400 Subject: [PATCH] update uvwasi to version 0.0.8 (#132) * update uvwasi to version 0.0.8 This release focuses on improving the robustness of the path resolution and sandboxing, including support for relative preopen paths. Also remove the ${} around the uvwasi version, which was a mistake. The result was that the latest master was always installed. * test: update wasi suite to test relative paths This commit makes sure that both absolute and relative paths get some test coverage. * test: use uvwasi on alpine Run the WASI tests on Alpine using uvwasi. This requires installing git as well. --- .github/workflows/tests.yml | 12 ++++++------ CMakeLists.txt | 2 +- test/run-wasi-test.py | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7cd37e7..5eda3cf 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -18,7 +18,7 @@ jobs: - {target: gcc-debug, cc: gcc, flags: -DCMAKE_BUILD_TYPE=Debug } # TODO: fails on numeric operations #- {target: gcc-x86, cc: gcc, flags: "-m32", install: "gcc-multilib" } - + steps: - uses: actions/checkout@v2 - name: Install ${{ matrix.config.install }} @@ -48,12 +48,12 @@ jobs: steps: - uses: actions/checkout@v2 - name: Prepare - run: apk add build-base cmake python3 --update-cache + run: apk add build-base cmake python3 git --update-cache - name: Configure run: | mkdir build cd build - cmake -DBUILD_WASI=simple .. # TODO switch to uvwasi + cmake .. - name: Build run: cmake --build build - name: Test WebAssembly spec @@ -275,7 +275,7 @@ jobs: build-platformio-arm: runs-on: ubuntu-latest timeout-minutes: 10 - + steps: - uses: actions/checkout@v2 - name: Set up Python @@ -306,7 +306,7 @@ jobs: build-platformio-riscv: runs-on: ubuntu-latest timeout-minutes: 10 - + steps: - uses: actions/checkout@v2 - name: Set up Python @@ -444,7 +444,7 @@ jobs: name: maintenance (preprocess ops) runs-on: ubuntu-latest timeout-minutes: 10 - + steps: - uses: actions/checkout@v2 - name: Install sponge diff --git a/CMakeLists.txt b/CMakeLists.txt index d600da0..1b263e5 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -166,7 +166,7 @@ elseif(BUILD_WASI MATCHES "uvwasi") FetchContent_Declare( uvwasi GIT_REPOSITORY https://github.com/cjihrig/uvwasi.git - GIT_TAG ${v0.0.7} + GIT_TAG v0.0.8 ) FetchContent_GetProperties(uvwasi) diff --git a/test/run-wasi-test.py b/test/run-wasi-test.py index fb51d2b..aa32f47 100755 --- a/test/run-wasi-test.py +++ b/test/run-wasi-test.py @@ -40,8 +40,8 @@ commands_full = [ }, { "name": "Simple WASI test (wasm-opt -O3)", "wasm": "./wasi/test-opt.wasm", - "args": ["cat", "/wasi/0.txt"], - "expect_pattern": "Hello world*Constructor OK*Args: *; cat; /wasi/0.txt;*fib(20) = 6765*[* ms]*48 65 6c 6c 6f 20 77 6f 72 6c 64*=== done ===*" + "args": ["cat", "./wasi/0.txt"], + "expect_pattern": "Hello world*Constructor OK*Args: *; cat; ./wasi/0.txt;*fib(20) = 6765*[* ms]*48 65 6c 6c 6f 20 77 6f 72 6c 64*=== done ===*" }, { "skip": True, # Direct native calls were removed from wasm3 "name": "Raw/Native funcs benchmark",