Closed jgarte closed 4 weeks ago
This isn't an issue with Waitress. The issue here is with the platform you're running the tests in. It appears to lack an /etc/protocols
file. Have a read of the documentation on getaddrinfo
: part of its job is to resolve protocol/service names (such as 'http') to numeric port numbers. It can't do that without /etc/protocols
, hence the "Servname not supported for ai_socktype" error.
You look to be running the tests on a highly unusual distro, possibly one meant for containers or with some kind of isolation mechanisms built into how it does packaging. I'm basing that off of the unusual paths that appear in the error.
Either way, you need to fix your system to ensure /etc/protocols
exists.
I did a little more digging and it looks like you're using Guix. IIRC, that has some built-in isolation that you're almost certainly tripping up on. I think you need to ask for help on a Guix-related forum.
Hi,
Yes, I was using Guix
Should waitress provide a test for test_service_port
that is more agnostic so that the said test can pass without needing to require /etc/protocols
?
I see also that nixpkgs has tests disabled for their waitress package. I imagine probably because of this very issue? Nix uses that same approach as Guix to package management with regards to using foo/store/75v854mmrclhy205z7q15ww0ipdirwfq-waitress-3.0.0
paths.
That issue is more one for the packager to solve. I don't know enough about Nix or Guix to say how the issue would be solved with either of them. Nix at least looks to provide some support for overlayfs, so if you want to get the tests working, that might be an approach to take.
Sorry, but I am not going to cater towards systems where defaults are simply missing. There are also various tests for testing by port only.
I don't want to add a bunch of code to try and figure out if /etc/protocols
(or other system equivalents) exists to make getaddrinfo
work as expected, before running a test.
Your test environment is broken. Please fix it.
Hi,
I get the following test failure:
I also noticed this:
WDYT?