Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor: 1. variant rng_snapshot always has 'test_snapshot', move to top 2. snapshot_name was used as indicator for snapshot test variants, hence synonymous with 'test_snapshot', remove it from config 3. 'modify_rng_xml' had a very complicated logic, split into two functions to make it simpler to understand; when there are snapshots then the VM can't by 'sync'd, ie. re-defined; in those cases, 'edit' is used instead - both are coldplug 4. check_snapshot didn't use bgjob, remove it from parameters 5. check_snapshot must revert to the first snapshot 's1' where there was no rng device 6. move logic into functions so that the test steps are clearer - clear rng devices - take snapshot if testing snapshots - update xml in case of coldplug - create fake egd if necessary (connect mode) - start vm - update xml in case of hotplug - run test checks 7. remove definition and usage of `start_error`: it seems to have been introduced originally in ec3aaf0 to control expected failure but not used; then at some time it seems it was intended to be used to handle https://bugzilla.redhat.com/show_bug.cgi?id=1220252 that issue was found in qemu-kvm-rhev 2.4 RHEL 7.2 and fixed in the same distro version; therefore, let's remove its definition and usage in code Furthermore, a. explicitly start fake egd also for snapshot test b. wait a bit after launching fake edg for connect mode to make sure VM doesn't start before it's up c. wait a bit more after booting VM for it to listen in bind mode before starting fake egd in bind mode Finally, apply `black` for standard formatting. Signed-off-by: Sebastian Mitterle <[email protected]>
- Loading branch information