Commit Graph

191 Commits

Author SHA1 Message Date
Wojtek Porczyk
6a10daf7be Merge branch 'master' into core3-devel
Remains to be fixed:
  88cb62fc
  d2640b51
  958c2926
2016-06-13 19:03:46 +02:00
Marek Marczykowski-Górecki
e87da9ec9d
tests: adjust dom0_update tests for dnf in VM
There is no support for 'copy_local' repository option, so setup test
repository over http.

Related to QubesOS/qubes-issues#1574
2016-06-02 02:51:18 +02:00
Marek Marczykowski-Górecki
6311eec6fd
tests: force reloading partition table after setting partitioned loop dev
Apparently "losetup -P" doesn't always properly read partition table.
Force reload using blockdev --rereadpt.
2016-05-18 02:03:48 +02:00
Marek Marczykowski-Górecki
3abf2b24b4
tests: check opening URL
While at it, fix policy preparation for qvm-open-in-vm tests.

QubesOS/qubes-issues#1487
2016-05-18 02:03:31 +02:00
Marek Marczykowski-Górecki
55af04293b
tests: block devices listing
QubesOS/qubes-issues#1600
2016-05-16 04:48:29 +02:00
Marek Marczykowski-Górecki
d88ff935d0
tests: adjust 'extra' tests API to better design from core3
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
2016-05-02 00:36:12 +02:00
Marek Marczykowski-Górecki
edd473c4be
tests: fix 'extra' tests loader
QubesOS/qubes-issues#1800
2016-05-02 00:18:37 +02:00
Bahtiar `kalkin-` Gadimov
7200e6153b
Rename default storage driver from xen to file
- Rename XenPool   ⇒ FilePool
- Rename XenVolume ⇒ FileVolume
2016-04-30 20:42:46 +02:00
Marek Marczykowski-Górecki
eaf5efd814
tests: convert 'extra' test loader to core3 API
QubesOS/qubes-issues#1800
2016-04-11 13:50:19 +02:00
Marek Marczykowski-Górecki
8c6fe7ed90
Merge remote-tracking branch 'origin/master' into core3-devel-mm 2016-04-11 13:03:12 +02:00
Marek Marczykowski-Górecki
c55ca8004a tests: port backupcompatibility to core3 API 2016-04-07 13:21:00 +02:00
Marek Marczykowski-Górecki
e0686e1e02 backup: initial conversion to core3 API 2016-04-07 13:05:25 +02:00
Marek Marczykowski-Górecki
5566f31a42
tests: qrexec service argument
QubesOS/qubes-issues#1876
2016-03-28 01:19:23 +02:00
Marek Marczykowski-Górecki
b396629d44
tests: qvm-move-to-vm 2016-03-28 01:19:01 +02:00
Marek Marczykowski-Górecki
54eee12b51
tests: setup qrexec policy instead of clicking in confirmation dialog
xdotool is unreliable so the less of it, the better.
2016-03-27 19:28:52 +02:00
Marek Marczykowski-Górecki
422f30b969 tests: port network tests to core3 API 2016-03-21 11:43:32 +01:00
Marek Marczykowski-Górecki
63f0966cdd
tests: fix MimeHandlers after "29c602c tests: prefix internal functions with underscore" 2016-03-13 03:37:04 +01:00
Marek Marczykowski-Górecki
b24ba307c3
tests: move warning to the module level 2016-03-13 03:36:20 +01:00
Marek Marczykowski-Górecki
bc240bd742
tests: move external test loader to qubes.tests.extra module
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
2016-03-03 23:47:52 +01:00
Marek Marczykowski-Górecki
02c601b830
tests: expose API for external tests
Fixes QubesOS/qubes-issues#1800
2016-03-03 23:47:52 +01:00
Marek Marczykowski-Górecki
3f66da0412
tests: add a function for adding qrexec rules
QubesOS/qubes-issues#1800
2016-03-03 23:47:51 +01:00
Marek Marczykowski-Górecki
29c602c9ff
tests: prefix internal functions with underscore
Preparation for API for external tests.

