[libvirt] PATCH: Fix ue of VIR_TEST_DEBUG var

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

 



The previous patch I did to add OOM testing accidentally disabled use of
the VIR_TEST_DEBUG env variable when OOM testing is #ifdef'd out. This
patch I just comitted makes sure its always used.

Daniel

diff -r d37150dc5895 tests/testutils.c
--- a/tests/testutils.c	Tue Jul 08 16:17:52 2008 +0100
+++ b/tests/testutils.c	Wed Jul 09 11:23:27 2008 +0100
@@ -321,20 +321,24 @@
                  char **argv,
                  int (*func)(int, char **))
 {
+    char *debugStr;
 #if TEST_OOM
     int ret;
     int approxAlloc = 0;
     int n;
-    char *oomStr = NULL, *debugStr;
+    char *oomStr = NULL;
     int oomCount;
     int mp = 0;
     pid_t *workers;
     int worker = 0;
+#endif
+
     if ((debugStr = getenv("VIR_TEST_DEBUG")) != NULL) {
         if (virStrToLong_ui(debugStr, NULL, 10, &testDebug) < 0)
             testDebug = 0;
     }
 
+#if TEST_OOM
     if ((oomStr = getenv("VIR_TEST_OOM")) != NULL) {
         if (virStrToLong_i(oomStr, NULL, 10, &oomCount) < 0)
             oomCount = 0;

-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

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