Commit Graph

32 Commits

Author SHA1 Message Date
Marek Marczykowski-Górecki
4420b320e7
tests: add expectedFailureIfTemplate decorator
Some tests are expected to fail only on some templates (some feature not
available in older distribution, some feature not yet ported to
another).
2016-03-03 23:47:50 +01:00
Marek Marczykowski-Górecki
3bef37f881
tests: PCI passthrough to HVM
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
2016-02-26 11:04:52 +01:00
Marek Marczykowski-Górecki
26443e1dd2
tests: add function to create minimal OS in HVM
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
2016-02-26 10:59:20 +01:00
Marek Marczykowski-Górecki
84af7386f5
tests: support VMs cleaned up in tearDownClass, instead of tearDown
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.

Fixes QubesOS/qubes-issues#1691
2016-01-26 03:34:27 +01:00
Bahtiar `kalkin-` Gadimov
fdd618b420
Move xen storage tests to own file
This allows to run just the general storage tests without all the slow xen
storage based tests.
2016-01-07 05:48:32 +01:00
Marek Marczykowski-Górecki
3065431058
tests: include NetVM in basic backup tests 2015-11-27 20:00:34 +01:00
Marek Marczykowski-Górecki
3e79ff6a37
tests: release qubes.xml lock while killing VMs
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.

Fixes QubesOS/qubes-issues#1458
2015-11-27 20:00:34 +01:00
Marek Marczykowski-Górecki
a14e1cc86f
tests: move enter_keys_in_window to base SystemTestsMixin class
This ways it will be available also in DispVM tests (already referenced
there), and others.
2015-11-25 03:14:23 +01:00
Marek Marczykowski-Górecki
db35e03aa7
tests: backup to VM tests
Regression tests for QubesOS/qubes-issues#1371 and
QubesOS/qubes-issues#1359

Fixes QubesOS/qubes-issues#1435
2015-11-25 01:35:04 +01:00
Marek Marczykowski-Górecki
736e278865
tests: fix wait_for_window function
The `show` parameter wasn't handled (show=False was assumed...)
2015-11-25 01:35:04 +01:00
Marek Marczykowski-Górecki
760786d999
tests: minor formating 2015-11-25 01:35:04 +01:00
Bahtiar `kalkin-` Gadimov
bfaf37dae5 Add pool config parsing 2015-11-17 19:37:18 +01:00
Marek Marczykowski-Górecki
cdc6d74c86
tests: PV Grub tests
QubesOS/qubes-issues#1354
2015-11-11 04:30:00 +01:00
Marek Marczykowski-Górecki
6051a89227
tests: add regression test for #1386
QubesOS/qubes-issues#1386
2015-11-07 05:03:54 +01:00
Marek Marczykowski-Górecki
44c340c046
tests: add wait_for_window function to reduce code duplication 2015-11-03 02:43:46 +01:00
Marek Marczykowski-Górecki
8b4c9b23b3 tests: hide git check warning 2015-06-27 04:19:07 +02:00
Marek Marczykowski-Górecki
b3899ba81a tests: enable long messages by default 2015-03-31 05:14:42 +02:00
Marek Marczykowski-Górecki
55f7556c41 tests: include dom0 update tests by default
Looks like an oversight.
2015-03-25 00:47:56 +01:00
Marek Marczykowski-Górecki
fbd96532e8 tests: automatically iterate tests over templates 2015-03-22 03:32:01 +01:00
Wojciech Zygmunt Porczyk
95ae3f44aa Revert "tests: use dot to separate test name components"
This reverts commit 454788d459.
2015-03-05 15:38:16 +01:00
Wojciech Zygmunt Porczyk
f61045178a tests: add --do-not-clean 2015-03-05 15:38:10 +01:00
Marek Marczykowski-Górecki
1f30a03a09 tests: fix handling old backup format 2015-02-22 16:18:39 +01:00
Marek Marczykowski-Górecki
67ea5bc441 tests: encourage to release the lock after completing the setup
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.
2015-02-22 01:26:38 +01:00
Marek Marczykowski-Górecki
454788d459 tests: use dot to separate test name components
This way the name can be directly copied to cmdline to rerun that
particular test.
2015-02-21 00:39:19 +01:00
Marek Marczykowski-Górecki
e65842322a core: hold the lock after QubesVmCollection.save()
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.
2015-02-21 00:25:50 +01:00
Marek Marczykowski-Górecki
091d02b9a3 tests: reload qubes.xml after save
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).
2015-02-19 03:52:35 +01:00
Marek Marczykowski-Górecki
f7a06ae29b tests: missing imports 2015-02-18 22:49:47 +01:00
Wojtek Porczyk
d81ae01d48 tests: add logging
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)
2015-02-11 16:34:35 +01:00
Wojtek Porczyk
b6530200c9 tests: fix after Marek's review 2015-02-11 13:15:35 +01:00
Wojtek Porczyk
7f75ed4d73 tests: runner backported from core3 2015-02-10 23:24:24 +01:00
Wojtek Porczyk
226e257d2a tests: refactored 2015-02-10 23:24:24 +01:00
Marek Marczykowski-Górecki
603384b4c6 tests: add initial backup test 2014-09-18 08:25:56 +02:00