From b869571a9555cb4ccf9bedeccaad84b290704fd5 Mon Sep 17 00:00:00 2001 From: Thibault Charbonnier Date: Thu, 27 Jun 2024 17:40:50 -0700 Subject: [PATCH] wip --- .github/workflows/ci-large.yml | 16 ++++++++-------- .github/workflows/ci.yml | 1 - .github/workflows/job-unit-tests.yml | 6 +----- .github/workflows/job-valgrind-tests.yml | 4 ++-- t/03-proxy_wasm/hfuncs/130-proxy_dispatch_http.t | 5 +++-- .../hfuncs/131-proxy_dispatch_http_timeouts.t | 4 ++-- .../hfuncs/132-proxy_dispatch_http_ssl.t | 4 ++-- t/TestWasmX.pm | 2 -- 8 files changed, 18 insertions(+), 24 deletions(-) diff --git a/.github/workflows/ci-large.yml b/.github/workflows/ci-large.yml index ccb55ef26..771a68229 100644 --- a/.github/workflows/ci-large.yml +++ b/.github/workflows/ci-large.yml @@ -1,8 +1,8 @@ name: Large CI on: - #pull_request: - # branches: '**' + pull_request: + branches: '**' schedule: - cron: '0 9 * * *' # 9am UTC, 2am PST workflow_dispatch: @@ -47,7 +47,8 @@ jobs: hup: no_hup module_type: static # macOS - Wasmer (full) - - runtime: wasmer + - label: macos_wasmer_full + runtime: wasmer wasmer: 3.1.1 os: macos-latest cc: clang @@ -56,7 +57,8 @@ jobs: debug: debug hup: no_hup # macOS - Wasmtime - - runtime: wasmtime + - label: macos_wasmtime + runtime: wasmtime wasmtime: 19.0.0 os: macos-latest cc: clang @@ -64,9 +66,9 @@ jobs: ssl: ssl debug: debug hup: hup - path: t/01-wasm # macOS - V8 - - runtime: v8 + - label: macos_v8 + runtime: v8 v8: 12.0.267.17 os: macos-latest cc: clang @@ -74,7 +76,6 @@ jobs: ssl: ssl debug: debug hup: no_hup - path: t/01-wasm uses: ./.github/workflows/job-unit-tests.yml with: os: ${{ matrix.os }} @@ -90,7 +91,6 @@ jobs: debug: ${{ matrix.debug }} hup: ${{ matrix.hup }} module_type: ${{ matrix.module_type }} - path: ${{ matrix.path }} valgrind: name: 'Valgrind' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 687cfc00e..8ef5fbbf9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -182,7 +182,6 @@ jobs: v8: [""] hup: [no_hup, hup] debug: [debug] - path: [""] include: # Wasmtime - runtime: wasmtime diff --git a/.github/workflows/job-unit-tests.yml b/.github/workflows/job-unit-tests.yml index 6dc9cfce7..4c9e97dcd 100644 --- a/.github/workflows/job-unit-tests.yml +++ b/.github/workflows/job-unit-tests.yml @@ -42,9 +42,6 @@ on: module_type: required: true type: string - path: - required: false - type: string coverage: required: false type: boolean @@ -133,8 +130,7 @@ jobs: - name: Run tests run: | ulimit -c unlimited - IN_PATH="${{ inputs.path != '' && inputs.path || 't/0*' }}" - ./util/test.sh ${IN_PATH} + ./util/test.sh t/0* 2>&1 | tee valgrind.out - name: Run lcov id: lcov if: ${{ !env.ACT && inputs.coverage }} diff --git a/.github/workflows/job-valgrind-tests.yml b/.github/workflows/job-valgrind-tests.yml index 4fd23bf1e..c0eed995c 100644 --- a/.github/workflows/job-valgrind-tests.yml +++ b/.github/workflows/job-valgrind-tests.yml @@ -118,8 +118,8 @@ jobs: - run: make - name: Run tests run: | - IN_PATH="${{ inputs.path }}" - ./util/test.sh ${IN_PATH:-t/} 2>&1 | tee valgrind.out + IN_PATH="${{ inputs.path }}" + ./util/test.sh ${IN_PATH:-t/0*} 2>&1 | tee valgrind.out - run: | awk -f ./util/parse-valgrind.awk valgrind.out > valgrind.log if [[ -s valgrind.log ]]; then diff --git a/t/03-proxy_wasm/hfuncs/130-proxy_dispatch_http.t b/t/03-proxy_wasm/hfuncs/130-proxy_dispatch_http.t index f1071b9b6..7356cd8a7 100644 --- a/t/03-proxy_wasm/hfuncs/130-proxy_dispatch_http.t +++ b/t/03-proxy_wasm/hfuncs/130-proxy_dispatch_http.t @@ -220,7 +220,8 @@ qq{ === TEST 13: proxy_wasm - dispatch_http_call() unix domain socket, bad path (EISDIR) -In Linux, "Connection refused"; in macOS, "Socket operation on non-socket". +Linux: "Connection refused" +macOS: "Socket operation on non-socket" --- wasm_modules: hostcalls --- config eval qq{ @@ -378,7 +379,7 @@ Host: localhost\s* === TEST 19: proxy_wasm - dispatch_http_call() sanity resolver + hostname (IPv4), default port -This test passes intermittently in CI when ran in a macOS host. +macOS: intermitent failures Needs IPv4 resolution + external I/O to succeed. Succeeds on: - HTTP 200 (httpbin.org/headers success) diff --git a/t/03-proxy_wasm/hfuncs/131-proxy_dispatch_http_timeouts.t b/t/03-proxy_wasm/hfuncs/131-proxy_dispatch_http_timeouts.t index 1135120b1..8ea0def08 100644 --- a/t/03-proxy_wasm/hfuncs/131-proxy_dispatch_http_timeouts.t +++ b/t/03-proxy_wasm/hfuncs/131-proxy_dispatch_http_timeouts.t @@ -72,7 +72,7 @@ qr/(\[error\]|Uncaught RuntimeError|\s+).*?dispatch failed: tcp socket - resolve === TEST 3: proxy_wasm - dispatch_http_call() read timeout -mockeagain, required for triggering read timeout, doesn't support macOS. +macOS: mockeagain NYI --- skip_eval: 4: $::osname =~ m/darwin/ --- load_nginx_modules: ngx_http_echo_module --- wasm_modules: hostcalls @@ -99,7 +99,7 @@ qr/(\[error\]|Uncaught RuntimeError|\s+).*?dispatch failed: tcp socket - timed o === TEST 4: proxy_wasm - dispatch_http_call() write timeout -mockeagain, required for triggering write timeout, doesn't support macOS. +macOS: mockeagain NYI --- skip_eval: 4: $::osname =~ m/darwin/ --- load_nginx_modules: ngx_http_echo_module --- wasm_modules: hostcalls diff --git a/t/03-proxy_wasm/hfuncs/132-proxy_dispatch_http_ssl.t b/t/03-proxy_wasm/hfuncs/132-proxy_dispatch_http_ssl.t index a73d88bbb..7b8ca5bdb 100644 --- a/t/03-proxy_wasm/hfuncs/132-proxy_dispatch_http_ssl.t +++ b/t/03-proxy_wasm/hfuncs/132-proxy_dispatch_http_ssl.t @@ -388,7 +388,7 @@ foo === TEST 12: proxy_wasm - dispatch_https_call() no trusted CA -This test passes intermittently in CI when ran in a macOS host. +macOS: intermitent failures --- skip_eval: 4: $::osname =~ m/darwin/ --- timeout eval: $::ExtTimeout --- main_config eval @@ -419,7 +419,7 @@ qr/(\[error\]|Uncaught RuntimeError|\s+).*?dispatch failed: tcp socket - tls cer === TEST 13: proxy_wasm - dispatch_https_call() empty trusted CA path -This test passes intermittently in CI when ran in a macOS host. +macOS: intermitent failures --- skip_eval: 4: $::osname =~ m/darwin/ --- timeout eval: $::ExtTimeout --- main_config eval diff --git a/t/TestWasmX.pm b/t/TestWasmX.pm index a833f0723..6e9aab4fc 100644 --- a/t/TestWasmX.pm +++ b/t/TestWasmX.pm @@ -10,7 +10,6 @@ use POSIX qw(sysconf _SC_PAGESIZE); our $pwd = cwd(); our $osname = $Config{"osname"}; -our $archname = eval { `uname -m` }; our $crates = "$pwd/work/lib/wasm"; our $buildroot = "$pwd/work/buildroot"; our $nginxbin = $ENV{TEST_NGINX_BINARY} || 'nginx'; @@ -24,7 +23,6 @@ our @nginx_modules; our @EXPORT = qw( $pwd $osname - $archname $crates $buildroot $nginxbin