Patchwork [5/6] fix test_path

login
register
mail settings
Submitter Paolo Bonzini
Date Oct. 21, 2010, 8:18 a.m.
Message ID <1287649120-30740-6-git-send-email-pbonzini@redhat.com>
Download mbox | patch
Permalink /patch/68550/
State New
Headers show

Comments

Paolo Bonzini - Oct. 21, 2010, 8:18 a.m.
path.c grew quite a few new dependencies (mostly via cutils.c),
include them.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 tests/Makefile    |    2 +-
 tests/test_path.c |   13 +++++++++++--
 2 files changed, 12 insertions(+), 3 deletions(-)

Patch

diff --git a/tests/Makefile b/tests/Makefile
index e26b2d7..ef575a4 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -3,7 +3,7 @@ 
 
 $(call set-vpath, $(SRC_PATH)/tests)
 
-CFLAGS=-Wall -O2 -g -fno-strict-aliasing
+CFLAGS=-Wall -O2 -g -fno-strict-aliasing -I..
 #CFLAGS+=-msse2
 LDFLAGS=
 
diff --git a/tests/test_path.c b/tests/test_path.c
index def7441..234ed97 100644
--- a/tests/test_path.c
+++ b/tests/test_path.c
@@ -1,12 +1,21 @@ 
 /* Test path override code */
-#define _GNU_SOURCE
+#include "../config-host.h"
+#include "../qemu-malloc.c"
+#include "../cutils.c"
 #include "../path.c"
+#include "../trace.c"
+#ifdef CONFIG_SIMPLE_TRACE
+#include "../simpletrace.c"
+#endif
+
 #include <stdarg.h>
 #include <sys/stat.h>
 #include <fcntl.h>
 
+void qemu_log(const char *fmt, ...);
+
 /* Any log message kills the test. */
-void gemu_log(const char *fmt, ...)
+void qemu_log(const char *fmt, ...)
 {
     va_list ap;