1 # #-- doh_downstream.test --#
2 # source the master var file when it's there
3 [ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
4 # use .tpkg.var.test for in test variable passing
5 [ -f .tpkg.var.test ] && source .tpkg.var.test
9 if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
11 (cd $PRE; $MAKE dohclient)
14 echo "> query www.example.net. endpoint /dns-query"
15 $PRE/dohclient -s 127.0.0.1 -p $UNBOUND_PORT 1.example.net. A IN 2.example.net. A IN 3.example.net. A IN 4.example.net. A IN 5.example.net. A IN 6.example.net. A IN 7.example.net. A IN 8.example.net. A IN 9.example.net. A IN 10.example.net. A IN >outfile 2>&1
17 if test "$?" -ne 0; then
18 echo "exit status not OK"
25 num=$(grep "ANSWER SEC" outfile | wc -l)
26 # 58 byte answers, 500 byte max response buffer -> 8 answers
27 if [ $num -eq 8 ]; then
30 echo "result contents not OK"
34 echo "result contents not OK"