lisa icon indicating copy to clipboard operation
lisa copied to clipboard

Remove hardcode sleeps in dpdksuite.py

Open squirrelsc opened this issue 3 years ago • 4 comments

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.

squirrelsc avatar Nov 19 '21 19:11 squirrelsc

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?

mcgov avatar Feb 15 '22 22:02 mcgov

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.

mcgov avatar Feb 15 '22 22:02 mcgov

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

squirrelsc avatar Feb 15 '22 22:02 squirrelsc

now hard code sleep moved into dpdkutil.py after this PR https://github.com/microsoft/lisa/pull/1824/files#diff-1c721f3db2542187986b69a1de1bac854714b180b224241115b72eb689e7e14cR235 @mcgov

LiliDeng avatar Oct 16 '23 02:10 LiliDeng