summaryrefslogtreecommitdiff
path: root/regress/lib/libc
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2004-06-21 21:56:20 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2004-06-21 21:56:20 +0000
commit30f90ab53e59467a382414347cbcc3d8cb1d68e3 (patch)
tree793d880c40daccd37508b361c76e0447c720f63d /regress/lib/libc
parentdc1b370dddd316bd02947a5716fd3a924d663a9f (diff)
make test successful even when /etc/services is changed
Diffstat (limited to 'regress/lib/libc')
-rw-r--r--regress/lib/libc/getaddrinfo/answer74
-rw-r--r--regress/lib/libc/getaddrinfo/gaitest.c4
2 files changed, 35 insertions, 43 deletions
diff --git a/regress/lib/libc/getaddrinfo/answer b/regress/lib/libc/getaddrinfo/answer
index 93b419d9752..0aac0deb69f 100644
--- a/regress/lib/libc/getaddrinfo/answer
+++ b/regress/lib/libc/getaddrinfo/answer
@@ -1,69 +1,65 @@
== basic ones
arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host ::1 serv http
-ai1: flags 0x2 family 24 socktype 1 protocol 6 addrlen 28 host ::1 serv www
+ai1: flags 0x2 family 24 socktype 1 protocol 6 addrlen 28 host ::1 serv 80
arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host 127.0.0.1 serv http
-ai1: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv www
+ai1: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv 80
arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host localhost serv http
-ai1: flags 0x2 family 24 socktype 1 protocol 6 addrlen 28 host ::1 serv www
-ai2: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv www
+ai1: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv 80
arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host ::1 serv tftp
ai1: flags 0x2 family 24 socktype 2 protocol 17 addrlen 28 host ::1 serv 69
arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host 127.0.0.1 serv tftp
ai1: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv 69
arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host localhost serv tftp
-ai1: flags 0x2 family 24 socktype 2 protocol 17 addrlen 28 host ::1 serv 69
-ai2: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv 69
+ai1: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv 69
arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host ::1 serv echo
-ai1: flags 0x2 family 24 socktype 2 protocol 17 addrlen 28 host ::1 serv echo
-ai2: flags 0x2 family 24 socktype 1 protocol 6 addrlen 28 host ::1 serv echo
+ai1: flags 0x2 family 24 socktype 2 protocol 17 addrlen 28 host ::1 serv 7
+ai2: flags 0x2 family 24 socktype 1 protocol 6 addrlen 28 host ::1 serv 7
arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host 127.0.0.1 serv echo
-ai1: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv echo
-ai2: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv echo
+ai1: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv 7
+ai2: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv 7
arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host localhost serv echo
-ai1: flags 0x2 family 24 socktype 2 protocol 17 addrlen 28 host ::1 serv echo
-ai2: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv echo
-ai3: flags 0x2 family 24 socktype 1 protocol 6 addrlen 28 host ::1 serv echo
-ai4: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv echo
+ai1: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv 7
+ai2: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv 7
== specific address family
arg: flags 0x2 family 2 socktype 0 protocol 0 addrlen 0 host localhost serv http
-ai1: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv www
+ai1: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv 80
arg: flags 0x2 family 24 socktype 0 protocol 0 addrlen 0 host localhost serv http
-ai1: flags 0x2 family 24 socktype 1 protocol 6 addrlen 28 host ::1 serv www
+ai1: flags 0x2 family 24 socktype 1 protocol 6 addrlen 28 host ::1 serv 80
== empty hostname
arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host (empty) serv http
-ai1: flags 0x2 family 24 socktype 1 protocol 6 addrlen 28 host ::1 serv www
-ai2: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv www
+ai1: flags 0x2 family 24 socktype 1 protocol 6 addrlen 28 host ::1 serv 80
+ai2: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv 80
arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host (empty) serv echo
-ai1: flags 0x2 family 24 socktype 2 protocol 17 addrlen 28 host ::1 serv echo
-ai2: flags 0x2 family 24 socktype 1 protocol 6 addrlen 28 host ::1 serv echo
-ai3: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv echo
-ai4: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv echo
+ai1: flags 0x2 family 24 socktype 2 protocol 17 addrlen 28 host ::1 serv 7
+ai2: flags 0x2 family 24 socktype 1 protocol 6 addrlen 28 host ::1 serv 7
+ai3: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv 7
+ai4: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv 7
arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host (empty) serv tftp
ai1: flags 0x2 family 24 socktype 2 protocol 17 addrlen 28 host ::1 serv 69
ai2: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv 69
arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host (empty) serv 80
service not supported for ai_socktype
arg: flags 0x3 family 0 socktype 0 protocol 0 addrlen 0 host (empty) serv http
-ai1: flags 0x3 family 24 socktype 1 protocol 6 addrlen 28 host :: serv www
-ai2: flags 0x3 family 2 socktype 1 protocol 6 addrlen 16 host 0.0.0.0 serv www
+ai1: flags 0x3 family 24 socktype 1 protocol 6 addrlen 28 host :: serv 80
+ai2: flags 0x3 family 2 socktype 1 protocol 6 addrlen 16 host 0.0.0.0 serv 80
arg: flags 0x3 family 0 socktype 0 protocol 0 addrlen 0 host (empty) serv echo
-ai1: flags 0x3 family 24 socktype 2 protocol 17 addrlen 28 host :: serv echo
-ai2: flags 0x3 family 24 socktype 1 protocol 6 addrlen 28 host :: serv echo
-ai3: flags 0x3 family 2 socktype 2 protocol 17 addrlen 16 host 0.0.0.0 serv echo
-ai4: flags 0x3 family 2 socktype 1 protocol 6 addrlen 16 host 0.0.0.0 serv echo
+ai1: flags 0x3 family 24 socktype 2 protocol 17 addrlen 28 host :: serv 7
+ai2: flags 0x3 family 24 socktype 1 protocol 6 addrlen 28 host :: serv 7
+ai3: flags 0x3 family 2 socktype 2 protocol 17 addrlen 16 host 0.0.0.0 serv 7
+ai4: flags 0x3 family 2 socktype 1 protocol 6 addrlen 16 host 0.0.0.0 serv 7
arg: flags 0x3 family 0 socktype 0 protocol 0 addrlen 0 host (empty) serv tftp
ai1: flags 0x3 family 24 socktype 2 protocol 17 addrlen 28 host :: serv 69
ai2: flags 0x3 family 2 socktype 2 protocol 17 addrlen 16 host 0.0.0.0 serv 69
arg: flags 0x3 family 0 socktype 0 protocol 0 addrlen 0 host (empty) serv 80
service not supported for ai_socktype
arg: flags 0x2 family 0 socktype 1 protocol 0 addrlen 0 host (empty) serv 80
-ai1: flags 0x2 family 24 socktype 1 protocol 6 addrlen 28 host ::1 serv www
-ai2: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv www
+ai1: flags 0x2 family 24 socktype 1 protocol 6 addrlen 28 host ::1 serv 80
+ai2: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv 80
arg: flags 0x2 family 0 socktype 2 protocol 0 addrlen 0 host (empty) serv 80
-ai1: flags 0x2 family 24 socktype 2 protocol 17 addrlen 28 host ::1 serv www
-ai2: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv www
+ai1: flags 0x2 family 24 socktype 2 protocol 17 addrlen 28 host ::1 serv 80
+ai2: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv 80
== empty servname
arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host ::1 serv (empty)
@@ -73,20 +69,16 @@ arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host 127.0.0.1 serv (emp
ai1: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv 0
ai2: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv 0
arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host localhost serv (empty)
-ai1: flags 0x2 family 24 socktype 2 protocol 17 addrlen 28 host ::1 serv 0
-ai2: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv 0
-ai3: flags 0x2 family 24 socktype 1 protocol 6 addrlen 28 host ::1 serv 0
-ai4: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv 0
+ai1: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv 0
+ai2: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv 0
arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host (empty) serv (empty)
name or service is not known
== sock_raw
arg: flags 0x2 family 0 socktype 3 protocol 0 addrlen 0 host localhost serv (empty)
-ai1: flags 0x2 family 24 socktype 3 protocol 0 addrlen 28 host ::1 serv 0
-ai2: flags 0x2 family 2 socktype 3 protocol 0 addrlen 16 host 127.0.0.1 serv 0
+ai1: flags 0x2 family 2 socktype 3 protocol 0 addrlen 16 host 127.0.0.1 serv 0
arg: flags 0x2 family 0 socktype 3 protocol 59 addrlen 0 host localhost serv (empty)
-ai1: flags 0x2 family 24 socktype 3 protocol 59 addrlen 28 host ::1 serv 0
-ai2: flags 0x2 family 2 socktype 3 protocol 59 addrlen 16 host 127.0.0.1 serv 0
+ai1: flags 0x2 family 2 socktype 3 protocol 59 addrlen 16 host 127.0.0.1 serv 0
arg: flags 0x2 family 0 socktype 3 protocol 59 addrlen 0 host localhost serv 80
service not supported for ai_socktype
arg: flags 0x2 family 0 socktype 3 protocol 59 addrlen 0 host localhost serv www
@@ -100,5 +92,5 @@ ai_family not supported
== the following items are specified in jinmei scopeaddr format doc.
arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host fe80::1%lo0 serv http
-ai1: flags 0x2 family 24 socktype 1 protocol 6 addrlen 28 host fe80::1%lo0 serv www
+ai1: flags 0x2 family 24 socktype 1 protocol 6 addrlen 28 host fe80::1%lo0 serv 80
diff --git a/regress/lib/libc/getaddrinfo/gaitest.c b/regress/lib/libc/getaddrinfo/gaitest.c
index 47d0a0a316b..059c1aaa1ae 100644
--- a/regress/lib/libc/getaddrinfo/gaitest.c
+++ b/regress/lib/libc/getaddrinfo/gaitest.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gaitest.c,v 1.4 2004/02/28 12:20:23 itojun Exp $ */
+/* $OpenBSD: gaitest.c,v 1.5 2004/06/21 21:56:19 itojun Exp $ */
/* $NetBSD: gaitest.c,v 1.3 2002/07/05 15:47:43 itojun Exp $ */
/*
@@ -65,7 +65,7 @@ print1(title, res, h, s)
{
char *start, *end;
int error;
- const int niflag = NI_NUMERICHOST;
+ const int niflag = NI_NUMERICHOST | NI_NUMERICSERV;
if (res->ai_addr) {
error = getnameinfo(res->ai_addr, res->ai_addr->sa_len,