Speed-up tests a bit in systems with slow hwinfo #1361
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
The testsuite used to run in around 2-4 minutes in my personal system.
We have always known that we should be more aggressive mocking calls to
hwinfo
and some libstorage-ng operations (mostly those that result in calls toudevadm --settle
). But even without that mocking, the situation was still acceptable.Recently things became MUCH worse. Now the testsuite is much slower. I was not able to find what caused it. No luck bisecting the changes in the repository, so I guess the problem is somewhere else (some combination of changes in libstorage-ng or another YaST package, Ruby, the Tumbleweed kernel, udev and whatnot).
Solution
Even if the source of the recent slow-down is still there, I decided to introduce the long-overdue mocking for
hwinfo
in order to mitigate the problem.Now the execution time is acceptable again, even if there is still room for improvement (if someone can find why/how at some point we went from a couple of minutes to ~10mins).