asio on Win32 - failing tests

I was just about trying out asio on Windows. I compiled as described, and tried to run the checks as: nmake -f Makefile.msc check and received: INFO: deadline_timer_test started INFO: deadline_timer_test ended with exit code 0 INFO: demuxer_test started INFO: demuxer_test ended with exit code 0 INFO: datagram_socket_test started INFO: datagram_socket_test ended with exit code 0 INFO: error_handler_test started INFO: error_handler_test ended with exit code 0 INFO: fixed_buffer_test started INFO: fixed_buffer_test ended with exit code 0 INFO: ipv4_host_resolver_test started FAIL: tests\unit\ipv4_host_resolver_test.cpp(88):test_if_hosts_equivalent(h1, h3) FAIL: tests\unit\ipv4_host_resolver_test.cpp(106):test_if_hosts_equivalent(h1, h7) INFO: ipv4_host_resolver_test ended with exit code 1 Is there anything I am missing? Or is this a known issue? Regards, Roland

Hi Roland, --- Roland Schwarz <roland.schwarz@chello.at> wrote:
I was just about trying out asio on Windows.
I compiled as described, and tried to run the checks as:
nmake -f Makefile.msc check
What version of windows are you running? Which version of MSVC? It works ok for me using MSVC 7.1 on Windows XP SP2. tests\unit\ipv4_host_resolver_test.cpp(88):test_if_hosts_equivalent(h1,
h3) FAIL:
tests\unit\ipv4_host_resolver_test.cpp(106):test_if_hosts_equivalent(h1,
h7) INFO: ipv4_host_resolver_test ended with exit code 1
Is there anything I am missing? Or is this a known issue?
It may be something I changed in adding the async host resolution. Also the test_if_hosts_equivalent function got rewritten and so it's possible I introduced a test bug. Would you be able to spare some time to debug what's going on in the test_if_hosts_equivalent function to see if it's anything obvious? Thanks. Cheers, Chris

Christopher Kohlhoff schrieb:
What version of windows are you running?
W2K
Which version of MSVC?
MSVC 7.1
Would you be able to spare some time to debug what's going on in the test_if_hosts_equivalent function to see if it's anything obvious?
Yes in principle. But I am just putting my first crack on it. I am trying to get started by means of the tutorials, but I am not sure if this currently is the best approach. I am following the path the tutorial is outlining as close as possible. E.g. Adding asio::timer t(d, asio::time::now() + 5); Results in .... asio_tutorial\main.cpp(7) : error C2039: 'timer' : is not a member of 'asio' So I am trying to find in the headers whetehr the class name has changed or what. BTW.: Wouldn't it be possible to autolink the ws2_32.lib ? If you know whats missing you can resolve this easily, but .... Regards, Roland

Hi Roland, --- Roland Schwarz <roland.schwarz@chello.at> wrote:
I am trying to get started by means of the tutorials, but I am not sure if this currently is the best approach. I am following the path the tutorial is outlining as close as possible.
E.g. Adding asio::timer t(d, asio::time::now() + 5); Results in .... asio_tutorial\main.cpp(7) : error C2039: 'timer' : is not a member of 'asio'
So I am trying to find in the headers whetehr the class name has changed or what.
It looks like you are following the tutorial from asio 0.3.2 (or earlier) but trying to compile against 0.3.3. There were changes to the timer stuff in 0.3.3 such that it is now called deadline_timer and uses the Boost.Date_Time classes. The line you added should now look like: asio::deadline_timer t(d, boost::posix_time::seconds(5));
BTW.: Wouldn't it be possible to autolink the ws2_32.lib ? If you know whats missing you can resolve this easily, but ....
Sounds like a good idea. I'll include a change to autolink it in 0.3.4. Cheers, Chris

On Sun, 4 Sep 2005 22:17:48 +1000 (EST), Christopher Kohlhoff wrote
Hi Roland,
--- Roland Schwarz <roland.schwarz@chello.at> wrote:
I am trying to get started by means of the tutorials, but I am not sure if this currently is the best approach. I am following the path the tutorial is outlining as close as possible.
E.g. Adding asio::timer t(d, asio::time::now() + 5); Results in
...snip...
There were changes to the timer stuff in 0.3.3 such that it is now called deadline_timer and uses the Boost.Date_Time classes. The line you added should now look like:
asio::deadline_timer t(d, boost::posix_time::seconds(5));
BTW.: Wouldn't it be possible to autolink the ws2_32.lib ? If you know whats missing you can resolve this easily, but ....
Sounds like a good idea. I'll include a change to autolink it in 0.3.4.
Don't now if this is what's tripping you up, but with 1.33 you shouldn't need the date-time library for anything except to_string and serialization functions. Bottom line is that for asio uses you shouldn't need to build the date-time library. Jeff

Hi Roland, --- Roland Schwarz <roland.schwarz@chello.at> wrote:
FAIL:
tests\unit\ipv4_host_resolver_test.cpp(88):test_if_hosts_equivalent(h1,
h3) FAIL:
tests\unit\ipv4_host_resolver_test.cpp(106):test_if_hosts_equivalent(h1,
h7) INFO: ipv4_host_resolver_test ended with exit code 1
Is there anything I am missing? Or is this a known issue?
I managed to reproduce this problem, and the test is wrong. Would I be right in assuming that your system has extra network interfaces (e.g. interfaces to support a VMware host) that are not known to the DNS server? The test_if_hosts_equivalent function does not correctly handle this case. Cheers, Chris

Christopher Kohlhoff schrieb:
I managed to reproduce this problem, and the test is wrong.
Would I be right in assuming that your system has extra network interfaces (e.g. interfaces to support a VMware host) that are not known to the DNS server?
Hmm. I do have two of them, one of which is known to DNS, the other not. Regards, Roland
participants (3)
-
Christopher Kohlhoff
-
Jeff Garland
-
Roland Schwarz