From 3eee716b508916e50a701338f1d271cbe4e55f20 Mon Sep 17 00:00:00 2001 From: evgeny Date: Sat, 10 Oct 2026 14:22:06 +0200 Subject: [PATCH] tests: run short checks before slow and load scenarios --- check.bat | 2 +- tests/Makefile.am | 306 +++++++++++++++++++++++++--------------------- 2 files changed, 169 insertions(+), 139 deletions(-) diff --git a/check.bat b/check.bat index e44bd96b..4ae482ca 100644 --- a/check.bat +++ b/check.bat @@ -16,7 +16,7 @@ set "TOTAL=0" 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" +set "TEST_LIST=bench_timeout_heap bench_uasync_timeouts test_etcp_minimal test_u_async_performance test_packet_dump test_config_debug test_debug_categories test_memory_pool_and_config test_etcp_crypto test_route_lib test_crypto test_ecc_encrypt test_ll_queue test_intensive_memory_pool test_pkt_normalizer_standalone test_etcp_two_instances test_u_async_comprehensive test_etcp_simple_traffic test_pkt_normalizer_etcp test_etcp_100_packets test_etcp_api test_bgp_route_exchange" echo Running tests... echo. diff --git a/tests/Makefile.am b/tests/Makefile.am index acdfaa18..ae354509 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -2,149 +2,182 @@ EXTRA_DIST = fixtures/reality_openssl_hello.hex data/silero_speech.pcm data/silero_speech.txt -# All available tests (check_PROGRAMS runs via automake check-TESTS) +# Порядок по замерам Linux: быстрые проверки раньше длительных; состав зависит от прежних configure-условий. + +# Быстрые проверки (до 100мс). check_PROGRAMS = \ - test_ll_queue \ - test_serialize \ - test_stream_cipher \ - test_stream_sign \ - test_etcp_transport \ - test_transport \ - test_stcp \ - test_packet_dump \ - test_debug_categories \ - test_config_debug \ - test_memory_pool_and_config \ - test_etcp_api \ - test_etcp_crypto \ - test_pkt_normalizer_standalone \ - test_route_lib \ - test_radix \ - test_route6_lib \ - test_etcp_router_unit \ - test_etcp_router_faults \ - test_etcp_lifecycle \ - test_etcp_session \ - test_topo_recovery \ - test_etcp_minimal \ - test_ipv6_sockets \ - test_u_async_timeouts \ - test_u_async_comprehensive \ - test_etcp_two_instances \ - test_etcp_simple_traffic \ - test_etcp_100_packets \ - test_etcp_reconnect \ - test_etcp_seq_collision \ - test_pkt_normalizer_etcp \ - test_lwip_tcp \ - test_u_async_performance \ - test_etcp_router \ - test_etcp_router_tcp \ - test_etcp_router_reconnect \ - test_etcp_bbr \ - test_etcp_ping \ - test_stcp_ping \ - test_route_ping \ - test_nat_detection \ - test_nat_engine \ - test_nat_transport \ - test_nat_stress \ - test_tcp_proxy_server \ - test_udp_proxy \ - test_icmp_proxy \ - test_proxy_packets \ - test_proxy_regressions \ - test_http_proxy \ - test_tcp_proxy_client \ - test_socks_http_proxy \ - test_socks_client \ - test_bgp_route_exchange \ - test_bgp_triangle \ - test_bgp_paths \ - test_broadcast \ - test_conn_mgr \ - test_conn_mgr_phases \ - test_conn_mgr_handles \ - test_conn_mgr_already_connected \ - test_sock_match \ - test_invite_group_create \ - test_etcp_connect \ - test_node_conn_direct \ - test_group_ownership \ - test_services \ - test_member_files \ - test_member_files_network \ - test_group_avatar \ - test_daemon_worker \ - test_group_exchange \ - test_group_recovery \ - test_group_connect \ - test_node_snapshot \ - test_ncd_config \ - test_db_sync \ - test_db_sync_schema \ - test_merkle_sync \ - test_merkle_protocol \ - test_chat_feedback \ - test_member_adapter \ - test_chat_sync_stress \ - test_chat_join \ - test_chat_join_e2e \ - test_dm_e2e \ - test_dm_invite \ - test_dm_media \ - test_dm_worker \ - test_attachment \ - test_attachment_send \ - test_call \ - test_call_headless \ - test_radio \ - test_radio_headless \ - test_radio_mesh \ - test_stcp_traffic \ - test_bbr_integration \ - test_audio_compressor \ - test_radio_vad \ - test_intensive_memory_pool \ - test_tcp_io \ - test_uasync_socket_race \ - test_ntp \ - test_async_dns \ - test_opus_codec \ - test_media_async \ - test_media_index \ - test_media_delivery_sql \ - test_media_delivery_download \ - test_media_download_timeout \ - test_media_delivery_integration \ - test_media_delivery_full \ - test_media_delivery_chat \ - test_etcp_link_stress \ - test_reality_tls \ - test_reality_record \ - test_reality_hello \ - test_reality_bgp \ - test_reality_config \ - test_dm \ - bench_timeout_heap \ - bench_uasync_timeouts - -# Linux-only: test_auto_socket_dynamic требует root + dummy-интерфейсы + iproute2/netlink. + test_memory_pool_and_config \ + test_serialize \ + bench_uasync_timeouts \ + test_etcp_minimal \ + test_sock_match \ + test_u_async_performance \ + bench_timeout_heap \ + test_config_debug \ + test_debug_categories \ + test_etcp_bbr \ + test_packet_dump \ + test_radio_vad \ + test_media_delivery_sql \ + test_etcp_crypto \ + test_http_proxy \ + test_route_lib \ + test_reality_hello \ + test_stream_cipher \ + test_reality_record \ + test_stream_sign \ + test_reality_config \ + test_dm \ + test_nat_engine \ + test_opus_codec \ + test_member_files \ + test_attachment \ + test_media_index \ + test_etcp_lifecycle \ + test_reality_bgp \ + test_tcp_proxy_client \ + test_proxy_packets \ + test_media_delivery_download \ + test_transport \ + test_etcp_router_unit \ + test_group_ownership \ + test_merkle_protocol \ + test_ncd_config \ + test_node_snapshot \ + test_route6_lib \ + test_etcp_transport \ + test_stcp_ping \ + test_intensive_memory_pool \ + test_ll_queue \ + test_invite_group_create \ + test_nat_transport \ + test_conn_mgr_already_connected \ + test_udp_proxy \ + test_icmp_proxy \ + test_chat_poll \ + test_pkt_normalizer_standalone \ + test_services \ + test_etcp_ping \ + test_etcp_router_faults \ + test_etcp_seq_collision \ + test_conn_mgr \ + test_ntp \ + test_route_ping \ + test_tcp_proxy_server \ + test_db_sync_schema \ + test_member_adapter \ + test_chat_feedback \ + test_uasync_socket_race \ + test_etcp_two_instances \ + test_reality_tls \ + test_radix \ + test_daemon_worker \ + test_attachment_send \ + test_conn_mgr_handles \ + test_tcp_io_flush + +if OS_LINUX +check_PROGRAMS += \ + test_reality_fallback \ + test_etcp_padding \ + test_ll_queue_regressions +endif + +# Короткие интеграционные проверки (до 1с). +check_PROGRAMS += \ + test_u_async_comprehensive \ + test_nat_detection \ + test_audio_compressor \ + test_etcp_simple_traffic \ + test_pkt_normalizer_etcp \ + test_broadcast \ + test_stcp_traffic \ + test_etcp_100_packets \ + test_topo_recovery \ + test_group_exchange \ + test_etcp_router_reconnect \ + test_ipv6_sockets \ + test_radio_headless \ + test_radio_mesh \ + test_nat_stress \ + test_stcp \ + test_call_headless \ + test_media_delivery_full \ + test_media_download_timeout \ + test_etcp_api \ + test_tcp_io \ + test_lwip_tcp \ + test_speex_aec \ + test_db_sync \ + test_media_delivery_integration \ + test_bgp_paths \ + test_dm_invite \ + test_etcp_link_stress \ + test_etcp_router_tcp \ + test_etcp_connect \ + test_call \ + test_etcp_router \ + test_dm_worker \ + test_chat_join \ + test_bgp_route_exchange \ + test_chat_sync_stress \ + test_node_conn_direct + if OS_LINUX -check_PROGRAMS += test_auto_socket_dynamic test_standby test_standby_transport test_group_connect_standby test_android_udp_log test_pool_corruption_log -check_PROGRAMS += test_reality_fallback test_stcp_reality_rotation test_uasync_regressions test_ll_queue_regressions test_etcp_padding -check_PROGRAMS += test_android_replies -check_PROGRAMS += test_uasync_load +check_PROGRAMS += \ + test_uasync_regressions \ + test_stcp_reality_rotation \ + test_android_udp_log \ + test_pool_corruption_log \ + test_android_replies endif -# Silero VAD: только при включённом ONNX Runtime (--with-silero-vad) +# Проверки до 3с. +check_PROGRAMS += \ + test_socks_client \ + test_u_async_timeouts \ + test_async_dns \ + test_chat_poll_network \ + test_group_avatar \ + test_dm_e2e \ + test_media_async \ + test_bgp_triangle \ + test_group_recovery \ + test_etcp_session \ + test_chat_join_e2e \ + test_media_delivery_chat \ + test_member_files_network \ + test_group_connect \ + test_etcp_reconnect \ + test_conn_mgr_phases \ + test_socks_http_proxy + +if OS_LINUX +check_PROGRAMS += \ + test_standby_transport \ + test_group_connect_standby +endif + +# Длительные проверки и нагрузка. +check_PROGRAMS += \ + test_proxy_regressions \ + test_radio \ + test_bbr_integration \ + test_dm_media \ + test_merkle_sync + +if OS_LINUX +check_PROGRAMS += \ + test_standby \ + test_uasync_load \ + test_auto_socket_dynamic +endif + +# ONNX Runtime: без измерений относим дополнительный VAD-тест к длительным. if HAVE_SILERO_VAD check_PROGRAMS += test_silero_vad endif -# AEC (SpeexDSP): всегда (без внешних зависимостей) -check_PROGRAMS += test_speex_aec - # Долгие тесты: запускаются только вручную noinst_PROGRAMS = EXTRA_PROGRAMS = test_merkle_sync_stress @@ -812,16 +845,13 @@ test_proxy_regressions_LDFLAGS = -Wl,--wrap=etcp_route_send -Wl,--wrap=uasync_se test_http_proxy_SOURCES = test_http_proxy.c ../src/proxy/http_proxy.c test_http_proxy_LDADD = $(COMMON_LIBS) -check_PROGRAMS += test_tcp_io_flush test_tcp_io_flush_SOURCES = test_tcp_io_flush.c test_tcp_io_flush_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS) -check_PROGRAMS += test_chat_poll test_chat_poll_SOURCES = test_chat_poll.c test_chat_poll_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/chat -I$(top_srcdir)/lib test_chat_poll_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS) -check_PROGRAMS += test_chat_poll_network test_chat_poll_network_SOURCES = test_chat_poll_network.c test_chat_poll_network_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/chat -I$(top_srcdir)/lib test_chat_poll_network_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)