- u_async.c: process immediate_queue BEFORE epoll_wait in uasync_poll - stcp_link.c: defensive NULL etcp_conn/etcp_link in stcp_link_close - utun_instance.c: move stcp_server_list_destroy_all to Phase J (before ETCP), add deferred drain in both Phase J and L - stcp.h/c: STCP_HS_ENC_CLIENT 6→38, STCP_HS_ENC_SERVER 7→39, exchange ed25519_pubkey in both handshake directions - etcp_connections.c: copy peer_ed25519 from STCP to ETCP_CONN in etcp_link_enter_ready_tcp; guard link->etcp in tcp_link_close_cb - chat_sync.c: fix lk->conn NULL dereference for TCP links - test_stcp.c: update stcp_server_create/stcp_client_connect callsites - tools/chat_tcp_test: change transport udp→tcp
61 lines
1.7 KiB
Batchfile
61 lines
1.7 KiB
Batchfile
@echo off
|
|
setlocal EnableDelayedExpansion
|
|
|
|
echo ==========================================
|
|
echo uTun Test Suite - Windows
|
|
echo ==========================================
|
|
echo.
|
|
|
|
set "TESTS_DIR=tests"
|
|
set "LOGS_DIR=tests\logs"
|
|
set "PASSED=0"
|
|
set "FAILED=0"
|
|
set "TOTAL=0"
|
|
|
|
:: Create logs directory if not exists
|
|
if not exist "%LOGS_DIR%" mkdir "%LOGS_DIR%"
|
|
|
|
:: List of all test executables
|
|
set "TEST_LIST=test_etcp_crypto test_crypto test_etcp_two_instances test_etcp_simple_traffic test_etcp_minimal test_etcp_100_packets test_pkt_normalizer_etcp test_pkt_normalizer_standalone test_etcp_api test_ll_queue test_ecc_encrypt test_intensive_memory_pool test_memory_pool_and_config test_packet_dump test_u_async_comprehensive test_u_async_performance test_debug_categories test_config_debug test_route_lib test_bgp_route_exchange bench_timeout_heap bench_uasync_timeouts"
|
|
|
|
echo Running tests...
|
|
echo.
|
|
|
|
for %%t in (%TEST_LIST%) do (
|
|
set /a TOTAL+=1
|
|
set "TEST_EXE=%TESTS_DIR%\%%t.exe"
|
|
set "LOG_FILE=%LOGS_DIR%\%%t.log"
|
|
|
|
if exist "!TEST_EXE!" (
|
|
echo [RUN] %%t.exe
|
|
"!TEST_EXE!" > "!LOG_FILE!" 2>&1
|
|
if !ERRORLEVEL! equ 0 (
|
|
echo [PASS] %%t.exe
|
|
set /a PASSED+=1
|
|
) else (
|
|
echo [FAIL] %%t.exe ^(exit code: !ERRORLEVEL!^)
|
|
set /a FAILED+=1
|
|
)
|
|
) else (
|
|
echo [SKIP] %%t.exe ^(not found^)
|
|
)
|
|
)
|
|
|
|
echo.
|
|
echo ==========================================
|
|
echo Test Summary
|
|
echo ==========================================
|
|
echo Total: %TOTAL%
|
|
echo Passed: %PASSED%
|
|
echo Failed: %FAILED%
|
|
echo.
|
|
|
|
if %FAILED% equ 0 (
|
|
echo All tests PASSED!
|
|
exit /b 0
|
|
) else (
|
|
echo Some tests FAILED!
|
|
echo Check logs in %LOGS_DIR% for details
|
|
exit /b 1
|
|
)
|