From b8166dd5045258c192193247b69a85dc32ea9aac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20Hanko?= Date: Wed, 9 Sep 2026 13:11:25 +0200 Subject: [PATCH 1/4] refactor: restructure pytest_start.sh help menu Group the 24 flat help lines into logical sections (Connection, Test selection, Traffic, Suricata, Results and logging, Advanced) with an aligned two-column layout rendered via a quoted heredoc, instead of one echo per line. Surface defaults inline (traffic duration 300, hugepages 6G, log level INFO) and document the .env fallback variables. Option parsing is unchanged; only the help text presentation differs. --- pytest_start.sh | 115 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 76 insertions(+), 39 deletions(-) diff --git a/pytest_start.sh b/pytest_start.sh index c152377..a5fc6c8 100755 --- a/pytest_start.sh +++ b/pytest_start.sh @@ -14,50 +14,87 @@ set -xe usage(){ set +x - echo "Bash script to start pytest" - echo "Options:" - echo "-s | --server [SERVER] to specify the server, where Suricata will be running" - echo "-tm | --target-mac [MAC_ADDRESS] to specify where to send traffic when not using ASTF TRex." - echo "-tv | --target-vlan [VLAN_ID] to specify what VLAN tag to use for generated traffic." - echo '-d | --defined-tests [TESTS] to specify tests, which have to be included, for all available tests run [-d|--defined-tests] " ", - for specific tests: [-d|--defined-tests] "nfs_smb_simple https_simple" or use multiple parameter specification, for specific test from test file - use [-d|--defined-tests] https_simple/test_https_simple.py::test_https_simple, by default it runs http_simple tests' - echo "-t | --defined-time [TIME] to specify traffic duration in tests (seconds)" - echo "-tg | --trex-server-hostname [TRAFFIC GENERATOR] to specify traffic generator server for testing" - echo "-p1 | --trex-server-port-1 [TRAFFIC GENERATOR PORT] to specify traffic generator port" - echo "-p2 | --trex-server-port-2 [TRAFFIC GENERATOR PORT] to specify traffic generator port" - echo "-p | --pcie [PCIE] to specify, on which pcie will be Suricata tested, use multiple parameter specification or [-p|--pcie] "0000:3b:00.0 0000:3b:00.1"" - echo "-ht | --heatup [TIME] to specify the duration for which to wait before measuring statistics" - echo "-f | --filter [rules/norules] starts Suricata with/without rules" - echo "-pc | --pcap [PATH] to specify the pcap file to send to Suricata. Also sets --defined-tests to *only* pcap_replay" - echo "-pm | --prefer-trex-mode [MODE] to suggest a mode for TRex. If unavailable tests use their defaults." - echo "-fm | --force-trex-mode [MODE] to force a TRex mode. If unavailable tests get skipped. Overrides -pm" - echo "-sb | --trex-stl-burst [PPS] [COUNT] to send a fixed burst of COUNT packets at PPS in STL mode. Defaults: 200 000 PPS, 10 000 000 packets" - echo "-sh | --suricata-hugepages [SIZE] to specify how much RAM to allocate in hugepages. Default is 6G." - echo "-fpu | --force-pcap-upload to force re-upload of pcaps to the TRex server, even if identical files already exist." - echo "-sl | --suite-log-level [LEVEL] to set the logging level for the test suite: a name (DEBUG, INFO, PROGRESS, WARNING, ERROR, CRITICAL) or a number (e.g. 25). Default: INFO" - echo "-sf | --suite-log-file to enable writing suite logs to results/artefacts//pytest.log" - echo "-rl | --run-label [LABEL] to set a custom name for the results directory, e.g. experimental-pr-1234-300s. Results are saved to results/artefacts/