Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests/stdlib/tgetprotobyname fails on NetBSD #15452

Closed
euantorano opened this issue Oct 1, 2020 · 1 comment · Fixed by #15453
Closed

tests/stdlib/tgetprotobyname fails on NetBSD #15452

euantorano opened this issue Oct 1, 2020 · 1 comment · Fixed by #15453

Comments

@euantorano
Copy link
Contributor

The test tests/stdlib/tgetprotobyname.nim fails on NetBSD with the following output:

Category: stdlib
Name: tests/stdlib/tgetprotobyname.nim C
Action: run
Result: reNimcCrash
-------- Expected -------

--------- Given  --------
$ /var/jenkins/workspace/Nim/bin/nim c -r --styleCheck:hint --panics:on --nimCache:nimcache/tests/stdlib/tgetprotobyname.nim_0d61f8370cad1d412f80b84d143e1257 tests/stdlib/tgetprotobyname.nim
Hint: used config file '/var/jenkins/workspace/Nim/config/nim.cfg' [Conf]
Hint: used config file '/var/jenkins/workspace/Nim/config/config.nims' [Conf]
Hint: used config file '/var/jenkins/workspace/Nim/tests/config.nims' [Conf]
...................
Hint: gcc -c  -w -fmax-errors=3   -I/var/jenkins/workspace/Nim/lib -I/usr/local/include -I/usr/pkg/include -I/var/jenkins/workspace/Nim/tests/stdlib -o /var/jenkins/workspace/Nim/nimcache/tests/stdlib/tgetprotobyname.nim_0d61f8370cad1d412f80b84d143e1257/stdlib_assertions.nim.c.o /var/jenkins/workspace/Nim/nimcache/tests/stdlib/tgetprotobyname.nim_0d61f8370cad1d412f80b84d143e1257/stdlib_assertions.nim.c [Exec]
Hint: gcc -c  -w -fmax-errors=3   -I/var/jenkins/workspace/Nim/lib -I/usr/local/include -I/usr/pkg/include -I/var/jenkins/workspace/Nim/tests/stdlib -o /var/jenkins/workspace/Nim/nimcache/tests/stdlib/tgetprotobyname.nim_0d61f8370cad1d412f80b84d143e1257/stdlib_system.nim.c.o /var/jenkins/workspace/Nim/nimcache/tests/stdlib/tgetprotobyname.nim_0d61f8370cad1d412f80b84d143e1257/stdlib_system.nim.c [Exec]
Hint: gcc -c  -w -fmax-errors=3   -I/var/jenkins/workspace/Nim/lib -I/usr/local/include -I/usr/pkg/include -I/var/jenkins/workspace/Nim/tests/stdlib -o /var/jenkins/workspace/Nim/nimcache/tests/stdlib/tgetprotobyname.nim_0d61f8370cad1d412f80b84d143e1257/stdlib_posix.nim.c.o /var/jenkins/workspace/Nim/nimcache/tests/stdlib/tgetprotobyname.nim_0d61f8370cad1d412f80b84d143e1257/stdlib_posix.nim.c [Exec]
Hint: gcc -c  -w -fmax-errors=3   -I/var/jenkins/workspace/Nim/lib -I/usr/local/include -I/usr/pkg/include -I/var/jenkins/workspace/Nim/tests/stdlib -o /var/jenkins/workspace/Nim/nimcache/tests/stdlib/tgetprotobyname.nim_0d61f8370cad1d412f80b84d143e1257/stdlib_times.nim.c.o /var/jenkins/workspace/Nim/nimcache/tests/stdlib/tgetprotobyname.nim_0d61f8370cad1d412f80b84d143e1257/stdlib_times.nim.c [Exec]
Hint: gcc -c  -w -fmax-errors=3   -I/var/jenkins/workspace/Nim/lib -I/usr/local/include -I/usr/pkg/include -I/var/jenkins/workspace/Nim/tests/stdlib -o /var/jenkins/workspace/Nim/nimcache/tests/stdlib/tgetprotobyname.nim_0d61f8370cad1d412f80b84d143e1257/stdlib_os.nim.c.o /var/jenkins/workspace/Nim/nimcache/tests/stdlib/tgetprotobyname.nim_0d61f8370cad1d412f80b84d143e1257/stdlib_os.nim.c [Exec]
Hint: gcc -c  -w -fmax-errors=3   -I/var/jenkins/workspace/Nim/lib -I/usr/local/include -I/usr/pkg/include -I/var/jenkins/workspace/Nim/tests/stdlib -o /var/jenkins/workspace/Nim/nimcache/tests/stdlib/tgetprotobyname.nim_0d61f8370cad1d412f80b84d143e1257/stdlib_nativesockets.nim.c.o /var/jenkins/workspace/Nim/nimcache/tests/stdlib/tgetprotobyname.nim_0d61f8370cad1d412f80b84d143e1257/stdlib_nativesockets.nim.c [Exec]
Hint: gcc -c  -w -fmax-errors=3   -I/var/jenkins/workspace/Nim/lib -I/usr/local/include -I/usr/pkg/include -I/var/jenkins/workspace/Nim/tests/stdlib -o /var/jenkins/workspace/Nim/nimcache/tests/stdlib/tgetprotobyname.nim_0d61f8370cad1d412f80b84d143e1257/@mtgetprotobyname.nim.c.o /var/jenkins/workspace/Nim/nimcache/tests/stdlib/tgetprotobyname.nim_0d61f8370cad1d412f80b84d143e1257/@mtgetprotobyname.nim.c [Exec]
Hint:  [Link]
Hint: 52489 lines; 2.445s; 75.777MiB peakmem; Debug build; proj: tgetprotobyname; out: tgetprotobyname [SuccessX]
Hint: /var/jenkins/workspace/Nim/tests/stdlib/tgetprotobyname  [Exec]
tgetprotobyname.nim(13)  tgetprotobyname
nativesockets.nim(212)   getProtoByName
Error: unhandled exception: protocol not found [OSError]
Error: execution of an external program failed: '/var/jenkins/workspace/Nim/tests/stdlib/tgetprotobyname '

-------------------------

I created a simple test in C to test this:

#include <stdio.h>
#include <netdb.h>

int main(int argc, char const *argv[])
{
	if (getprotobyname("ip") == NULL) {
		fprintf(stderr, "%s\n", "getprotobyname ip");
	}

	if (getprotobyname("ipv6") == NULL) {
		fprintf(stderr, "%s\n", "getprotobyname ipv6");
	}

	if (getprotobyname("tcp") == NULL) {
		fprintf(stderr, "%s\n", "getprotobyname tcp");
	}

	if (getprotobyname("udp") == NULL) {
		fprintf(stderr, "%s\n", "getprotobyname udp");
	}

	if (getprotobyname("icmp") == NULL) {
		fprintf(stderr, "%s\n", "getprotobyname icmp");
	}

	if (getprotobyname("ipv6-icmp") == NULL) {
		fprintf(stderr, "%s\n", "getprotobyname ipv6-icmp");
	}

	return 0;
}

This outputs the following:

getprotobyname ip

Looking in NetBSD's copy of /etc/protocols, ip is missing.

@Dankr4d
Copy link
Contributor

Dankr4d commented Aug 25, 2021

Looking in NetBSD's copy of /etc/protocols, ip is missing.

Same issue on Arch Linux.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants