From 2ea58429517e5abd671ccfea0e76d99d20fd6256 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 25 Apr 2025 17:05:22 +0100 Subject: [PATCH] Fix RHEL gating tests These would always fail because libvirt doesn't start up after being installed. You would see errors like: libguestfs: opening libvirt handle: URI = qemu:///system, auth = default+wrapper, flags = 0 libvirt: XML-RPC error : Failed to connect socket to '/var/run/libvirt/virtqemud-sock': No such file or directory libguestfs: error: could not connect to libvirt (URI = qemu:///system): Failed to connect socket to '/var/run/libvirt/virtqemud-sock': No such file or directory [code=38 int1=2] (cherry picked from Fedora commit a1eed9c04c9e64cf24bc83a0da2cd6b05f7400c3) --- tests/run-libguestfs-test-tool.sh | 10 ++++++++++ tests/tests.yml | 7 ++++--- 2 files changed, 14 insertions(+), 3 deletions(-) create mode 100755 tests/run-libguestfs-test-tool.sh diff --git a/tests/run-libguestfs-test-tool.sh b/tests/run-libguestfs-test-tool.sh new file mode 100755 index 0000000..d36d5ea --- /dev/null +++ b/tests/run-libguestfs-test-tool.sh @@ -0,0 +1,10 @@ +#!/bin/bash - +set -e +set -x + +# This only makes sure that libguestfs isn't totally broken. + +# Fix libvirt. +systemctl restart virtqemud virtsecretd virtstoraged virtnetworkd + +libguestfs-test-tool diff --git a/tests/tests.yml b/tests/tests.yml index 180fe76..3809111 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -5,9 +5,10 @@ - role: standard-test-basic tags: - classic + required_packages: + - libguestfs + - libvirt-daemon-kvm tests: - libguestfs-test-tool: dir: . - run: libguestfs-test-tool - required_packages: - - libguestfs + run: ./run-libguestfs-test-tool.sh