1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 21:20:33 +02:00

tests: Add qemu-guest-agent system test.

Enable the QEMU guest agent interface in marionette VMs, run the
qemu-guest-agent service in one and try talking to it.

* gnu/build/marionette.scm (make-marionette): Enable the guest agent device.
* gnu/tests/virtualization.scm (run-qemu-guest-agent-test): New procedure.
(%test-qemu-guest-agent): New variable.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Timotej Lazar
2022-07-28 17:03:26 +02:00
committed by Ludovic Courtès
parent ee199cd3ba
commit fd74fe6325
2 changed files with 88 additions and 1 deletions

View File

@@ -105,11 +105,14 @@ QEMU monitor and to the guest's backdoor REPL."
"-monitor" (string-append "unix:" socket-directory "/monitor")
"-chardev" (string-append "socket,id=repl,path=" socket-directory
"/repl")
"-chardev" (string-append "socket,id=qga,server=on,wait=off,path="
socket-directory "/qemu-ga")
;; See
;; <http://www.linux-kvm.org/page/VMchannel_Requirements#Invocation>.
"-device" "virtio-serial"
"-device" "virtserialport,chardev=repl,name=org.gnu.guix.port.0"))
"-device" "virtserialport,chardev=repl,name=org.gnu.guix.port.0"
"-device" "virtserialport,chardev=qga,name=org.qemu.guest_agent.0"))
(define (accept* port)
(match (select (list port) '() (list port) timeout)