lisa
lisa copied to clipboard
Remove hardcode sleeps in dpdksuite.py
There are three hardcode sleep 10 or 15 seconds. Please use a timout loop to detect the behavior. Not use the hard code big sleep number.
I think we removed these, there's a rewritten timeout function that runs dpdk for 10 seconds, this is required since testpmd will just continue to run until you kill it with SIGINT. Can you check https://github.com/microsoft/lisa/blob/c36e493a9011db67ab8451e7e32f146ebfc28cef/microsoft/testsuites/dpdk/dpdktestpmd.py#L216 and take a look?
There's another use of the function at https://github.com/microsoft/lisa/blob/c36e493a9011db67ab8451e7e32f146ebfc28cef/microsoft/testsuites/dpdk/dpdksuite.py#L788 in the wrapper we use to run testpmd concurrently on nodes.
It's ok to have them in a command like "timeout 10; ...". But below pattern is not encouraged, which is easy to misuse.
https://github.com/microsoft/lisa/blob/c36e493a9011db67ab8451e7e32f146ebfc28cef/microsoft/testsuites/dpdk/dpdksuite.py#L799
now hard code sleep moved into dpdkutil.py after this PR https://github.com/microsoft/lisa/pull/1824/files#diff-1c721f3db2542187986b69a1de1bac854714b180b224241115b72eb689e7e14cR235 @mcgov