QubesOS/qubes-issues#1800
2016-03-03 23:47:51 +01:00
Marek Marczykowski-Górecki
7ca89688bd
Improve expectedFailureIfTemplate decorator 2016-03-03 23:47:51 +01:00
Marek Marczykowski-Górecki
8497471a72
tests: fix preparation of "small" backup storage in Debian 7
losetup Debian 7 doesn't deal with /dev/loop-control, so needs
existing /dev/loop* devices. Just /dev/loop0 is enough.
2016-03-03 23:47:51 +01:00
Marek Marczykowski-Górecki
5c877e9850
tests: mark NetworkManager in ProxyVM fail for debian-7
NM there expect some different options in configuration, and since it's
old stable, we won't implement it.
2016-03-03 23:47:50 +01:00
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
c0c0e0022e tests: convert storage tests to core3 API
QubesOS/qubes-issues#
2016-03-03 01:18:17 +01:00
Marek Marczykowski-Górecki
fb74126e56 tests: convert dom0 update test to core3 API 2016-03-03 01:18:17 +01:00
Marek Marczykowski-Górecki
2daba9e0eb core: migrate handy GUI functions and backup mixin from core2
That's all from tests/__init__.py, so remove that file.
2016-03-03 01:18:16 +01:00
Wojtek Porczyk
9eafa57539 Merge remote-tracking branch 'marmarek/master' into core3-devel
The following list is bollocks. There were many, many more.

Conflicts:
    core-modules/003QubesTemplateVm.py
    core-modules/005QubesNetVm.py
    core/qubes.py
    core/storage/__init__.py
    core/storage/xen.py
    doc/qvm-tools/qvm-pci.rst
    doc/qvm-tools/qvm-prefs.rst
    qubes/tools/qmemmand.py
    qvm-tools/qvm-create
    qvm-tools/qvm-prefs
    qvm-tools/qvm-start
    tests/__init__.py
    vm-config/xen-vm-template-hvm.xml

This commit took 2 days (26-27.01.2016) and put our friendship to test.
    --Wojtek and Marek
2016-03-03 01:13:51 +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
0fb69d39ca
tests: qvm-sync-clock is asynchronouse, take it into account 2016-02-23 16:20:18 +01:00
Marek Marczykowski-Górecki
be231421de
tests: try to change name to conflicting value
QubesOS/qubes-issues#1723
2016-02-07 02:17:59 +01:00
Marek Marczykowski-Górecki
f13abc2ace
tests: rename domain when it is't defined libvirt
Regression test for QubesOS/qubes-issues#1632
2016-02-06 05:36:53 +01:00
Marek Marczykowski-Górecki
0d31306b90
tests: clearing 'updates pending' flag
QubesOS/qubes-issues#1685
2016-02-03 17:22:15 +01:00
Marek Marczykowski-Górecki
0d2e03389f
tests: qvm-open-in-vm and qvm-open-in-dvm tests for different file types
QubesOS/qubes-issues#1621
2016-01-29 21:31:49 +01:00
Marek Marczykowski-Górecki
be00d15d99
tests: do not crash when trying to log class setup/teardown fail
QubesOS/qubes-issues#1691
2016-01-29 21:30:11 +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
Marek Marczykowski-Górecki
176755d9e2
tests: DispVM cleanup
QubesOS/qubes-issues#1660
2016-01-20 02:48:46 +01:00
Marek Marczykowski-Górecki
ce75ba411f
tests: "empty" firewall propagation
Check if "empty" firewall is also properly propagated.

QubesOS/qubes-issues#1608
2016-01-18 02:09:17 +01:00
Marek Marczykowski-Górecki
caa75cbc18
tests: regression test for #1389
QubesOS/qubes-issues#1389
2016-01-14 04:28:17 +01:00
Marek Marczykowski-Górecki
f4d46c7855
tests: add a test for proper saving of DispVM firewall rules
Test if DispVM firewall rules are:
 - inherited from a calling VM
 - saved properly (so will be effective after firewall reload)
 - saved only for that DispVM (#1608)

QubesOS/qubes-issues#1608
2016-01-14 01:14:41 +01:00
Marek Marczykowski-Górecki
db136674a9
tests: workaround libvirt bug - domain ID desynchronization 2016-01-07 05:48:33 +01:00
Marek Marczykowski-Górecki
baffef0ef0
tests: fix qvm-move-to-vm error code checking
Currently error code is 28 (ENOSPC). But generally any non-zero is
expected result here.

Fix test for QubesOS/qubes-issues#1355
2016-01-07 05:48:33 +01:00
Marek Marczykowski-Górecki
24ad20cfe6
tests: add a simple dom0 backup test
Regression test for:
QubesOS/qubes-issues#1515

It assumes existing broken symlink in user dom0 home. Thanks for systemd
it is the case (`~/.local/share/systemd/user`).
2016-01-07 05:48:33 +01:00
Marek Marczykowski-Górecki
4af5a0503d
tests: qvm-revert-template-changes
Regression test for:
QubesOS/qubes-issues#1573
2016-01-07 05:48:32 +01:00
Marek Marczykowski-Górecki
f977858610
minor: add missing coding declaration 2016-01-07 05:48:32 +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
70546ac21a tests: add test for VM autostart on qrexec call 2015-12-28 01:07:48 +01:00