Commit Graph

5994 Commits

Author SHA1 Message Date
Frédéric Pierret (fepitre)
577e4b24a6
gui: fixes from Marek's comments 2020-03-18 14:17:04 +01:00
Frédéric Pierret (fepitre)
f130ec0bf3
gui: improvements of feature keyboard layout checks 2020-03-18 09:46:21 +01:00
Frédéric Pierret (fepitre)
5cb0e61a84
tests: adapt tests for keyboard-layout 2020-03-18 09:17:37 +01:00
Frédéric Pierret (fepitre)
732e291ab6
gui: drop legacy qubes-keyboard support
Add check for keyboard-layout feature set
2020-03-18 09:17:37 +01:00
Marek Marczykowski-Górecki
29020d0c53
Merge branch 'feature-pre-set'
* feature-pre-set:
  Add pre- events to vm features
2020-03-17 19:26:53 +01:00
Marek Marczykowski-Górecki
d05592ba52
Add pre- events to vm features
Allow extensions to validate feature values, before it is set.
2020-03-17 18:46:12 +01:00
Marek Marczykowski-Górecki
ddc13d6b62
Merge remote-tracking branch 'origin/pr/329'
* origin/pr/329:
  tests: make PEP8 happier
  tests: fix already registered event impl
2020-03-17 12:07:18 +01:00
Frédéric Pierret (fepitre)
d8f80c9687
tests: make PEP8 happier 2020-03-16 23:22:36 +01:00
Frédéric Pierret (fepitre)
40156c3e78
tests: fix already registered event impl 2020-03-16 23:21:15 +01:00
Marek Marczykowski-Górecki
86d07460c7
version 4.1.10 2020-03-15 03:50:01 +01:00
Marek Marczykowski-Górecki
f62a861140
tests: fix test_053_qrexec_vm_service_eof_reverse
and not mark it as expected failure anymore. Note the removal of the
expected failure isn't just about the changes here, but also about the
actual fix on the qrexec side (ffafd01 "Fix not closed file descriptors in
qubes-rpc-multiplexer" commit in core-qrexec repository).
2020-03-15 02:55:18 +01:00
Marek Marczykowski-Górecki
5423ead27a
tests/vm_qrexec_gui: do not swallow stderr on failure
QubesVM.run_for_stdio() by default captures stderr. In case of call fail
(non-zero return code), captured stderr is included in the exception
object, but isn't printed by default CalledProcessError message.
Make it visible by:
 - handling CalledProcessError and including in the test failure message
   (when exception is captured already)
 - not capturing stderr (if no exception handling is present in the
   test)
2020-03-14 03:43:22 +01:00
Marek Marczykowski-Górecki
d033457f3d
tests: adjust for qrexec-client-vm exit code
It now consistently returns remote exit code, not a local one.
Check 'cat' exit code instead.
2020-03-14 03:43:17 +01:00
Marek Marczykowski-Górecki
7a750ea9c8
tests: QubesVM.run_for_stdio 2020-03-10 11:56:48 +01:00
Marek Marczykowski-Górecki
9ec86f3c41
Workaround different behaviour of asyncio's Process.communicate()
In asyncio's Process.communicate() input=None does not close stdin.
Workaround it by using b'' instead of None.

https://bugs.python.org/issue39744
2020-03-10 11:56:48 +01:00
Marek Marczykowski-Górecki
3ce4e5eaa5
tests: adjust SystemTestCase.create_remote_file to create executables
The main use case for this function is to create qrexec services in VMs.
Since qrexec now require service scripts to be executable, make
create_remote_file() adjust permissions.
2020-03-10 11:56:47 +01:00
Marek Marczykowski-Górecki
27e8d9ef4d
Make /etc/qubes-rpc/qubes.ConnectTCP executable
QubesOS/qubes-issues#5686
2020-03-10 11:56:47 +01:00
Marek Marczykowski-Górecki
2460adbdef
tests: socket-based qrexec services
QubesOS/qubes-issues#3912
2020-03-10 11:56:47 +01:00
Marek Marczykowski-Górecki
3f5fb0de9e
tests: hide git output when checking local checkout 2020-03-10 11:56:47 +01:00
Marek Marczykowski-Górecki
534de9bc1c
tests: fix cleanup before test
If any test-* VMs remains from previous test run, there are removed
before test. self.app doesn't exist at this point, so don't require it
in self.remove_vms().
2020-03-10 11:56:47 +01:00
Marek Marczykowski-Górecki
e6e4908e71
version 4.1.9 2020-03-10 03:08:42 +01:00
Marek Marczykowski-Górecki
879ee9e7d6
api/internal: extract get_system_info() function
This will be useful in other places too.

QubesOS/qubes-issues#5099
2020-03-09 19:25:10 +01:00
Marek Marczykowski-Górecki
135eda0582
Merge remote-tracking branch 'origin/pr/320'
* origin/pr/320:
  storage/lvm: don't try to resize non-existing lvm volumes
  storage/lvm: update volume.size attribute on resize
2020-03-09 18:34:49 +01:00
M. Vefa Bicakci
5d755eb065
tests: Add a test case for QubesVM.is_fully_usable
This commit adds a test case for the QubesVM class's is_fully_usable
method. The verified scenarios are as follows:

* The VM has qrexec enabled, and the qrexec service has been
  successfully started.
  (The VM becomes "fully usable" in this case.)

* The VM has qrexec enabled, and the qrexec service has failed to start
  (Error handling case; the VM is *not* fully usable.)

* The VM does *not* have qrexec enabled.
  (The VM becomes "fully usable" in this case.)
2020-03-09 00:22:51 -04:00
M. Vefa Bicakci
2d55841a5e
qubesvm: Let HVMs enter 'Running' state
Prior to this commit, a properly configured Linux HVM would not
transition from the 'Transient' state to the 'Running' state according
to qvm-ls output, even if the HVM in question had the 'qrexec' feature
disabled.

This issue is caused by an unconditional qrexec check in the
'on_domain_is_fully_usable' method, and is resolved by adding
a check that short-circuits the qrexec check if the aforementioned
feature is not enabled for the VM in question.
2020-03-08 22:39:16 -04:00
M. Vefa Bicakci
d81d6a9267
qubes module: Typo fix
This commit fixes a typo, where the exception type DontSave was used,
even though the name of the function dontsave was intended.
2020-03-08 22:39:16 -04:00
M. Vefa Bicakci
7980d94807
qvm-sync-clock: Do not fail if clockvm is not set 2020-03-08 22:39:11 -04:00
Marek Marczykowski-Górecki
16bdeea2c0
Merge remote-tracking branch 'origin/pr/295'
* origin/pr/295:
  tests: fix tag name in audiovm test
  tests: ensure notin while setting Audio/Gui VM
  gui: add checks for changing/removing guivm
  audio: add checks for changing/removing audiovm
  audio/gui: use simply vm.tags instead of list()
  tests: fix tests for gui/audio vm
  Make pylint happy
  gui/audio: fixes from Marek's comments
  Allow AudioVM to be ran after any attached qubes
  Allow GuiVM to be ran after any attached qubes
  xid: ensure vm is not running
  tests: fix missing default audiovm and guivm tags
  gui, audio: better handling of start/stop guivm/audiovm
  gui, audio: ensure guivm and audiovm tag are set
  Support for AudioVM
2020-03-09 01:48:01 +01:00
Marek Marczykowski-Górecki
36e9afe1ff
Merge branch 'tests20200301'
* tests20200301:
  tests/salt: don't depend on initial tags set
  tests: make audio tests less racy
2020-03-09 01:45:58 +01:00
Marek Marczykowski-Górecki
4cfc423d5e
tests: fix tag name in audiovm test 2020-03-09 01:11:58 +01:00
Marek Marczykowski-Górecki
84ec49e98d
Merge remote-tracking branch 'origin/pr/322'
* origin/pr/322:
  Ensure empty service value delete /var/run/qubes-service/ file
  services: fixes from Marek's comments
  config: fix mistake in path for services
  tests: add/remove services in dom0
  config: specify dom0 services path
  services: handle dom0 write permission errors
  services: handle /var/run/qubes/'SERVICE NAME' for dom0
  services: make PEP8 happier
2020-03-09 00:37:44 +01:00
Frédéric Pierret (fepitre)
a61bb9a0cb
Ensure empty service value delete /var/run/qubes-service/ file
- Add tests and stop patch path from Marek's comment
2020-03-08 23:08:48 +01:00
Frédéric Pierret (fepitre)
532d9a3a98
tests: ensure notin while setting Audio/Gui VM 2020-03-08 22:59:46 +01:00
Frédéric Pierret (fepitre)
90584c487a
gui: add checks for changing/removing guivm 2020-03-08 17:07:29 +01:00
Frédéric Pierret (fepitre)
c36ad38eb3
audio: add checks for changing/removing audiovm 2020-03-08 17:07:29 +01:00
Frédéric Pierret (fepitre)
9051aff15a
audio/gui: use simply vm.tags instead of list() 2020-03-08 17:07:29 +01:00
Frédéric Pierret (fepitre)
4b5ae0833b
tests: fix tests for gui/audio vm 2020-03-08 17:07:24 +01:00
Frédéric Pierret (fepitre)
43786e1478
Make pylint happy
- Drop unused 'asyncio'
- Drop useless 'else' after return
2020-03-08 17:05:34 +01:00
Frédéric Pierret (fepitre)
7506482d08
gui/audio: fixes from Marek's comments 2020-03-08 17:05:34 +01:00
Frédéric Pierret (fepitre)
660c224914
Allow AudioVM to be ran after any attached qubes 2020-03-08 17:05:34 +01:00
Frédéric Pierret (fepitre)
edfb251413
Allow GuiVM to be ran after any attached qubes 2020-03-08 17:05:34 +01:00
Frédéric Pierret (fepitre)
3f4ee9f8d9
xid: ensure vm is not running 2020-03-08 17:05:34 +01:00
Frédéric Pierret (fepitre)
820500a367
tests: fix missing default audiovm and guivm tags 2020-03-08 17:05:33 +01:00
Frédéric Pierret (fepitre)
a1752ef265
gui, audio: better handling of start/stop guivm/audiovm 2020-03-08 17:05:33 +01:00
Frédéric Pierret (fepitre)
8f67334c4f
gui, audio: ensure guivm and audiovm tag are set 2020-03-08 17:05:33 +01:00
Frédéric Pierret (fepitre)
795ff1233a
Support for AudioVM 2020-03-08 17:05:33 +01:00
Marek Marczykowski-Górecki
b569f5a2b0
tests/firewall: update future time to be really in the future
Mar 4 2020 is no longer future, move it much more into the future.
2020-03-08 16:35:39 +01:00
Frédéric Pierret (fepitre)
bdc3c6588b
services: fixes from Marek's comments 2020-03-08 09:51:30 +01:00
Frédéric Pierret (fepitre)
31c098d1bd
config: fix mistake in path for services 2020-03-08 09:47:09 +01:00
Marek Marczykowski-Górecki
283d251387
Merge remote-tracking branch 'origin/pr/319'
* origin/pr/319:
  gui: set xkb_layout manually
  tests: handle legacy layout
  gui: no check in subprocess.run
  gui: handle legacy keymap setting /qubes-keyboard
2020-03-08 01:29:21 +01:00