Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix failure issue of test_check_igmp_reports
We are having a random failure (most of the times when running it from CI/Jenkins) in test_check_igmp_reports like this: ~~~ 2023-09-25 16:21:00,799 379853 INFO [nfv_tempest_plugin.tests.common.shell_utilities [-] nfv_plugin_test] Executing command: sudo killall -SIGINT tcpdump;cat /tmp/tmpo5kcpu03 | ( grep igmp || true ) | ( grep report || true ) | wc -l }}} Traceback (most recent call last): File "/home/stack/plugins/nfv-tempest-plugin.git/nfv_tempest_plugin/tests/scenario/test_igmp_snooping_usecases.py", line 336, in test_check_igmp_reports self.assertGreater(output, 0, "No igmp reports received") File "/usr/lib64/python3.9/unittest/case.py", line 1235, in assertGreater self.fail(self._formatMessage(msg, standardMsg)) File "/usr/lib64/python3.9/unittest/case.py", line 676, in fail raise self.failureException(msg) AssertionError: 0 not greater than 0 : No igmp reports received ~~~ However, as output file is not deleted we can check that igmp reports are actually captured: ~~~ [tripleo-admin@compute-0 ~]$ cat /tmp/tmpo5kcpu03 dropped privs to tcpdump tcpdump: verbose output suppressed, use -v[v]... for full protocol decode listening on br-dpdk0, link-type EN10MB (Ethernet), snapshot length 262144 bytes 16:20:57.710074 IP 10.10.164.124 > igmp.mcast.net: igmp v3 report, 1 group record(s) 1 packet captured 7 packets received by filter 0 packets dropped by kernel [tripleo-admin@compute-0 ~]$ cat /tmp/tmpo5kcpu03 | ( grep igmp || true ) | ( grep report || true ) | wc -l 1 ~~~ So it seems to be race condition that makes /tmp/tmpxxx not be created sometimes in the short period of time between the kill and cat executions We hope that introducing a 3 second sleep between kill and cat commands can solve the issue. Change-Id: I78f70969955c245f6149fc4e56856b865bc6aa62
- Loading branch information