[PATCH 1/2] qemuxml2argvmock: Mock time() on non-linux platforms too

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

 



The qemuxml2argvtest is run on more platforms than linux. For instance
FreeBSD. On these platforms we are, however, not mocking time() which
results in current time being fetched from system and hence tests number
32 and 33 failing.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 tests/qemuxml2argvmock.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/tests/qemuxml2argvmock.c b/tests/qemuxml2argvmock.c
index ed9fb13..bff3b0f 100644
--- a/tests/qemuxml2argvmock.c
+++ b/tests/qemuxml2argvmock.c
@@ -20,9 +20,8 @@
 
 #include <config.h>
 
-#ifdef __linux__
-# include "internal.h"
-# include <time.h>
+#include "internal.h"
+#include <time.h>
 
 time_t time(time_t *t)
 {
@@ -31,7 +30,3 @@ time_t time(time_t *t)
         *t = ret;
     return ret;
 }
-
-#else
-/* Nothing to override on non-__linux__ platforms */
-#endif
-- 
1.8.5.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]