diff options
author | Florian Weimer <fweimer@redhat.com> | 2017-06-24 16:51:31 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2017-06-24 16:51:31 +0200 |
commit | 513a71a420e74270a6a9702ec916e807be51350a (patch) | |
tree | 533629db66c5b94620b2933797f4df86a91415a6 | |
parent | 5cf88a83f27b0cd2d5a83511930e40d716c939eb (diff) | |
download | glibc-513a71a420e74270a6a9702ec916e807be51350a.tar.gz glibc-513a71a420e74270a6a9702ec916e807be51350a.tar.xz glibc-513a71a420e74270a6a9702ec916e807be51350a.zip |
resolv/tst-resolv-basic: Add test cases for bug 21295
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | resolv/tst-resolv-basic.c | 16 |
2 files changed, 21 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog index eb9eb588a4..b716a2927d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2017-06-24 Florian Weimer <fweimer@redhat.com> + + [BZ #21295] + * resolv/tst-resolv-basic.c (do_test): Add new test cases. + 2017-06-24 Dmitry Bilunov <kmeaw@kmeaw.com> [BZ #21295] diff --git a/resolv/tst-resolv-basic.c b/resolv/tst-resolv-basic.c index 92f912beed..3dfa1657f5 100644 --- a/resolv/tst-resolv-basic.c +++ b/resolv/tst-resolv-basic.c @@ -398,6 +398,22 @@ do_test (void) check_ai ("t.nxdomain.example", "80", AF_INET6, "error: Name or service not known\n"); + /* Test for bug 21295. */ + check_ai_hints ("www.example", "80", + (struct addrinfo) { .ai_family = AF_INET6, + .ai_socktype = SOCK_STREAM, + .ai_flags = AI_V4MAPPED | AI_ALL, }, + "flags: AI_V4MAPPED AI_ALL\n" + "address: STREAM/TCP 2001:db8::1 80\n" + "address: STREAM/TCP ::ffff:192.0.2.17 80\n"); + check_ai_hints ("t.www.example", "80", + (struct addrinfo) { .ai_family = AF_INET6, + .ai_socktype = SOCK_STREAM, + .ai_flags = AI_V4MAPPED | AI_ALL, }, + "flags: AI_V4MAPPED AI_ALL\n" + "address: STREAM/TCP 2001:db8::3 80\n" + "address: STREAM/TCP ::ffff:192.0.2.19 80\n"); + resolv_test_end (aux); return 0; |