Skip to content

Draft: steps: add tcpdump

David Jaša requested to merge dj/tcpdump into main

Adds steps that run and stop tcpdump and a cleanup function that appends tshark-analyzed log to html report if scenario fails or with DEBUG set. The dump files are to be found in: /tmp/nmci-tcpdumps/{scenario_id}/{label}.pcap

--

Made for ease of debuggin of 8021x_hostapd_freeradius_doc_procedure failures on el8/c8s.

The run/stop functionality is done by spawning transient systemd service using 'systemd-run' and the cleanup is achieved by behave's probably recent context.add_cleanup() function. Wider use of this function would mean cleaner tags but if so, then we'd probably need a separate .py file for these cleanup functions so that nmci/lib.py doesn't get way too big.

Based on the resulting HTML report, it seems that:

  1. it runs after nmci's cleanup (it's embeds are the very last)
  2. it's run in reverse order than the steps (so most recent log is embedded first)

Merge request reports

Loading