Bahtiar `kalkin-` Gadimov
d1685a13df
Add storage.pool_exists
2015-11-17 19:37:19 +01:00
Bahtiar `kalkin-` Gadimov
8e0207a199
Rename QubesXenVmStorage to XenStorage
2015-11-17 19:37:19 +01:00
Bahtiar `kalkin-` Gadimov
bfaf37dae5
Add pool config parsing
2015-11-17 19:37:18 +01:00
Marek Marczykowski-Górecki
2ccfff438a
tests: use xterm instead of gnome-terminal in DispVM tests
...
There is no gnome-terminal in minimal template.
2015-11-15 02:53:48 +01:00
Marek Marczykowski-Górecki
74d9c62025
tests: improve qrexec confirmation handling
...
'xdotool search --sync' sometimes fails when searching for window. Fix
that by ensuring the windows is already visible when trying to enter
keys there.
2015-11-13 02:30:41 +01:00
Marek Marczykowski-Górecki
5acd27f61e
tests: increase allowed time delta for timezone tests
...
One more time, for slow systems... Let it be 30 seconds.
2015-11-11 04:30:00 +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
c595ac464b
tests: make sure that DispVM service call receive EOF
...
Even when the test fails. Otherwise the DispVM will stay alive.
2015-11-07 18:46:54 +01:00
Marek Marczykowski-Górecki
49141d444e
tests: resize private.img/root.img
...
QubesOS/qubes-issues#1268
2015-11-07 05:43:32 +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
a7b124d6da
tests: fix race condition in copy-paste test
...
Don't wait arbitrary time for paste to finish.
2015-11-03 02:47:08 +01:00
Marek Marczykowski-Górecki
c30c9c7d4e
tests: minor fixes to time sync tests
...
- don't crash when ClockVM wasn't set previously
- increase allowed delta (for slow systems)
2015-11-03 02:46:03 +01:00
Marek Marczykowski-Górecki
31ad72aa70
tests: better handle templates with no 'createrepo' installed
2015-11-03 02:44:25 +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
cf110c74e2
tests: fix cleanup in dom0 updates tests
...
The only directory to cleanup is cls.tmpdir. So make it simple, without
class property cleanup_paths, which for some reason didn't wasn't
emptied in tearDownClass.
2015-11-03 02:40:53 +01:00
Marek Marczykowski-Górecki
5160423065
tests: perform dom0 update check using VMs of different templates
...
QubesOS/qubes-issues#1282
QubesOS/qubes-issues#1029
2015-10-30 14:58:23 +01:00
Marek Marczykowski-Górecki
33255964c7
tests: handle Whonix in simple GUI tests
...
Whonix VMs have always hostname of 'host', so handle that when searching
for a window based on its title.
2015-10-30 14:09:52 +01:00
Marek Marczykowski-Górecki
f064a4c6ea
tests: improve qvm-run of GUI apps tests, include qubes-desktop-run
2015-10-27 23:16:37 +01:00
Marek Marczykowski-Górecki
9cb62f8f4d
tests: VM updates (direct and through updates proxy)
2015-10-27 23:16:10 +01:00
Marek Marczykowski-Górecki
e475e291a9
tests: more qrexec tests, this time for deadlocks
...
Tests for recently discovered deadlocks on write(2).
QubesOS/qubes-issues#1347
2015-10-25 15:23:12 +01:00
Wojtek Porczyk
dc3fcc3141
qubes/tests: port again the backported test runner
...
part of QubesOS/qubes-issues#1248
2015-10-17 00:20:44 +02:00
Marek Marczykowski-Górecki
9ea81c50ae
tests: add tests for 'qvm-prefs'
...
QubesOS/qubes-issues#1184
QubesOS/qubes-issues#1274
QubesOS/qubes-issues#1273
QubesOS/qubes-issues#1272
2015-10-05 05:52:21 +02:00
Marek Marczykowski-Górecki
d900b21dd8
tests: add test for #1256
...
QubesOS/qubes-issues#1256
2015-10-02 01:56:45 +02:00
Marek Marczykowski-Górecki
5043d17197
tests: fix misuse of self.assertNotRaises ( #1163 )
...
Fixes QubesOS/qubes-issues#1163
2015-09-30 22:34:12 +02:00
Marek Marczykowski-Górecki
c2cd84952e
tests: backup compatibility with R2 ( #1124 )
...
QubesOS/qubes-issues#1124
2015-09-05 00:04:04 +02:00
Marek Marczykowski-Górecki
496a74f873
tests: add DispVM to backup compatibility test (r2b2)
...
Test for qubesos/qubes-issues#1124
2015-09-05 00:03:03 +02:00
Marek Marczykowski-Górecki
bbf22c4449
tests: add a test for aborted service call
...
Details here:
https://groups.google.com/d/msgid/qubes-users/20150807213935.GN3740%40mail-itl
2015-08-08 03:57:13 +02:00
Marek Marczykowski-Górecki
5199840927
tests: typo fix
2015-08-08 02:05:52 +02:00
Marek Marczykowski-Górecki
75bbd1a76b
tests: check firewall.xml path after VM rename
2015-08-05 01:04:44 +02:00
Marek Marczykowski-Górecki
a7e08e4584
tests: add qvm-clone test ( #1032 case)
2015-07-08 04:26:11 +02:00
Marek Marczykowski-Górecki
50a9c62d0e
tests: add test for qvm-sync-clock
2015-07-08 01:21:13 +02:00
Marek Marczykowski-Górecki
455535d036
tests: reload qubes.xml after creating VMs
...
Unfortunately it is still needed. For example to load default netvm
setting.
2015-07-08 01:20:25 +02:00
Marek Marczykowski-Górecki
6d1f40219c
tests: code style fixes, no functional change
2015-07-07 21:41:54 +02:00
Wojtek Porczyk
a82bf7cc54
qubes/tests: Move unit tests inside qubes/, add runner
2015-06-29 17:39:24 +02:00
Wojtek Porczyk
c414ab6df0
tests: fix VMCollection tests
2015-06-29 17:39:24 +02:00
Wojtek Porczyk
41fef46db2
core3 move: QubesVM
...
This is a big commit and probably incomplete. Tests will follow.
2015-06-29 17:39:24 +02:00
Wojtek Porczyk
ef4f00dac0
qubes/vm: DeviceManager class for herding devices
...
collections.defaultdict was not enough, because it cannot pass any arguments to
factory. We need to pass domain object and device class to fire events on attach
and detach.
2015-06-29 17:39:24 +02:00
Wojtek Porczyk
855a434879
core3: event framework adjusted for global Qubes object
...
From now, global events are emitted by qubes.Qubes object and handlers are registered there.
2015-06-29 17:39:24 +02:00
Wojtek Porczyk
b623a71d87
core3 move: QubesVmCollection
...
This got split to qubes.Qubes and qubes.VMCollection.
From now on, VMCollection is a stupid bag. Some parts went elsewhere.
2015-06-29 17:39:23 +02:00
Wojtek Porczyk
6146c8e466
QubesVmLabel: XML parsing
2015-06-29 17:39:23 +02:00
Wojtek Porczyk
87ae0112eb
qubes/vm: New XML format loading
2015-06-29 17:39:23 +02:00
Marek Marczykowski-Górecki
8134360614
tests: fix skipping whonix in timezone test
2015-06-27 05:05:34 +02:00
Marek Marczykowski-Górecki
3867d1fdb3
tests: check timezone dom0->vm propagation
2015-06-27 04:47:27 +02:00
Marek Marczykowski-Górecki
ed9b4bfc54
tests: check firewall rules blocking VM IP spoofing
2015-06-27 04:46:17 +02:00
Marek Marczykowski-Górecki
8b4c9b23b3
tests: hide git check warning
2015-06-27 04:19:07 +02:00
Marek Marczykowski-Górecki
236dca29a8
tests/network: add support for Debian's default netcat implementation
...
By default Debian has different nc installed, which requires different
options.
2015-06-21 02:08:02 +02:00
Marek Marczykowski-Górecki
33f0fa17b8
tests: fix clipboard tess
2015-06-21 01:12:47 +02:00
Marek Marczykowski-Górecki
db28551807
tests: update backup tests
...
Since default netvm name was changed, the restore process need to set
'use-default-netvm' flag.
2015-04-14 23:10:18 +02:00
Marek Marczykowski-Górecki
75e9c8aff0
tests: test for netvm/dispvm_netvm
...
Check:
- default value
- setting to None
- setting to a VM
- resetting to default
- setting invalid value
2015-04-06 02:53:18 +02:00
Marek Marczykowski-Górecki
ea92f5d491
tests: improve clipboard test
...
To not use gnome-terminal, but much simpler zenity. This fixes some
race-conditions in the test itself.
2015-04-01 05:24:24 +02:00
Wojtek Porczyk
20b3fdedb8
rename netvm -> sys-net, firewallvm -> sys-firewall
2015-03-31 20:42:53 +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
d0b3d15212
tests: add a test for secure clipboard
2015-03-31 05:14:18 +02:00
Marek Marczykowski-Górecki
b563cf290e
tests: fix firewall test - use the IP, not the ping command...
2015-03-30 22:33:08 +02:00
Marek Marczykowski-Górecki
20c32e7233
tests: give firewallvm more time to apply the rules
...
Not everyone use fast SSD drive and 4+ core CPU...
2015-03-30 22:31:11 +02:00
Marek Marczykowski-Górecki
961ae3588f
tests: force gnome-terminal title, so we can find the window
...
Debian do not use hostname in gnome-terminal window title by default, so
the test failed there, even when DispVM was started correctly.
Additionally we can't rely on gnome-terminal --title, as it isn't
working on Debian 8...
2015-03-30 21:32:13 +02:00
Marek Marczykowski-Górecki
cba8c6430c
tests: do not rely on gedit being the default editor
...
Handle gedit, emacs and vim.
2015-03-30 16:18:09 +02:00
Marek Marczykowski-Górecki
c6f136869e
tests: fix handling tests list from cmdline
...
Previous approach didn't worked for dynamically generated tests.
2015-03-30 01:40:39 +02:00
Marek Marczykowski-Górecki
e8a1e3469e
tests/network: release QubesVmCollection lock before starting any VM
2015-03-29 17:33:34 +02:00
Marek Marczykowski-Górecki
999698bd68
core: rename create_xenstore_entries, get rid of xid parameter
...
It have nothing to do with xenstore, so change the name to not mislead.
Also get rid of unused "xid" parameter - we should use XID as little as
possible, because it is not a simple task to keep it current.
2015-03-28 22:36:28 +01:00
Marek Marczykowski-Górecki
96cd341162
tests: typo fix
2015-03-25 00:48:01 +01: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
Marek Marczykowski-Górecki
20e4e26111
tests: add missing skip if no xdotool installed
2015-03-22 01:40:19 +01:00
Marek Marczykowski-Górecki
246d0f4609
tests: if xdotool is not installed, skip tests that uses it
2015-03-19 23:17:34 +01:00
Marek Marczykowski-Górecki
370057bad3
tests: unlock qubes.xml after creating VMs
...
Otherwise it could cause deadlocks.
2015-03-19 23:17:20 +01:00
Marek Marczykowski-Górecki
304ed1dec5
Merge remote-tracking branch 'woju/wip-tests'
2015-03-07 02:48:21 +01:00
Wojciech Zygmunt Porczyk
ad7c6d0dec
tests/run: add option to list available tests
2015-03-05 15:38:59 +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
d6ea80eb5c
tests: wait before pressing ctrl-s in gedit
...
Apparently gedit doesn't handle well fast keystrokes flow.
2015-03-04 02:21:47 +01:00
Marek Marczykowski-Górecki
c5ffba8eb7
tests: save qubes.xml after preparing VMs to backup
2015-02-22 18:24:18 +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
b858488719
Merge remote-tracking branch 'woju/master'
2015-02-21 03:09:29 +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
Wojtek Porczyk
bb5099dc9b
Revert "tests: separate test component names with dot"
...
This reverts commit f7a47e6c66
.
It is now unneeded since parser, which accepts old names.
Old names are more readable.
2015-02-19 21:32:55 +01:00
Wojtek Porczyk
5a9c390485
tests/run: fix log message formatting
2015-02-19 21:32:43 +01:00
Wojtek Porczyk
3e725efe15
tests/run: add command line parser to runner
2015-02-19 21:32:43 +01:00
Marek Marczykowski-Górecki
c37390e33f
tests: remove expectedFailure from test_051_qrexec_simple_eof_reverse
...
This is already fixed in R3 qrexec code.
2015-02-19 04:03:19 +01:00
Marek Marczykowski-Górecki
f7a47e6c66
tests: separate test component names with dot
...
This way the same name can be simply copy-pasted to command line - to
rerun a single test.
2015-02-19 03:55:31 +01:00
Marek Marczykowski-Górecki
7596f753d8
tests: add some timeout for process exit
2015-02-19 03:54:57 +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
726d5686ac
tests: disable qrexec_filecopy_self test
...
When vchan connection is established back to the source domain, gntalloc
crashes with this message:
[ 9.937990] BUG: Bad page map in process qrexec-agent pte:80000000f9d41167 pmd:131c3067
[ 9.938010] page:ffffea00036a6638 count:1 mapcount:-1 mapping: (null) index:0xffffffffffffffff
[ 9.938018] page flags: 0x4000000000000c14(referenced|dirty|reserved|private)
[ 9.938033] addr:00007fa856d47000 vm_flags:140400fb anon_vma: (null) mapping:ffff880011efe940 index:11
[ 9.938042] vma->vm_ops->fault: (null)
[ 9.938057] vma->vm_file->f_op->mmap: gntalloc_mmap+0x0/0x1c0 [xen_gntalloc]
[ 9.938066] CPU: 0 PID: 1108 Comm: qrexec-agent Tainted: G O 3.12.23-1.pvops.qubes.x86_64 #1
[ 9.938074] ffff8800131f3818 ffff88001316fc78 ffffffff814db550 00007fa856d47000
[ 9.938085] ffff88001316fcb8 ffffffff81139413 ffff880011efe940 ffff8800131c3a38
[ 9.938096] ffffea00036a6638 00007fa856d47000 00007fa856d57000 ffff88001316fe18
[ 9.938107] Call Trace:
[ 9.938117] [<ffffffff814db550>] dump_stack+0x45/0x56
[ 9.938126] [<ffffffff81139413>] print_bad_pte+0x1a3/0x240
[ 9.938133] [<ffffffff8113ac9e>] unmap_page_range+0x6ee/0x7d0
[ 9.938142] [<ffffffff8113adf6>] unmap_single_vma+0x76/0xa0
[ 9.938149] [<ffffffff8113be09>] unmap_vmas+0x49/0x90
[ 9.938157] [<ffffffff8114443c>] exit_mmap+0x9c/0x170
[ 9.938166] [<ffffffff8105950c>] mmput+0x5c/0x110
[ 9.938175] [<ffffffff8105d74c>] do_exit+0x27c/0xa20
[ 9.938184] [<ffffffff810908ef>] ? vtime_account_user+0x4f/0x60
[ 9.938194] [<ffffffff81116502>] ? context_tracking_user_exit+0x52/0xc0
[ 9.938203] [<ffffffff8105ed2a>] do_group_exit+0x3a/0xa0
[ 9.938211] [<ffffffff8105ed9f>] SyS_exit_group+0xf/0x10
[ 9.938220] [<ffffffff814ea907>] tracesys+0xdd/0xe2
2015-02-09 22:09:15 +01:00
Marek Marczykowski-Górecki
c663b1dd2d
tests: add simple HVM tests
2015-02-09 06:18:57 +01:00
Marek Marczykowski-Górecki
bc35b99549
tests: update DispVM test
...
Apparently 'l' and 'n' characters aren't passed correctly by xdotool
(some keymap problem?). Do not use them in test text.
2015-02-09 06:17:43 +01:00
Marek Marczykowski-Górecki
27be178a04
tests: add tests for qrexec exit code
2015-02-09 06:08:48 +01:00
Marek Marczykowski-Górecki
f9b2636c73
tests: dom0 update
2015-02-09 03:26:57 +01:00
Marek Marczykowski-Górecki
17a92dd179
tests: fix checking of ping return code
...
Switch ==1 to !=0 - ping can exit with different errors (timeout,
resolve failed etc), but we don't care what was the reason.
2015-02-02 04:50:37 +01:00
Marek Marczykowski-Górecki
26a9dcda66
tests: actually install network tests
2015-02-02 04:50:26 +01:00
Marek Marczykowski-Górecki
c489a81dfa
tests: networking
2015-01-30 01:38:56 +01:00
Marek Marczykowski-Górecki
0009805041
rpm+makefile: move build/install code to Makefile files
...
This makes build "scripts" not tied to Fedora-specific files. Especially
ease porting to other platforms.
2014-11-19 12:50:24 +01:00
Marek Marczykowski-Górecki
49ca49017e
tests: DispVM tests
2014-11-10 11:42:30 +01:00
Marek Marczykowski-Górecki
256e35a62c
tests: annotate qrexec EOF tests with expected failure
...
EOF transmission actually doesn't work in some cases in R2. It is rather
hard to change without introducing big changes (which we don't want to
do in R2). It should be fixed in R3.
BTW The said changes are in my qrexec-sockets branch in core-agent-linux
and linux-utils (then application should use shutdown(2) instead of
close). Alternatively qrexec-agent can use PAM directly (instead of
calling "su"). This is also implemented (pam branch in
core-agent-linux), but IMO it isn't the way to go (reimplementing "su"
in qrexec-agent code).
2014-11-10 02:28:18 +01:00
Marek Marczykowski-Górecki
fa6e6da211
tests: qrexec VM-VM EOF transmission tests
...
Similar to previous commit - test_053_qrexec_vm_service_eof_reverse
fails for now.
2014-10-30 06:37:41 +01:00
Marek Marczykowski-Górecki
d202ec7bc4
tests: qrexec EOF transmission tests
...
Currently EOF VM->dom0 test fails...
2014-10-29 22:00:20 +01:00
Marek Marczykowski-Górecki
c3b0b4f75f
tests: separate test for qrexec "loopback" call
2014-10-29 21:38:54 +01:00
Marek Marczykowski-Górecki
9324cdb175
tests: add test for race condition during VM creation ( #906 )
2014-10-22 03:52:43 +02:00
Marek Marczykowski-Górecki
d5817eb6c5
tests: add some basic tests for running VM, qrexec, GUI
2014-10-22 02:14:25 +02:00
Marek Marczykowski-Górecki
a457a3e5ca
tests: initial VM mgmt tests
2014-10-02 10:56:04 +02:00
Marek Marczykowski-Górecki
c58fc767a3
tests: fix test_r1 backup test
2014-10-02 02:38:51 +02:00
Marek Marczykowski-Górecki
8193d3dd61
tests: add test restore of R1 backup
2014-10-01 05:42:33 +02:00
Marek Marczykowski-Górecki
bd4cd9baa2
tests: minor improvements to backupcompatibility/test_r2b2
2014-10-01 05:36:47 +02:00
Marek Marczykowski-Górecki
58586a0e38
tests: add test for restoring R2B2 backup
...
One of "format 1" backup.
2014-10-01 03:50:56 +02:00
Marek Marczykowski-Górecki
19d4bc300e
tests: add test for sending a backup to VM
2014-10-01 03:50:55 +02:00
Marek Marczykowski-Górecki
b6e60f9aa4
tests: no longer mark "encrypted and compressed backup" test as expected failure
2014-09-26 14:42:58 +02:00
Marek Marczykowski-Górecki
3f66d99f7f
tests: silence unneeded messages (requires qubes-core-dom0-linux-2.0.24)
2014-09-26 14:42:26 +02:00
Marek Marczykowski-Górecki
d5c63786d9
tests: improve error reporting in backup tests
2014-09-26 14:42:26 +02:00
Marek Marczykowski-Górecki
6d3ff57466
tests: add more tests for backups system
2014-09-26 14:42:26 +02:00
Marek Marczykowski-Górecki
e36488e8ec
tests: add initial backup test
2014-09-25 05:47:35 +02:00
Marek Marczykowski-Górecki
603384b4c6
tests: add initial backup test
2014-09-18 08:25:56 +02:00
Marek Marczykowski
a84886db07
Move all files one level up
2013-03-16 19:56:51 +01:00