Ignore machine-check MSRs
[freebsd-src/fkvm-freebsd.git] / tools / regression / lib / libc / nss / test-gethostby.t
blob42bed00008318a47dbc8b7d578d1fbdcc639f51f
1 #!/bin/sh
2 # $FreeBSD$
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"
15 cd `dirname $0`
17 executable=`basename $0 .t`
19 make $executable 2>&1 > /dev/null
21 echo 1..46
22 #Tests for gethostby***() functions
23 #IPv4-driven testing
24 do_test 1 'gethostbyname2() (IPv4)' '-4 -n -f mach'
25 do_test 2 'gethostbyaddr() (IPv4)' '-4 -a -f mach'
26 do_test 3 'gethostbyname2()-getaddrinfo() (IPv4)' '-4 -2 -f mach'
27 do_test 4 'gethostbyaddr()-getnameinfo() (IPv4)' '-4 -i -f mach'
28 do_test 5 'gethostbyname2() snapshot (IPv4)'\
29 '-4 -n -s snapshot_htname4 -f mach'
30 do_test 6 'gethostbyaddr() snapshot (IPv4)'\
31 '-4 -a -s snapshot_htaddr4 -f mach'
33 #IPv6-driven testing
34 do_test 7 'gethostbyname2() (IPv6)' '-6 -n -f mach'
35 do_test 8 'gethostbyaddr() (IPv6)' '-6 -a -f mach'
36 do_test 9 'gethostbyname2()-getaddrinfo() (IPv6)' '-6 -2 -f mach'
37 do_test 10 'gethostbyaddr()-getnameinfo() (IPv6)' '-6 -i -f mach'
38 do_test 11 'gethostbyname2() snapshot (IPv6)'\
39 '-6 -n -s snapshot_htname6 -f mach'
40 do_test 12 'gethostbyaddr() snapshot (IPv6)'\
41 '-6 -a -s snapshot_htaddr6 -f mach'
43 #Mapped IPv6-driven testing (getaddrinfo() equality test is useless here)
44 do_test 13 'gethostbyname2() (IPv6 mapped)' '-m -n -f mach'
45 do_test 14 'gethostbyaddr() (IPv6 mapped)' '-m -a -f mach'
46 do_test 15 'gethostbyname2() snapshot (IPv6 mapped)'\
47 '-m -n -s snapshot_htname6map -f mach'
48 do_test 16 'gethostbyaddr() snapshot (IPv6 mapped)'\
49 '-m -a -s snapshot_htaddr6map -f mach'
51 #Tests for getipnodeby***() functions
52 #IPv4-driven testing, flags are 0
53 do_test 17 'getipnodebyname() (IPv4)' '-o -4 -n -f mach'
54 do_test 18 'getipnodebyaddr() (IPv4)' '-o -4 -a -f mach'
55 do_test 19 'getipnodebyname()-getaddrinfo() (IPv4)' '-o -4 -2 -f mach'
56 do_test 20 'getipnodebyaddr()-getnameinfo() (IPv4)' '-o -4 -i -f mach'
57 do_test 21 'getipnodebyname() snapshot (IPv4)'\
58 '-o -4 -n -s snapshot_ipnodename4 -f mach'
59 do_test 22 'getipnodebyname() snapshot (IPv4)'\
60 '-o -4 -a -s snapshot_ipnodeaddr4 -f mach'
62 #IPv6-driven testing, flags are 0
63 do_test 23 'getipnodebyname() (IPv6)' '-o -6 -n -f mach'
64 do_test 24 'getipnodebyaddr() (IPv6)' '-o -6 -a -f mach'
65 do_test 25 'getipnodebyname()-getaddrinfo() (IPv6)' '-o -6 -2 -f mach'
66 do_test 26 'getipnodebyaddr()-getnameinfo() (IPv6)' '-o -6 -i -f mach'
67 do_test 27 'getipnodebyname() snapshot (IPv6)'\
68 '-o -6 -n -s snapshot_ipnodename6 -f mach'
69 do_test 28 'getipnodebyaddr() snapshot (IPv6)'\
70 '-o -6 -a -s snapshot_ipnodeaddr6 -f mach'
72 #Mapped IPv6-driven testing, flags are AI_V4MAPPED
73 do_test 29 'getipnodebyname() (IPv6, AI_V4MAPPED)' '-o -m -n -f mach'
74 do_test 30 'getipnodebyaddr() (IPv6, AI_V4MAPPED)' '-o -m -a -f mach'
75 do_test 31 'getipnodebyname() snapshot (IPv6, AI_V4MAPPED)'\
76 '-o -m -n -s snapshot_ipnodename6_AI_V4MAPPED -f mach'
77 do_test 32 'getipnodebyaddr() snapshot (IPv6, AI_V4MAPPED)'\
78 '-o -m -a -s snapshot_ipnodeaddr6_AI_V4MAPPED -f mach'
80 #Mapped IPv6-driven testing, flags are AI_V4MAPPED_CFG
81 do_test 33 'getipnodebyname() (IPv6, AI_V4MAPPED_CFG)' '-o -M -n -f mach'
82 do_test 34 'getipnodebyaddr() (IPv6, AI_V4MAPPED_CFG)' '-o -M -a -f mach'
83 do_test 35 'getipnodebyname() snapshot (IPv6, AI_V4MAPPED_CFG)'\
84 '-o -M -n -s snapshot_ipnodename6_AI_V4MAPPED_CFG -f mach'
85 do_test 36 'getipnodebyaddr() snapshot (IPv6, AI_V4MAPPED_CFG)'\
86 '-o -M -a -s snapshot_ipnodeaddr6_AI_V4MAPPED_CFG -f mach'
88 #Mapped IPv6-driven testing, flags are AI_V4MAPPED_CFG | AI_ALL
89 do_test 37 'getipnodebyname() (IPv6, AI_V4MAPPED_CFG | AI_ALL)'\
90 '-o -MA -n -f mach'
91 do_test 38 'getipnodebyaddr() (IPv6, AI_V4MAPPED_CFG | AI_ALL)'\
92 '-o -MA -a -f mach'
93 do_test 39 'getipnodebyname() snapshot (IPv6, AI_V4MAPPED_CFG | AI_ALL)'\
94 '-o -MA -n -s snapshot_ipnodename6_AI_V4MAPPED_CFG_AI_ALL -f mach'
95 do_test 40 'getipnodebyaddr() snapshot (IPv6, AI_V4MAPPED_CFG | AI_ALL)'\
96 '-o -MA -a -s snapshot_ipnodeaddr6_AI_V4MAPPED_CFG_AI_ALL -f mach'
98 #Mapped IPv6-driven testing, flags are AI_V4MAPPED_CFG | AI_ADDRCONFIG
99 do_test 41 'getipnodebyname() (IPv6, AI_V4MAPPED_CFG | AI_ADDRCONFIG)'\
100 '-o -Mc -n -f mach'
101 do_test 42 'getipnodebyname() snapshot (IPv6, AI_V4MAPPED_CFG | AI_ADDRCONFIG)'\
102 '-o -Mc -n -s snapshot_ipnodename6_AI_V4MAPPED_CFG_AI_ADDRCONFIG -f mach'
104 #IPv4-driven testing, flags are AI_ADDRCONFIG
105 do_test 43 'getipnodebyname() (IPv4, AI_ADDRCONFIG)' '-o -4c -n -f mach'
106 do_test 44 'getipnodebyname() snapshot (IPv4, AI_ADDRCONFIG)'\
107 '-o -4c -n -s snapshot_ipnodename4_AI_ADDRCONFIG -f mach'
109 #IPv6-driven testing, flags are AI_ADDRCONFIG
110 do_test 45 'getipnodebyname() (IPv6, AI_ADDRCONFIG)' '-o -6c -n -f mach'
111 do_test 46 'getipnodebyname() snapshot (IPv6, AI_ADDRCONFIG)'\
112 '-o -6c -n -s snapshot_ipnodename6_AI_ADDRCONFIG -f mach'