[PATCH 19/27] qemuMonitorJSONTestAttachChardev: Add logfile to some tests

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

 



Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 tests/qemumonitorjsontest.c | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c
index 434677f25f..8fbb199a59 100644
--- a/tests/qemumonitorjsontest.c
+++ b/tests/qemumonitorjsontest.c
@@ -726,13 +726,17 @@ qemuMonitorJSONTestAttachChardev(virDomainXMLOption *xmlopt,

         chr->data.file.path = g_strdup("/test/path");

-        chr->type = VIR_DOMAIN_CHR_TYPE_FILE;
-        CHECK("file", false,
-              "{'id':'alias','backend':{'type':'file','data':{'out':'/test/path'}}}");
-
         chr->type = VIR_DOMAIN_CHR_TYPE_DEV;
         CHECK("device", false,
               "{'id':'alias','backend':{'type':'serial','data':{'device':'/test/path'}}}");
+
+        chr->type = VIR_DOMAIN_CHR_TYPE_FILE;
+        chr->logfile = g_strdup("/test/logfile");
+        chr->logappend = VIR_TRISTATE_SWITCH_OFF;
+        CHECK("file", false,
+              "{'id':'alias','backend':{'type':'file','data':{'out':'/test/path',"
+                                                             "'logfile':'/test/logfile',"
+                                                             "'logappend':false}}}");
     }

     {
@@ -753,6 +757,7 @@ qemuMonitorJSONTestAttachChardev(virDomainXMLOption *xmlopt,

         chr->data.tcp.tlscreds = true;
         chrSourcePriv->tlsCredsAlias = qemuAliasTLSObjFromSrcAlias("alias");
+        chr->logfile = g_strdup("/test/log");
         CHECK("tcp", false,
               "{'id':'alias',"
                "'backend':{'type':'socket',"
@@ -761,7 +766,8 @@ qemuMonitorJSONTestAttachChardev(virDomainXMLOption *xmlopt,
                                                   "'port':'1234'}},"
                                   "'telnet':false,"
                                   "'server':false,"
-                                  "'tls-creds':'objalias_tls0'}}}");
+                                  "'tls-creds':'objalias_tls0',"
+                                  "'logfile':'/test/log'}}}");

     }

-- 
2.34.1




[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]

  Powered by Linux