Commit Graph

6 Commits

Author SHA1 Message Date
Max 81487c8b36 Use dumpcap for ttcn3-tcpdump-*.sh if available
Check if dumpcap is installed (either as suid or with appropriate
capabilities) and use it for packet capture instead of
'sudo tcpdump' if available. This makes it easier to use TTCN-3
testsuite as regular user without altering sudoers.

Change-Id: I77df04d51a469c924cf727f0596cc33565909746
2019-03-19 10:28:46 +00:00
Max e521445fee Generalize ttcn3-tcpdump-*.sh
Prepare for supporting alternative packet dumpers:
* reword comments
* rename pidfile
* move tcpdump-specific option inside if
* move comment about sudo closer to actual sudo invocation

Those are cosmetic changes which do not affect how packet dump is made
but makes it easier to support alternative packet dumpers in follow-up
commit.

Change-Id: Ib2528db65348c0422fe8b7c7c53656fbce4f6405
2019-03-14 20:46:51 +00:00
Neels Hofmeyr ced8acf305 log time in tcpdump-start and -stop.sh
Also log the testcase name in tcpdump-start.sh.

The output now looks like

    ------ MSC_Tests.TC_mo_cc_bssmap_clear ------
    Thu Mar  7 13:21:00 UTC 2019
    [...]
    Thu Mar  7 13:21:04 UTC 2019
    ====== MSC_Tests.TC_mo_cc_bssmap_clear pass ======

The reason to log start and end dates came up like this: I noticed a segfault
in a tested program at a specific time. From the timestamp I tried to find out
which of the tests saw the failure. (After a segfault, all subsequent tests run
and fail, but it is not obvious which failure occured because of a segfault,
and which ones just normally failed before that.) Looking at the timestamps of
the log files didn't help, because the ttcn3_logmerge touched those after the
tests completed. So the only way is to cat each individual log file and find
the timestamp.

So this adds an overview of the timestamps without needing to open log files.

Change-Id: I0832d9b5df599baad5dec8d3a993481b4286fbb3
2019-03-07 16:33:03 +01:00
Neels Hofmeyr dadde17425 ttcn3-tcpdump-stop.sh: print colored verdict
Change-Id: I0d2d6171430f1eebb5377edac5e237a99ddbd743
2018-06-23 11:43:00 +00:00
Pau Espin dada4c5a55 ttcn3-tcpdump-stop.sh: Wait to receive last packets before stopping tcpdump
There's a time delay between packets are sent through the system and
tcpdump reads, buffers and stores them into the pcap file. We need to
give it more time to process everything before killing it, otherwise
last (or all) packets from the test are not captured.

Change-Id: I240d8f1bdb2ca6ad353e60ef15937dc2bd4cbebd
2018-02-15 17:22:52 +00:00
Harald Welte e057146df7 re-organize configuration files; add tcpdump integration
Let's make sure we share common configuration between the test
suites and split the config file into a "default" part which is
used (but not copied) in the Docker images, and a "local" part
which is basically those overrides that the user (or docker image)
wants to do from the default.

Change-Id: I3db452e24e5238aa05254d903739c64d202e61db
2018-02-14 18:50:16 +01:00