]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - tools/regression/lib/libc/nss/test-getaddr.t
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / tools / regression / lib / libc / nss / test-getaddr.t
1 #!/bin/sh
2 # $FreeBSD$
3
4 do_test() {
5         number=$1
6         comment=$2
7         opt=$3
8         if ./$executable $opt; then
9                 echo "ok $number - $comment"
10         else
11                 echo "not ok $number - $comment"
12         fi
13 }
14
15 cd `dirname $0`
16
17 executable=`basename $0 .t`
18
19 make $executable 2>&1 > /dev/null
20
21 echo 1..6
22 #Tests with hints.ai_family is set to PF_UNSPEC
23 do_test 1 'getaddrinfo() (PF_UNSPEC)' '-f mach'
24 do_test 2 'getaddrinfo() snapshot (PF_UNSPEC)' '-f mach -s snapshot_ai'
25
26 #Tests with hints.ai_family is set to PF_INET
27 do_test 3 'getaddrinfo() (PF_INET)' '-f mach'
28 do_test 4 'getaddrinfo() snapshot (PF_INET)' '-4 -f mach -s snapshot_ai4'
29
30 #Tests with hints.ai_family is set to PF_INET6
31 do_test 5 'getaddrinfo() (PF_INET6)' '-f mach'
32 do_test 6 'getaddrinfo() snapshot (PF_INET6)' '-6 -f mach -s snapshot_ai6'
33