first stb at unimplemnted detection fixing Windows code Daniel
* runsuite.c: first stb at unimplemnted detection
* runtest.c: fixing Windows code
Daniel
diff --git a/ChangeLog b/ChangeLog
index 858ff14..13f7138 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Jul 4 17:44:26 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * runsuite.c: first stb at unimplemnted detection
+ * runtest.c: fixing Windows code
+
Mon Jul 4 17:19:31 CEST 2005 Daniel Veillard <daniel@veillard.com>
* runsuite.c: fix on schemas error
diff --git a/runsuite.c b/runsuite.c
index c7dab7a..deef129 100644
--- a/runsuite.c
+++ b/runsuite.c
@@ -71,6 +71,7 @@
static int nb_errors = 0;
static int nb_internals = 0;
static int nb_schematas = 0;
+static int nb_unimplemented = 0;
static int nb_leaks = 0;
static long libxmlMemoryAllocatedBase = 0;
static int extraMemoryFromResolver = 0;
@@ -908,6 +909,14 @@
if (schemas == NULL) {
test_log("valid schemas %s failed to parse\n",
path);
+ ret = 1;
+ nb_errors++;
+ }
+ if ((ret == 0) && (strstr(testErrors, "nimplemented") != NULL)) {
+ test_log("valid schemas %s hit an unimplemented block\n",
+ path);
+ ret = 1;
+ nb_unimplemented++;
nb_errors++;
}
instance = getNext(cur, "./ts:instanceTest[1]");
@@ -929,6 +938,14 @@
test_log("Failed to detect error in schemas %s\n",
path);
nb_errors++;
+ ret = 1;
+ }
+ if ((ret == 0) && (strstr(testErrors, "nimplemented") != NULL)) {
+ nb_unimplemented++;
+ test_log("invalid schemas %s hit an unimplemented block\n",
+ path);
+ ret = 1;
+ nb_errors++;
}
} else {
test_log("testGroup line %ld misses unexpected validity value%s\n",
diff --git a/runtest.c b/runtest.c
index 5bacf51..faf500a 100644
--- a/runtest.c
+++ b/runtest.c
@@ -89,7 +89,7 @@
#if defined(_WIN32) && !defined(__CYGWIN__)
-/* #include <windows.h> */
+#include <windows.h>
typedef struct
{
@@ -109,9 +109,7 @@
if ((pattern == NULL) || (pglob == NULL)) return(-1);
- ret = malloc(sizeof(glob_t));
- if (ret == NULL)
- return(-1);
+ ret = &pglob;
memset(ret, 0, sizeof(glob_t));
hFind = FindFirstFileA(pattern, &FindFileData);
@@ -121,7 +119,6 @@
ret->gl_pathv = (char **) malloc(nb_paths * sizeof(char *));
if (ret->gl_pathv == NULL) {
FindClose(hFind);
- free(ret);
return(-1);
}
ret->gl_pathv[ret->gl_pathc] = strdup(FindFileData.cFileName);
@@ -145,11 +142,13 @@
done:
FindClose(hFind);
- *pglob = ret;
return(0);
}
-void globfree(glob_t *pglob) {
- int i;
+
+
+
+static void globfree(glob_t *pglob) {
+ unsigned int i;
if (pglob == NULL)
return;
@@ -160,6 +159,7 @@
free(pglob);
}
#define vsnprintf _vsnprintf
+#define snprintf _snprintf
#else
#include <glob.h>
#endif
@@ -3737,12 +3737,14 @@
#include <windows.h>
#include <string.h>
+#define TEST_REPEAT_COUNT 500
+
static HANDLE tid[MAX_ARGC];
static DWORD WINAPI
win32_thread_specific_data(void *private_data)
{
- return((DWORD) thread_specific_data());
+ return((DWORD) thread_specific_data(private_data));
}
static int