[BACK]Return to tests.sh CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / external / mpl / bind / dist / bin / tests / system / digdelv

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/external/mpl/bind/dist/bin/tests/system/digdelv/tests.sh between version 1.1.1.8 and 1.1.1.9

version 1.1.1.8, 2020/08/03 17:07:05 version 1.1.1.9, 2021/02/19 16:37:05
Line 4 
Line 4 
 #  #
 # This Source Code Form is subject to the terms of the Mozilla Public  # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this  # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.  # file, you can obtain one at https://mozilla.org/MPL/2.0/.
 #  #
 # See the COPYRIGHT file distributed with this work for additional  # See the COPYRIGHT file distributed with this work for additional
 # information regarding copyright ownership.  # information regarding copyright ownership.
Line 944  if [ -x "$DIG" ] ; then
Line 944  if [ -x "$DIG" ] ; then
   if [ $ret -ne 0 ]; then echo_i "failed"; fi    if [ $ret -ne 0 ]; then echo_i "failed"; fi
   status=$((status+ret))    status=$((status+ret))
   
     n=$((n+1))
     echo_i "check that dig +bufsize=0 disables EDNS ($n)"
     ret=0
     dig_with_opts @10.53.0.3 a.example +bufsize=0 +qr > dig.out.test$n 2>&1 || ret=1
     grep "EDNS:" dig.out.test$n > /dev/null && ret=1
     if [ $ret -ne 0 ]; then echo_i "failed"; fi
     status=$((status+ret))
   
     n=$((n+1))
     echo_i "check that dig +bufsize=0 +edns sends EDNS with bufsize of 0 ($n)"
     ret=0
     dig_with_opts @10.53.0.3 a.example +bufsize=0 +edns +qr > dig.out.test$n 2>&1 || ret=1
     grep -E 'EDNS:.* udp: 0\r{0,1}$' dig.out.test$n > /dev/null|| ret=1
     if [ $ret -ne 0 ]; then echo_i "failed"; fi
     status=$((status+ret))
   
     n=$((n+1))
     echo_i "check that dig +bufsize restores default bufsize ($n)"
     ret=0
     dig_with_opts @10.53.0.3 a.example +bufsize=0 +bufsize +qr > dig.out.test$n 2>&1 || ret=1
     lines1232=`grep "EDNS:.* udp: 1232" dig.out.test$n | wc -l`
     lines4096=`grep "EDNS:.* udp: 4096" dig.out.test$n | wc -l`
     test $lines1232 -eq 1 || ret=1
     test $lines4096 -eq 1 || ret=1
     if [ $ret -ne 0 ]; then echo_i "failed"; fi
     status=$((status+ret))
   
     n=$((n+1))
     echo_i "check that dig without -u displays 'Query time' in millseconds ($n)"
     ret=0
     dig_with_opts @10.53.0.3 a.example > dig.out.test$n 2>&1 || ret=1
     grep ';; Query time: [0-9][0-9]* msec' dig.out.test$n >/dev/null || ret=1
     if [ $ret -ne 0 ]; then echo_i "failed"; fi
     status=$((status+ret))
   
     n=$((n+1))
     echo_i "check that dig -u displays 'Query time' in microseconds ($n)"
     ret=0
     dig_with_opts -u @10.53.0.3 a.example > dig.out.test$n 2>&1 || ret=1
     grep ';; Query time: [0-9][0-9]* usec' dig.out.test$n >/dev/null || ret=1
     if [ $ret -ne 0 ]; then echo_i "failed"; fi
     status=$((status+ret))
   
     n=$((n+1))
     echo_i "check that dig +yaml without -u displays timestamps in milliseconds ($n)"
     ret=0
     dig_with_opts +yaml @10.53.0.3 a.example > dig.out.test$n 2>&1 || ret=1
     grep 'query_time: !!timestamp ....-..-..T..:..:..\....Z' dig.out.test$n >/dev/null || ret=1
     grep 'response_time: !!timestamp ....-..-..T..:..:..\....Z' dig.out.test$n >/dev/null || ret=1
     if [ $ret -ne 0 ]; then echo_i "failed"; fi
     status=$((status+ret))
   
     n=$((n+1))
     echo_i "check that dig -u +yaml displays timestamps in microseconds ($n)"
     ret=0
     dig_with_opts -u +yaml @10.53.0.3 a.example > dig.out.test$n 2>&1 || ret=1
     grep 'query_time: !!timestamp ....-..-..T..:..:..\.......Z' dig.out.test$n >/dev/null || ret=1
     grep 'response_time: !!timestamp ....-..-..T..:..:..\.......Z' dig.out.test$n >/dev/null || ret=1
     if [ $ret -ne 0 ]; then echo_i "failed"; fi
     status=$((status+ret))
   
 else  else
   echo_i "$DIG is needed, so skipping these dig tests"    echo_i "$DIG is needed, so skipping these dig tests"
 fi  fi

Legend:
Removed from v.1.1.1.8  
changed lines
  Added in v.1.1.1.9

CVSweb <webmaster@jp.NetBSD.org>