[tor-dev] [Win32] test_util.c + test_checkdir.c

Tim Wilson-Brown - teor teor2345 at gmail.com
Thu Jan 7 03:23:28 UTC 2016


Thanks!

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

Tim

> On 6 Jan 2016, at 01:45, Gisle Vanem <gvanem at 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 at 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tor-dev/attachments/20160107/b5a9373c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.torproject.org/pipermail/tor-dev/attachments/20160107/b5a9373c/attachment.sig>


More information about the tor-dev mailing list