core-admin-client/qubesadmin/tests/tools
Marek Marczykowski-Górecki 9acce13a35
tools: fix qvm-run --pass-io --localcmd=... vmname command
qubes.VMShell service, used by qvm-run, expects the command on the first
input line. Previously, when --localcmd was used, the command wasn't
written anywhere and the local command was connected directly to
qubes.VMShell service. And the first line of its output was interpreted
as a command.

Fix this by starting the local command separately, after sending the
command to qubes.VMShell service.

While at it, unify handling shell command and service calls in the process.
vm.run_service(..., localcmd= ) isn't that useful in general case,
because for qubes.VMShell the caller first need to send the command
before starting local process. Since the qvm-run tool needs to implement
manual starting localcmd anyway, don't use localcmd= run_service's
argument at all to unify calling methods.

There is slight behavior change: previously localcmd was started only
after establishing service connection (for example only if qrexec policy
allows), now it is started in all the cases.

Fixes QubesOS/qubes-issues#4040
2018-12-08 00:44:02 +01:00
..
__init__.py tests/tools: add MockEventsReader 2017-07-08 00:08:19 +02:00
init.py Rename qubesmgmt to qubesadmin module 2017-05-11 23:40:03 +02:00
qubes_prefs.py Rename Mgmt API to Admin API: methods names 2017-05-12 19:36:03 +02:00
qvm_backup_restore.py qvm-backup-restore: really pass options 2018-02-23 02:09:04 +00:00
qvm_backup.py qvm-backup: let backup core handle default VM selection 2018-02-23 02:09:06 +00:00
qvm_check.py Rename Mgmt API to Admin API: methods names 2017-05-12 19:36:03 +02:00
qvm_clone.py Implement VM clone as create + copy data+metadata 2017-06-20 01:34:18 +02:00
qvm_create.py Copy application menu on VM clone 2018-10-29 05:27:05 +01:00
qvm_device.py devices,features: fix bool values handling 2017-07-17 20:27:35 +02:00
qvm_features.py tests: too much copy&paste 2017-07-28 13:56:39 +02:00
qvm_firewall.py tools/qvm-firewall: add dst4 and dst6 as synonyms for dsthost 2018-05-03 00:49:43 +02:00
qvm_kill.py Rename Mgmt API to Admin API: methods names 2017-05-12 19:36:03 +02:00
qvm_ls.py qvm-ls: add filtering by domain power state 2018-10-10 20:06:35 +02:00
qvm_pause.py Rename Mgmt API to Admin API: methods names 2017-05-12 19:36:03 +02:00
qvm_pool.py tools/qvm-pool: add --set to modify pool properties 2018-04-13 00:26:25 +02:00
qvm_prefs.py Add test of qvm_prefs for specal case "None" 2018-06-13 23:38:25 -05:00
qvm_remove.py Added test for qvm-remove dependency reporting 2018-07-20 01:35:00 +02:00
qvm_run.py tools: fix qvm-run --pass-io --localcmd=... vmname command 2018-12-08 00:44:02 +01:00
qvm_service.py tools: qvm-service tool 2017-07-28 14:24:04 +02:00
qvm_shutdown.py tools/qvm-shutdown: fix handling shutdown timeout for multiple VMs 2017-10-28 22:40:24 +02:00
qvm_start_gui.py Add 'gui-emulated' feature 2018-07-16 04:25:56 +02:00
qvm_start.py tools: adjust qvm-start message and logic, update tests 2017-10-08 18:17:03 +02:00
qvm_tags.py tools: add qvm-tags tool 2017-06-20 01:34:17 +02:00
qvm_template_postprocess.py qvm-template-postprocess: resize volume only when needed 2018-03-19 20:47:15 +01:00
qvm_unpause.py Rename Mgmt API to Admin API: methods names 2017-05-12 19:36:03 +02:00
qvm_volume.py qvm-volume: refuse to shrink volume unless --force option is used 2018-03-20 17:53:36 +01:00