Do not force inheritance of ExtraTestMixin and QubesTestCase. Instead
provide 'qubes.tests.extra.ExtraTestCase' for external tests. This makes
the API less "magic", easier to understand and apply static analysis
tools on it.
QubesOS/qubes-issues#1800
This way, tests will appear as from 'extra' module.
Besides the move, some minor changes:
- add missing self.qc.unlock_db() in create_vms()
- suffix per-template tests with template name
QubesOS/qubes-issues#1800
A simple test which checks if the device is visible there at all.
Device set with QUBES_TEST_PCIDEV env variable is used - it should be
some unimportant device which can be freely detached from dom0.
QubesOS/qubes-issues#1659
SystemTestsMixin.prepare_hvm_system_linux creates minimal Linux
installation necessary to launch simple shell script. It installs:
- grub2
- kernel from dom0 (the same as the running one)
- dracut based initramfs, with provided script set as pre-pivot hook
Done in preparation for QubesOS/qubes-issues#1659 test
Usage: VMs with name created by self.make_vm_name(name,
class_teardown=True) will be cleaned up in tearDownClass. It should be
used only in setUpClass.
FixesQubesOS/qubes-issues#1691
Otherwise hotplug scripts may deadlock on qvm-template-commit and
consequently do not release loop and device-mapper devices. Which means
also not releasing disk space for underlying images.
FixesQubesOS/qubes-issues#1458
Many functions and especially standalone tools takes the lock itself, so
to prevent deadlocks, as a rule execute the tests with lock released.
Also reload qubes.xml before cleanup.
The statement that unlock_db() is always called directly after save() is
no longer true - tests holds the lock all the time, doing multiple saves
in the middle.
This is to make sure that QubesVmCollection state is consistent with
qubes.xml - unfortunately some changes are applied to Qubes*Vm object
only at load time (for example connected_vms collections).
Test suite now logs to three places:
* syslog
* ${HOME}/qubes-tests.log
* /dev/kmsg (only start and errors; this is handy while debugging Oopses by
correlating them with tests)