2023-05-09 06:21:09 -04:00
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-S2 | ESP32-S3 |
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- |
2022-05-20 05:50:08 -04:00
2018-08-28 12:06:14 -04:00
# Intel net test suite for LwIP network stack
This project provides a test interface to esp32 network stack in order to execute standard set of
Intel network test suite defined in TTCN3 framework.
## Important notice
*This is an internal ESP-IDF test and not a user project example*
## Execute net test suite
These network tests could be executed in both manual or automated mode in CI.
Note: TTCN3 engine works reliably only on Linux and Windows.
## Setup TTCN3
2019-11-26 10:45:37 -05:00
* Clone a repository https://github.com/intel/net-test-suites.git and install titan core as described in the README.md
2018-08-28 12:06:14 -04:00
* Copy files `esp32_netsuite.cfg` and `esp32_netsuite.ttcn` (located in `$IDF_PATH/components/lwip/weekend_test` ) to `src` subdir of the cloned repository `net-test-suites`
* Rebuild the netsuite tests (according to README.md in net-test-suite) by executing `source make.sh` in `src` subdir
## Build application
```
cd $IDF_PATH/examples/system/network_tests
2019-08-01 23:31:20 -04:00
idf.py build
idf.py -p PORT flash
2018-08-28 12:06:14 -04:00
```
## Run test
Open two terminals (1) and (2)
1) Start the test server which would pass packets from TTCN3 test suite into ESP32 board in `$IDF_PATH/components/lwip/weekend_test`
```
python net_suite_test.py
```
2) Start test suite in TTCN3 environment in `src` subdir of the cloned repository `net-test-suites.git`
```
ttcn3_start test_suite esp32_netsuite.cfg
```
## Internal connection
Purpose of this test is to execute standard network suite on a ESP32 network stack.
2019-11-26 10:45:37 -05:00
DUT, Device (Network stack in this case) under test, runs normally on target, but a specific interface with configured esp-netif for passing arbitrary data to
2018-08-28 12:06:14 -04:00
and from the network stack. Embedded code `net_suite.c` implements an application which serves stdin/stdout and propagates the data to/from this test interface.
2022-05-20 05:50:08 -04:00
Standard Intel net suite executed by TTCN3 engine uses udp ports for input/ouput of network packets. Python script `net_suite.py` translates this communication
2018-08-28 12:06:14 -04:00
from/to those udp ports to stdin/stdout, where after propagating over USB/UART to the ESP32 board are processed in the network stack (on the target).
Actual test execution, progress, evaluation and test reporting is done using standard net-test-suite scripts running on PC.
```
PC
+---------------------------------------------------------+ ESP32 board
| | +----------------------------------------+
| TTCN3 engine | | +----------------------------------+ |
| | | | net_suite.c | |
| +-----------------+ +--------------+ | | | +------------------------+ |
2019-11-26 10:45:37 -05:00
| | net-test-suite |--7777/udp--| net_suite.py |--stdout---------| -----> | esp_netif / lwip | |
| | |--7771/udp--| |--stdin----------| < ----- | | |
2018-08-28 12:06:14 -04:00
| +-----------------+ +--------------+ | | +---------+------------------------+ |
+---------------------------------------------------------+ +----------------------------------------+
```