From 887837c65b26009cd93fdb6df1efa2e576a699bb Mon Sep 17 00:00:00 2001 From: yhirose Date: Wed, 29 Apr 2026 10:27:18 +0900 Subject: [PATCH] Run mbedTLS test shards with SHARDS=2 to reduce flakiness Under ASAN+mbedTLS, the default 4-way sharding loads CI runners enough that timing-sensitive ServerTest cases (Delete, PostMethod2, GetStreamed, ...) flake on what looks like first-request keep-alive reuse. Reducing to 2 shards halves contention and historically stabilizes these on local runs. The total test time goes up roughly 1.5x (still well under the job budget) which is an acceptable trade for reliability. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/test.yaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 212cc15..0a20596 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -108,7 +108,10 @@ jobs: LSAN_OPTIONS: suppressions=lsan_suppressions.txt - name: build and run tests (Mbed TLS) if: matrix.tls_backend == 'mbedtls' - run: cd test && make test_split_mbedtls && make test_mbedtls_parallel + # Run mbedTLS shards with reduced parallelism — under ASAN+mbedTLS the + # default 4 shards overload CI runners enough that timing-sensitive + # ServerTest cases flake on first-request keep-alive reuse. + run: cd test && make test_split_mbedtls && SHARDS=2 make test_mbedtls_parallel - name: build and run tests (wolfSSL) if: matrix.tls_backend == 'wolfssl' run: cd test && make test_split_wolfssl && make test_wolfssl_parallel @@ -237,7 +240,10 @@ jobs: LSAN_OPTIONS: suppressions=lsan_suppressions.txt - name: build and run tests (Mbed TLS) if: matrix.tls_backend == 'mbedtls' - run: cd test && make test_split_mbedtls && make test_mbedtls_parallel + # Run mbedTLS shards with reduced parallelism — under ASAN+mbedTLS the + # default 4 shards overload CI runners enough that timing-sensitive + # ServerTest cases flake on first-request keep-alive reuse. + run: cd test && make test_split_mbedtls && SHARDS=2 make test_mbedtls_parallel - name: build and run tests (wolfSSL) if: matrix.tls_backend == 'wolfssl' run: cd test && make test_split_wolfssl && make test_wolfssl_parallel