Fix byte check in tempest plugin
Different implementations of ping behave slightly differently in order to ensure the packet payload is transmitted across the wire because some mediums have a minimum packet size. Typically this results in a frame size of 64 bytes, but the client may report 56 when the header is removed and only the packet payload is examined. But the point of the check is that we got something back. The below edited for example purposes: $ ping -c1 -w4 192.168.133.92 PING 192.168.65.92 (192.168.133.92) 56(84) bytes of data. From 192.168.65.249 icmp_seq=1 Destination Host Unreachable --- 192.168.65.92 ping statistics --- 1 packets transmitted, 0 received, 0 errors, 100% packet loss, time 3075ms $ ping -c1 -w4 192.168.65.1 PING 192.168.65.1 (192.168.65.1) 56(84) bytes of data. 64 bytes from 192.168.65.1: icmp_seq=1 ttl=64 time=12.4 ms And then in CI, we're able to see this be 56 bytes returned becasue the underlying medium may not have been ethernet or the client has stripped the header. Which, doesn't matter, we get A reply from the expected address and we can validate the test on that alone. Change-Id: If0d51b52e96f280336d0d92135681db75a6fbd65
This commit is contained in:
parent
c6eb17da6d
commit
e056d5f4b2
|
@ -78,7 +78,7 @@ class BaremetalMultitenancy(baremetal_manager.BaremetalScenarioTest,
|
|||
remote.validate_authentication()
|
||||
|
||||
cmd = 'ping %s -c4 -w4 || exit 0' % destination_ip
|
||||
success_substring = "64 bytes from %s" % destination_ip
|
||||
success_substring = " bytes from %s" % destination_ip
|
||||
output = remote.exec_command(cmd)
|
||||
if conn_expected:
|
||||
self.assertIn(success_substring, output)
|
||||
|
|
|
@ -85,7 +85,7 @@ class BaremetalSingleTenant(baremetal_manager.BaremetalScenarioTest,
|
|||
remote.validate_authentication()
|
||||
|
||||
cmd = 'ping %s -c4 -w4 || exit 0' % destination_ip
|
||||
success_substring = "64 bytes from %s" % destination_ip
|
||||
success_substring = " bytes from %s" % destination_ip
|
||||
output = remote.exec_command(cmd)
|
||||
if conn_expected:
|
||||
self.assertIn(success_substring, output)
|
||||
|
|
Loading…
Reference in New Issue