Miscellaneous fixes / tiny features V1 - #65
matyas7dub wants to merge 8 commits into
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
It introduces a tight polling loop risk in wait_on_start() and contains type/API inconsistencies that will likely cause pyright noise and maintainability issues.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (4)
What changed in this PR
This PR bundles several small improvements across the test suite: it generalizes ConfigBuilder so it’s not implicitly Suricata-specific, improves logging/observability for TRex and test runs, and includes various typing/pyright-driven cleanups.
Changes:
- Generalize
ConfigBuilderdefaults and update call sites to pass explicit template config paths. - Add/adjust logging around pcap merging, run duration, Suricata start delay, and TRex TX counters.
- Tighten typing and defensive handling in stats/graph utilities and some conftest helpers.
| File | Description |
|---|---|
| util/trex_util.py | Adds progress logging for pcap merges; removes unused type alias/imports. |
| util/test_runner.py | Logs run duration and Suricata RX packet/byte totals after stats are saved. |
| util/suricata_manager.py | Changes Suricata start delay measurement logic and logging. |
| util/suri_util.py | Returns aggregated stats from save_stats, adds debug logs for skipped stats, and renames get_trex_suri_stats parameter for clarity. |
| util/make-graphs.py | Makes parameters extraction tolerant to missing parameters key. |
| util/config_builder.py | Makes config template path explicit; introduces default config path constants. |
| README.md | Fixes trailing commas in Python dict examples. |
| pytest_start.sh | Makes set -x conditional on LOGLEVEL=DEBUG and improves unsupported-option handling. |
| performance_tests/web_50_sites/test_web_50_sites.py | Removes redundant “Run ended” log line (now logged centrally). |
| performance_tests/pcap_replay/test_pcap_replay.py | Removes redundant “Run ended” log line (now logged centrally). |
| performance_tests/nfs_smb_simple/test_nfs_smb_simple.py | Removes redundant “Run ended” log line (now logged centrally). |
| performance_tests/https_simple/test_https_simple.py | Removes redundant “Run ended” log line (now logged centrally). |
| performance_tests/http_simple/test_http_simple.py | Removes redundant “Run ended” log line (now logged centrally). |
| performance_tests/http_https_smb_simple/test_http_https_smb_simple.py | Removes redundant “Run ended” log line (now logged centrally). |
| conftest.py | Adds byte formatting helper, exports formatting helpers for reuse, and updates fixtures/helpers for new ConfigBuilder behavior. |
| assets/trex/traffic_profiles/trex_client_manager.py | Logs TRex TX totals on stop, hardens stats getters, and refines typing/casts. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
The changes mentioned by copilot will be fixed in a V2, but since they are quite minor it can still be reviewed as is |
| filter = { | ||
| "dpdk": [lambda x: x["dpdk.interfaces[0].mtu"] <= 3000], | ||
| "af-packet": [lambda x: True] | ||
| "af-packet": [lambda x: True], |
There was a problem hiding this comment.
That one is from the ruff markdown formatting commit, and I figured it won't hurt to leave it there 😝
Speaking of that, there is a new ruff version which has new linter rules (and this markdown formatting), so we might want to update it.
|
v1 refactors and other stuff LGTM |


This is a collection of commits with changes that I wanted to make, but making a ticket or PR for each seems overkill.
The main ones I would like to highlight are:
ConfigBuildernow doesn't assume that it is used for Suricata configuration files, since it was used for other yaml configs as well (TRex)