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) <noreply@anthropic.com>
This commit is contained in:
yhirose
2026-04-29 10:27:18 +09:00
parent 3d56762d5c
commit 887837c65b

View File

@@ -108,7 +108,10 @@ jobs:
LSAN_OPTIONS: suppressions=lsan_suppressions.txt LSAN_OPTIONS: suppressions=lsan_suppressions.txt
- name: build and run tests (Mbed TLS) - name: build and run tests (Mbed TLS)
if: matrix.tls_backend == 'mbedtls' 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) - name: build and run tests (wolfSSL)
if: matrix.tls_backend == 'wolfssl' if: matrix.tls_backend == 'wolfssl'
run: cd test && make test_split_wolfssl && make test_wolfssl_parallel run: cd test && make test_split_wolfssl && make test_wolfssl_parallel
@@ -237,7 +240,10 @@ jobs:
LSAN_OPTIONS: suppressions=lsan_suppressions.txt LSAN_OPTIONS: suppressions=lsan_suppressions.txt
- name: build and run tests (Mbed TLS) - name: build and run tests (Mbed TLS)
if: matrix.tls_backend == 'mbedtls' 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) - name: build and run tests (wolfSSL)
if: matrix.tls_backend == 'wolfssl' if: matrix.tls_backend == 'wolfssl'
run: cd test && make test_split_wolfssl && make test_wolfssl_parallel run: cd test && make test_split_wolfssl && make test_wolfssl_parallel