Skip to content

Commit

Permalink
Merge pull request #1354 from anarkiwi/master
Browse files Browse the repository at this point in the history
Fix diagnostic OF dump.
  • Loading branch information
anarkiwi committed Dec 4, 2017
2 parents 55f5f06 + e70fa7a commit 08c033c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/faucet_mininet_test_topo.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,8 +362,13 @@ def _start_tcpdump(self):
'>/dev/null',
'2>/dev/null',
))
self.cmd('tcpdump %u %s &' % (
self.cmd('timeout %s tcpdump %s &' % (
self.MAX_CTL_TIME, tcpdump_args))
for _ in range(5):
if os.path.exists(self.ofcap):
return
time.sleep(1)
assert False, 'tcpdump of OF channel did not start'

@staticmethod
def _tls_cargs(ofctl_port, ctl_privkey, ctl_cert, ca_certs):
Expand Down Expand Up @@ -451,7 +456,7 @@ def _stop_cap(self):
text_ofcap_log = '%s.txt' % self.ofcap
with open(text_ofcap_log, 'w') as text_ofcap:
subprocess.call(
['timeout', self.MAX_CTL_TIME,
['timeout', str(self.MAX_CTL_TIME),
'tshark', '-l', '-n', '-Q',
'-d', 'tcp.port==%u,openflow' % self.port,
'-O', 'openflow_v4',
Expand Down

0 comments on commit 08c033c

Please sign in to comment.