Age | Commit message (Collapse) | Author | Files | Lines |
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|