aboutsummaryrefslogtreecommitdiffstats
path: root/ttcn3-tcpdump-start.sh
AgeCommit message (Collapse)AuthorFilesLines
2018-02-18ttcn3-tcpdump-start.sh: Don't call tcpdump log files ".log"Harald Welte1-1/+1
The problem is that we use ttcn3_logmerge FOO_Tests.*.log and that the tcpdump stdout log files also match this pattern. Call them .pcap.stdout in order to avoid them falling into the globbing pattern of the TITAN log files. Change-Id: Iac1ae217b006182121d86375ffa4d3c00ef37e8b
2018-02-15ttcn3-tcpdump-start.sh: Wait for tcpdump to start recordingPau Espin Pedrol1-5/+14
We generate some fake transit and we wait until we catch tcpdump already saved some packet into the pcap file, this way making sure it is already recording before starting the test. The -U flag (--packet-buffered) is added to increase the chances to sleep less time waiting for stuff being saved into the pcap file. According to tcpdump manual: """ If the -w option is specified, make the saved raw packet output ``packet-buffered''; i.e., as each packet is saved, it will be written to the output file, rather than being written only when the output buffer fills. """ Change-Id: I91cfd84ff5356857a13af1901abfe2204a93f76d
2018-02-15ttcn3-tcpdump-start.sh: Wait for pcap file creation to start testPau Espin Pedrol1-0/+10
It was spotted in the jenkins artficats that pcap files for some tests are missing. It is probably due to the fact that tcpdump is started in the background and immediately after the test is started. Some tests are really quick, which means they are executing before tcpdump starts creating the file and recording. While still having the file created doesn't mean tcpdump is already recording, we at least ensure the file is created and we can see it's empty at the end. Running this patch in my PC indeed shows that usually the pcap file is not created immediately after and it waits for 1 second to continue. The hack to make sure tcpdump is already recording before starting the test is to create some traffic (ie ping 127.0.0.1) and then check the following condition: $(tcpdump -r file.pcap | wc -l) -gt 0 Change-Id: I17a456a27c8e33571f333f4b7efdf61161ebb174
2018-02-15ttcn3-tcpdump-start.sh: Log tcpdump output to filePau Espin Pedrol1-1/+1
This can be useful in case there was an error in tcpdump, or to make sure no packets were lost while capturing. Change-Id: I8d7570bba3c21c017ba38d36185f6ae042967599
2018-02-14re-organize configuration files; add tcpdump integrationHarald Welte1-0/+24
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