If users build with --enable-test-oom configure option,
they get this error saying, virAllocTest* functions are
not defined within tests/testutils.c.
# util/viralloc.h
virAlloc;
virAllocN;
+virAllocTestCount;
+virAllocTestHook;
+virAllocTestInit;
+virAllocTestOOM;
virAllocVar;
virDeleteElementsN;
virExpandN;
testMallocNext++;
return fail;
}
+
+#else
+
+void virAllocTestOOM(int n ATTRIBUTE_UNUSED,
+ int m ATTRIBUTE_UNUSED)
+{
+ /* nada */
+}
+
+int virAllocTestCount(void)
+{
+ return 0;
+}
+
+void virAllocTestInit(void)
+{
+ /* nada */
+}
+
+void virAllocTestHook(void (*func)(int, void*) ATTRIBUTE_UNUSED,
+ void *data ATTRIBUTE_UNUSED)
+{
+ /* nada */
+}
#endif
# define VIR_FREE(ptr) virFree((void *) &(ptr))
# endif
-
-
-# if TEST_OOM
void virAllocTestInit(void);
int virAllocTestCount(void);
void virAllocTestOOM(int n, int m);
void virAllocTestHook(void (*func)(int, void*), void *data);
-# endif
-
-
-
#endif /* __VIR_MEMORY_H_ */
if (worker) {
_exit(ret);
} else {
- int i, status;
+ int i;
for (i = 0 ; i < mp ; i++) {
if (virProcessWait(workers[i], NULL) < 0)
ret = EXIT_FAILURE;