Files
utun2/tests/TEST_SUMMARY.md
T
Evgeny 56dfd2f0df Ревизия: добавлены DEBUG сообщения для ошибок и предупреждений
Добавлены комплексные DEBUG сообщения в критические точки проекта:

- **ETCP протокол** (etcp.c): ошибки инициализации криптоконтекста, выделения памяти для очередей, коротких пакетов, сбоев шифрования
- **ETCP соединения** (etcp_connections.c): ошибки установки публичных ключей, расшифровки пакетов, шифрования при отправке
- **TUN интерфейс** (tun_if.c): ошибки создания устройства, настройки IP/MTU, чтения/записи
- **Конфигурация** (config_parser.c): ошибки выделения памяти для структур конфигурации, парсинга IP-адресов
- **Маршрутизация** (routing.c): ошибки выделения памяти для таблиц, отсутствие маршрутов

Все DEBUG сообщения используют существующую систему категорий (CRYPTO, MEMORY, CONFIG, ROUTING, TUN, CONNECTION, ETCP) и предоставляют детальную информацию для диагностики проблем.
2026-01-21 18:18:32 +03:00

119 lines
3.5 KiB
Markdown

# 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
```bash
# Main project tests
make check
# Additional standalone tests
cd tests
make -f Makefile.working test-all
```
### Individual Test Commands
```bash
# 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`):
```bash
./configure
make check
```
### Tests Directory
Standalone Makefile (`Makefile.working`):
```bash
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.