maikel / senders-io

An adaption of Senders/Receivers for async networking and I/O
Apache License 2.0
14 stars 2 forks source link

test_resolve.cpp fails #52

Open mfbalin opened 1 year ago

mfbalin commented 1 year ago

I have compiled inside a docker container with G++11. After running the tests, all but a single fail is observed. The test output below:

root@a100cse:/localscratch/senders-io/build/tests# ./test_sio 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test_sio is a Catch v2.13.6 host application.
Run with -? for options

-------------------------------------------------------------------------------
async::resolve - Resolve ipv4 localhost
-------------------------------------------------------------------------------
/localscratch/senders-io/tests/net/test_resolve.cpp:22
...............................................................................

/localscratch/senders-io/tests/net/test_resolve.cpp:22: FAILED:
due to unexpected exception with message:
  Servname not supported for ai_socktype

===============================================================================
test cases:  87 |  86 passed | 1 failed
assertions: 306 | 305 passed | 1 failed
maikel commented 1 year ago

Interesting. I will look into that.

maikel commented 1 year ago

It might be due to a minimal /etc/services file. Can you post its content here, please? It might be better to change the test from using service "http" to some numerical string such as "80" (or anything else). In fact it might show that an overload is needed without a specified service, since that is a optional for the underlying calls.

mfbalin commented 1 year ago

/etc/services was missing. apt install netbase fixed the issue. Thanks. I guess docker environments can be really different compared to bare metal Linux installations.

maikel commented 1 year ago

The test just assumed /etc/services to exists which might be bad. I will fix that.