diff options
| author | Giacomo Leidi <therewasa@fishinthecalculator.me> | 2026-02-17 11:46:46 +0100 |
|---|---|---|
| committer | Giacomo Leidi <therewasa@fishinthecalculator.me> | 2026-03-04 20:18:02 +0100 |
| commit | a375202ad3443e4c3fb492160e32aa6abcc965bd (patch) | |
| tree | 1a23038208e0721302dce8130812bbc3c331cfac /gnu/tests | |
| parent | e29c17a2e7c4078e1008f1b1c53097d31759b760 (diff) | |
gnu: libvirt: Configure default libvirt network.
* gnu/services/virtualization.scm (%libvirt-activation): Activate
default libvirt network configuration file.
* gnu/tests/virtualization.scm (run-libvirt-test): Drop network
definition test and replace it with a test checking that the default
network is inactive by default.
Change-Id: I03b6314a390c6d93ebf886d7033867ff5cacad74
Diffstat (limited to 'gnu/tests')
| -rw-r--r-- | gnu/tests/virtualization.scm | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/gnu/tests/virtualization.scm b/gnu/tests/virtualization.scm index 070ceecc2c6..05b2e0748b0 100644 --- a/gnu/tests/virtualization.scm +++ b/gnu/tests/virtualization.scm @@ -119,15 +119,23 @@ "-c" "qemu:///system" "connect")) marionette)) - (test-eq "create default network" - 0 + (test-equal "default network is inactive" + "no" (marionette-eval '(begin + (use-modules (ice-9 popen) + (ice-9 textual-ports)) (chdir "/tmp") - (system* #$(file-append libvirt "/bin/virsh") - "-c" "qemu:///system" "net-define" - #$(file-append libvirt - "/etc/libvirt/qemu/networks/default.xml"))) + (define port + (open-input-pipe + (string-join '(#$(file-append libvirt "/bin/virsh") + "-c" "qemu:///system" "net-info" + "default" "|" "grep" "Active:" "|" + "awk" "'{ print $2; }'") + " "))) + (define answer (get-string-all port)) + (close-port port) + (string-trim-both answer)) marionette)) (test-eq "start default network" |
