Thanks!

Logged as #18012
https://trac.torproject.org/projects/tor/ticket/18012

Tim

On 6 Jan 2016, at 01:45, Gisle Vanem <gvanem@yahoo.no> wrote:

The src/test/test_util.c have this statement:

#ifdef _WIN32
#define UTIL_TEST_NO_WIN(n, f) { #n, NULL, TT_SKIP, NULL, NULL }
#define UTIL_TEST_WIN_ONLY(n, f) UTIL_TEST(n, (f))
#define UTIL_LEGACY_NO_WIN(n) UTIL_NO_WIN(n)

But I fail to see where 'UTIL_NO_WIN(n)' is defined. Should not the
above read:

--- a/test/test_util.c 2016-01-05 13:19:07
+++ b/test/test_util.c 2016-01-05 14:36:52
@@ -4676,7 +4676,7 @@
#ifdef _WIN32
#define UTIL_TEST_NO_WIN(n, f) { #n, NULL, TT_SKIP, NULL, NULL }
#define UTIL_TEST_WIN_ONLY(n, f) UTIL_TEST(n, (f))
-#define UTIL_LEGACY_NO_WIN(n) UTIL_NO_WIN(n)
+#define UTIL_LEGACY_NO_WIN(n)   { #n, NULL, TT_SKIP, NULL, NULL }
#else
#define UTIL_TEST_NO_WIN(n, f) UTIL_TEST(n, (f))

With this, my test.exe runs fine. Although 36 SKIPPED tests.

Another thing regarding MSVC. In test/test_checkdir.c,
<dirent.h> is included for _WIN32. MSVC does not have this header.
Hence I think this patch is needed:

--- a/test/test_checkdir.c 2015-08-31 13:24:33
+++ b/test/test_checkdir.c 2015-08-31 14:50:53
@@ -4,9 +4,7 @@
#include "orconfig.h"
#include "or.h"

-#ifdef _WIN32
-#include <direct.h>
-#else
+#ifndef _MSC_VER
#include <dirent.h>
#endif

Since <direct.h> is already included in "or.h", it's not needed here
too.

--
--gv
_______________________________________________
tor-dev mailing list
tor-dev@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev

Tim Wilson-Brown (teor)

teor2345 at gmail dot com
PGP 968F094B

teor at blah dot im
OTR CAD08081 9755866D 89E2A06F E3558B7F B5A9D14F