[PATCH 2/2] qemuxml2argvtest: do not mock virCommand

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

 



Mock virNetDevRunEthernetScript instead.

This restores the VIR_TEST_REGENERATE_OUTPUT functionality.
---
 src/libvirt_private.syms | 1 +
 tests/qemuxml2argvmock.c | 7 ++-----
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index a79d85e..45ad961 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -1810,6 +1810,7 @@ virNetDevReplaceMacAddress;
 virNetDevReplaceNetConfig;
 virNetDevRestoreMacAddress;
 virNetDevRestoreNetConfig;
+virNetDevRunEthernetScript;
 virNetDevRxFilterFree;
 virNetDevRxFilterModeTypeFromString;
 virNetDevRxFilterModeTypeToString;
diff --git a/tests/qemuxml2argvmock.c b/tests/qemuxml2argvmock.c
index eb2a5b4..1616eed 100644
--- a/tests/qemuxml2argvmock.c
+++ b/tests/qemuxml2argvmock.c
@@ -132,12 +132,9 @@ virNetDevSetOnline(const char *ifname ATTRIBUTE_UNUSED,
 }
 
 int
-virCommandRun(virCommandPtr cmd ATTRIBUTE_UNUSED,
-              int *exitstatus)
+virNetDevRunEthernetScript(const char *ifname ATTRIBUTE_UNUSED,
+                           const char *script ATTRIBUTE_UNUSED)
 {
-    if (exitstatus)
-        *exitstatus = 0;
-
     return 0;
 }
 
-- 
2.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]