[libvirt-glib PATCHv2 5/5] Add test for GVirConfigConsole

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 libvirt-gconfig/tests/test-domain-create.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/libvirt-gconfig/tests/test-domain-create.c b/libvirt-gconfig/tests/test-domain-create.c
index cb9ffcb..006ebc6 100644
--- a/libvirt-gconfig/tests/test-domain-create.c
+++ b/libvirt-gconfig/tests/test-domain-create.c
@@ -136,6 +136,17 @@ int main(void)
                                        GVIR_CONFIG_DOMAIN_VIDEO_MODEL_QXL);
     devices = g_list_append(devices, GVIR_CONFIG_DOMAIN_DEVICE(video));
 
+    /* console node */
+    GVirConfigDomainConsole *console;
+    GVirConfigDomainChardevSourcePty *pty;
+
+    console = gvir_config_domain_console_new();
+    pty = gvir_config_domain_chardev_source_pty_new();
+    gvir_config_domain_chardev_set_source(GVIR_CONFIG_DOMAIN_CHARDEV(console),
+                                          GVIR_CONFIG_DOMAIN_CHARDEV_SOURCE(pty));
+    g_object_unref(G_OBJECT(pty));
+    devices = g_list_append(devices, GVIR_CONFIG_DOMAIN_DEVICE(console));
+
 
     gvir_config_domain_set_devices(domain, devices);
     g_list_foreach(devices, (GFunc)g_object_unref, NULL);
-- 
1.7.7.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]