Files
utun2/tests/TEST_SUMMARY.md
T
evgeny 38c9f229bc stcp: ed25519 pubkey exchange in handshake, fix instance destroy segfault, fix chat_tcp_test
- 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
2026-08-07 00:48:27 +03:00

3.5 KiB

uTun Tests Summary

✅ Working Tests

1. test_crypto (Main Project)

  • Location: /home/vnc1/proj/utun3/test_crypto
  • Status: ✅ PASS
  • Description: Basic crypto functionality test
  • Run: make check or ./test_crypto

2. test_etcp_crypto (Main Project)

  • Location: /home/vnc1/proj/utun3/test_etcp_crypto
  • Status: ✅ PASS
  • Description: ETCP protocol crypto test
  • Run: make check or ./test_etcp_crypto

3. working_crypto_test (Tests Directory)

  • Location: /home/vnc1/proj/utun3/tests/working_crypto_test
  • Status: ✅ WORKING
  • Description: Standalone TinyCrypt AES-CCM encryption/decryption test
  • Run: cd tests && make -f Makefile.working test-crypto

4. test_ecc_encrypt (Tests Directory)

  • Location: /home/vnc1/proj/utun3/tests/test_ecc_encrypt
  • Status: ✅ WORKING
  • Description: ECC client-server key exchange and encryption test
  • Run: cd tests && make -f Makefile.working test-ecc

❌ Broken Tests (Need Fixes)

1. test_ll_queue_comprehensive

  • Issue: Uses old typedefs (ll_queue_t, ll_entry_t) instead of struct ll_queue*, struct ll_entry*
  • Fix Needed: Update type definitions to match current library API

2. test_u_async_comprehensive

  • Issue: Missing headers and type definitions
  • Fix Needed: Update includes and type definitions

3. test_u_async_performance

  • Issue: Similar to uasync comprehensive test
  • Fix Needed: Update includes and type definitions

4. test_intensive_memory_pool

  • Issue: Missing memory pool implementation
  • Fix Needed: Requires memory pool library

5. test_memory_pool_and_config

  • Issue: Missing memory pool implementation
  • Fix Needed: Requires memory pool library

6. test_etcp_two_instances

  • Issue: Missing ETCP headers and complex dependencies
  • Fix Needed: Requires full ETCP library and headers

🚀 Quick Start

Run All Working Tests

# Main project tests
make check

# Additional standalone tests
cd tests
make -f Makefile.working test-all

Individual Test Commands

# Crypto tests
./test_crypto                    # Main project
cd tests && ./working_crypto_test # Standalone AES-CCM

# ECC tests  
./test_etcp_crypto               # Main project
cd tests && ./test_ecc_encrypt    # Standalone ECC

📋 Test Files

Main Project (Automake)

  • test_crypto.c - Basic crypto test
  • test_etcp_crypto.c - ETCP crypto test

Tests Directory

  • working_crypto_test.c - Standalone TinyCrypt test
  • test_ecc_encrypt.c - ECC encryption test
  • test_ll_queue_comprehensive.c - Queue operations (broken)
  • test_u_async_comprehensive.c - Async operations (broken)
  • test_u_async_performance.c - Performance test (broken)
  • test_intensive_memory_pool.c - Memory pool test (broken)
  • test_memory_pool_and_config.c - Memory config test (broken)
  • test_etcp_two_instances.c - ETCP instances test (broken)

🔧 Build System

Main Project

Uses GNU Autotools (Makefile.am):

./configure
make check

Tests Directory

Standalone Makefile (Makefile.working):

cd tests
make -f Makefile.working all
make -f Makefile.working test-all

📊 Test Results Summary

Working Tests: 4 (2 main + 2 standalone)
Broken Tests: 6 (need library updates)
Total Tests: 10

The working tests cover core crypto functionality (AES-CCM, ECC) which are essential for the VPN tunnel's security. The broken tests are mostly for internal libraries (queue, async, memory pool) that need API updates.