Commit Graph

57 Commits

Author SHA1 Message Date
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
63f0966cdd
tests: fix MimeHandlers after "29c602c tests: prefix internal functions with underscore" 2016-03-13 03:37:04 +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
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
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
70546ac21a tests: add test for VM autostart on qrexec call 2015-12-28 01:07:48 +01:00
Marek Marczykowski-Górecki
1b5daea771
qvm-grow-root: add --allow-start option
In some (most) cases VM needs to be started to complete resize
operation. This may be unexpected, so make it clear and do not start the
VM when the user did not explicitly allow that.

Fixes QubesOS/qubes-issues#1268
2015-12-26 04:10:20 +01:00
Marek Marczykowski-Górecki
aeec42dacf
tests: PV Grub: ensure that latest packages are installed
Flush yum case before that.
2015-11-25 03:16:24 +01:00
Marek Marczykowski-Górecki
64343572c1
tests: handle older df version in resize private.img tests
df --output=size isn't available in Debian (7, 8).
2015-11-25 03:15:23 +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
564ea5d64c
tests: check if qvm-move-to-vm properly fails in case of out of disk space
Regression test for QubesOS/qubes-issues#1355
2015-11-25 01:35:04 +01:00
Marek Marczykowski-Górecki
d7ab2d985d
tests: use wait_for_window/enter_keys_in_window wrappers when applicable
Reduce code duplication.
2015-11-25 01:35:04 +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
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
44c340c046
tests: add wait_for_window function to reduce code duplication 2015-11-03 02:43:46 +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
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
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
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
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
33f0fa17b8 tests: fix clipboard tess 2015-06-21 01:12:47 +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
Marek Marczykowski-Górecki
d0b3d15212 tests: add a test for secure clipboard 2015-03-31 05:14:18 +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
fbd96532e8 tests: automatically iterate tests over templates 2015-03-22 03:32:01 +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
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
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
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
7596f753d8 tests: add some timeout for process exit 2015-02-19 03:54:57 +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
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