]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: Stop mocking 'qemuOpenChrChardevUNIXSocket'
authorPeter Krempa <pkrempa@redhat.com>
Wed, 13 May 2026 15:39:06 +0000 (17:39 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 25 May 2026 11:28:57 +0000 (13:28 +0200)
The tests now use 'testQemuPrepareHostBackendChardevOne' which replaces
'qemuProcessPrepareHostBackendChardevOne' which is skipped as it is a
host setup step.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_command.h
tests/qemuxml2argvmock.c

index 028d002ef9e87391095d080268027fc5443fe451..e34172fbffae4f1e8db8d9ba23d9ae442b1083e5 100644 (file)
@@ -74,8 +74,7 @@ qemuBuildTLSx509BackendProps(const char *tlspath,
 
 /* Open a UNIX socket for chardev FD passing */
 int
-qemuOpenChrChardevUNIXSocket(const virDomainChrSourceDef *dev)
-    ATTRIBUTE_MOCKABLE;
+qemuOpenChrChardevUNIXSocket(const virDomainChrSourceDef *dev);
 
 virJSONValue *
 qemuBuildChrDeviceProps(const virDomainDef *vmdef,
index 9d10b5655fd533ca02b90cac6650add602972cfa..b4ebf1a172488e83aeaa49ec19cb5a6c1074792d 100644 (file)
@@ -236,23 +236,6 @@ qemuInterfaceOpenVhostNet(virDomainObj *vm G_GNUC_UNUSED,
 }
 
 
-int
-qemuOpenChrChardevUNIXSocket(const virDomainChrSourceDef *dev G_GNUC_UNUSED)
-
-{
-    /* We need to return an FD number for a UNIX listener socket,
-     * which will be given to QEMU via a CLI arg. We need a fixed
-     * number to get stable tests. This is obviously not a real
-     * FD number, so when virCommand closes the FD in the parent
-     * it will get EINVAL, but that's (hopefully) not going to
-     * be a problem....
-     */
-    if (fcntl(1729, F_GETFD) != -1)
-        abort();
-    return 1729;
-}
-
-
 int
 qemuBuildTPMOpenBackendFDs(const char *tpmdev G_GNUC_UNUSED,
                            int *tpmfd,