⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tests.sh

📁 package of develop dns
💻 SH
📖 第 1 页 / 共 2 页
字号:
$DIG $DIGOPTS +noauth +cdflag example. soa @10.53.0.5 \	> dig.out.ns5.test$n || ret=1$PERL ../digcomp.pl dig.out.ns4.test$n dig.out.ns5.test$n || ret=1grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1# Note - this is looking for failure, hence the &&grep "flags:.*ad.*QUERY" dig.out.ns5.test$n > /dev/null && ret=1n=`expr $n + 1`if [ $ret != 0 ]; then echo "I:failed"; fistatus=`expr $status + $ret`echo "I:checking cd bit on a negative answer ($n)"ret=0$DIG $DIGOPTS q.example. soa @10.53.0.4 > dig.out.ns4.test$n || ret=1$DIG $DIGOPTS +cdflag q.example. soa @10.53.0.5 > dig.out.ns5.test$n || ret=1$PERL ../digcomp.pl dig.out.ns4.test$n dig.out.ns5.test$n || ret=1grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1# Note - this is looking for failure, hence the &&grep "flags:.*ad.*QUERY" dig.out.ns5.test$n > /dev/null && ret=1n=`expr $n + 1`if [ $ret != 0 ]; then echo "I:failed"; fistatus=`expr $status + $ret`echo "I:checking cd bit on a query that should fail ($n)"ret=0$DIG $DIGOPTS a.bogus.example. soa @10.53.0.4 \	> dig.out.ns4.test$n || ret=1$DIG $DIGOPTS +cdflag a.bogus.example. soa @10.53.0.5 \	> dig.out.ns5.test$n || ret=1$PERL ../digcomp.pl dig.out.ns4.test$n dig.out.ns5.test$n || ret=1grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1# Note - this is looking for failure, hence the &&grep "flags:.*ad.*QUERY" dig.out.ns5.test$n > /dev/null && ret=1n=`expr $n + 1`if [ $ret != 0 ]; then echo "I:failed"; fistatus=`expr $status + $ret`echo "I:checking cd bit on an insecurity proof ($n)"ret=0$DIG $DIGOPTS +noauth a.insecure.example. soa @10.53.0.4 \	> dig.out.ns4.test$n || ret=1$DIG $DIGOPTS +noauth +cdflag a.insecure.example. soa @10.53.0.5 \	> dig.out.ns5.test$n || ret=1$PERL ../digcomp.pl dig.out.ns4.test$n dig.out.ns5.test$n || ret=1grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1# Note - these are looking for failure, hence the &&grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null && ret=1grep "flags:.*ad.*QUERY" dig.out.ns5.test$n > /dev/null && ret=1n=`expr $n + 1`if [ $ret != 0 ]; then echo "I:failed"; fistatus=`expr $status + $ret`echo "I:checking cd bit on a negative insecurity proof ($n)"ret=0$DIG $DIGOPTS q.insecure.example. a @10.53.0.4 \	> dig.out.ns4.test$n || ret=1$DIG $DIGOPTS +cdflag q.insecure.example. a @10.53.0.5 \	> dig.out.ns5.test$n || ret=1$PERL ../digcomp.pl dig.out.ns4.test$n dig.out.ns5.test$n || ret=1grep "status: NXDOMAIN" dig.out.ns4.test$n > /dev/null || ret=1# Note - these are looking for failure, hence the &&grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null && ret=1grep "flags:.*ad.*QUERY" dig.out.ns5.test$n > /dev/null && ret=1n=`expr $n + 1`if [ $ret != 0 ]; then echo "I:failed"; fistatus=`expr $status + $ret`echo "I:checking that validation of an ANY query works ($n)"ret=0$DIG $DIGOPTS +noauth foo.example. any @10.53.0.2 > dig.out.ns2.test$n || ret=1$DIG $DIGOPTS +noauth foo.example. any @10.53.0.4 > dig.out.ns4.test$n || ret=1$PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns4.test$n || ret=1grep "NOERROR" dig.out.ns4.test$n > /dev/null || ret=1# 2 records in the zone, 1 NXT, 3 SIGsgrep "ANSWER: 6" dig.out.ns4.test$n > /dev/null || ret=1n=`expr $n + 1`if [ $ret != 0 ]; then echo "I:failed"; fistatus=`expr $status + $ret`echo "I:checking that validation of a query returning a CNAME works ($n)"ret=0$DIG $DIGOPTS +noauth cname1.example. txt @10.53.0.2 \	> dig.out.ns2.test$n || ret=1$DIG $DIGOPTS +noauth cname1.example. txt @10.53.0.4 \	> dig.out.ns4.test$n || ret=1$PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns4.test$n || ret=1grep "NOERROR" dig.out.ns4.test$n > /dev/null || ret=1# the CNAME & its sig, the TXT and its SIGgrep "ANSWER: 4" dig.out.ns4.test$n > /dev/null || ret=1n=`expr $n + 1`if [ $ret != 0 ]; then echo "I:failed"; fistatus=`expr $status + $ret`echo "I:checking that validation of a query returning a DNAME works ($n)"ret=0$DIG $DIGOPTS +noauth foo.dname1.example. txt @10.53.0.2 \	> dig.out.ns2.test$n || ret=1$DIG $DIGOPTS +noauth foo.dname1.example. txt @10.53.0.4 \	> dig.out.ns4.test$n || ret=1$PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns4.test$n || ret=1grep "NOERROR" dig.out.ns4.test$n > /dev/null || ret=1# The DNAME & its sig, the TXT and its SIG, and the synthesized CNAME.# It would be nice to test that the CNAME is being synthesized by the# recursive server and not cached, but I don't know how.grep "ANSWER: 5" dig.out.ns4.test$n > /dev/null || ret=1n=`expr $n + 1`if [ $ret != 0 ]; then echo "I:failed"; fistatus=`expr $status + $ret`echo "I:checking that validation of an ANY query returning a CNAME works ($n)"ret=0$DIG $DIGOPTS +noauth cname2.example. any @10.53.0.2 \	> dig.out.ns2.test$n || ret=1$DIG $DIGOPTS +noauth cname2.example. any @10.53.0.4 \	> dig.out.ns4.test$n || ret=1$PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns4.test$n || ret=1grep "NOERROR" dig.out.ns4.test$n > /dev/null || ret=1# The CNAME, NXT, and their SIGsgrep "ANSWER: 4" dig.out.ns4.test$n > /dev/null || ret=1n=`expr $n + 1`if [ $ret != 0 ]; then echo "I:failed"; fistatus=`expr $status + $ret`echo "I:checking that validation of an ANY query returning a DNAME works ($n)"ret=0$DIG $DIGOPTS +noauth foo.dname2.example. any @10.53.0.2 \	> dig.out.ns2.test$n || ret=1$DIG $DIGOPTS +noauth foo.dname2.example. any @10.53.0.4 \	> dig.out.ns4.test$n || ret=1$PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns4.test$n || ret=1grep "NOERROR" dig.out.ns4.test$n > /dev/null || ret=1n=`expr $n + 1`if [ $ret != 0 ]; then echo "I:failed"; fistatus=`expr $status + $ret`echo "I:checking that positive validation in a privately secure zone works ($n)"ret=0$DIG $DIGOPTS +noauth a.private.secure.example. a @10.53.0.2 \	> dig.out.ns2.test$n || ret=1$DIG $DIGOPTS +noauth a.private.secure.example. a @10.53.0.4 \	> dig.out.ns4.test$n || ret=1$PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns4.test$n || ret=1grep "NOERROR" dig.out.ns4.test$n > /dev/null || ret=1# Note - this is looking for failure, hence the &&grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null && ret=1n=`expr $n + 1`if [ $ret != 0 ]; then echo "I:failed"; fistatus=`expr $status + $ret`echo "I:checking that negative validation in a privately secure zone works ($n)"ret=0$DIG $DIGOPTS +noauth q.private.secure.example. a @10.53.0.2 \	> dig.out.ns2.test$n || ret=1$DIG $DIGOPTS +noauth q.private.secure.example. a @10.53.0.4 \	> dig.out.ns4.test$n || ret=1$PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns4.test$n || ret=1grep "NXDOMAIN" dig.out.ns4.test$n > /dev/null || ret=1# Note - this is looking for failure, hence the &&grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null && ret=1n=`expr $n + 1`if [ $ret != 0 ]; then echo "I:failed"; fistatus=`expr $status + $ret`echo "I:checking that lookups succeed after disabling a algorithm works ($n)"ret=0$DIG $DIGOPTS +noauth example. SOA @10.53.0.2 \	> dig.out.ns2.test$n || ret=1$DIG $DIGOPTS +noauth example. SOA @10.53.0.6 \	> dig.out.ns6.test$n || ret=1$PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns6.test$n || ret=1# Note - this is looking for failure, hence the &&grep "flags:.*ad.*QUERY" dig.out.ns6.test$n > /dev/null && ret=1n=`expr $n + 1`if [ $ret != 0 ]; then echo "I:failed"; fistatus=`expr $status + $ret`echo "I:checking privately secure to nxdomain works ($n)"ret=0$DIG $DIGOPTS +noauth private2secure-nxdomain.private.secure.example. SOA @10.53.0.2 \	> dig.out.ns2.test$n || ret=1$DIG $DIGOPTS +noauth private2secure-nxdomain.private.secure.example. SOA @10.53.0.4 \	> dig.out.ns4.test$n || ret=1$PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns4.test$n || ret=1# Note - this is looking for failure, hence the &&grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null && ret=1n=`expr $n + 1`if [ $ret != 0 ]; then echo "I:failed"; fistatus=`expr $status + $ret`echo "I:checking privately secure wilcard to nxdomain works ($n)"ret=0$DIG $DIGOPTS +noauth a.wild.private.secure.example. SOA @10.53.0.2 \	> dig.out.ns2.test$n || ret=1$DIG $DIGOPTS +noauth a.wild.private.secure.example. SOA @10.53.0.4 \	> dig.out.ns4.test$n || ret=1$PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns4.test$n || ret=1# Note - this is looking for failure, hence the &&grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null && ret=1n=`expr $n + 1`if [ $ret != 0 ]; then echo "I:failed"; fistatus=`expr $status + $ret`#echo "I:checking dnssec-lookaside-validation works ($n)"#ret=0#$DIG $DIGOPTS private.secure.example. SOA @10.53.0.6 \#	> dig.out.ns6.test$n || ret=1#grep "flags:.*ad.*QUERY" dig.out.ns6.test$n > /dev/null || ret=1#n=`expr $n + 1`#if [ $ret != 0 ]; then echo "I:failed"; fi#status=`expr $status + $ret`echo "I:checking that we can load a rfc2535 signed zone ($n)"ret=0$DIG $DIGOPTS rfc2535.example. SOA @10.53.0.2 \	> dig.out.ns2.test$n || ret=1grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1n=`expr $n + 1`if [ $ret != 0 ]; then echo "I:failed"; fistatus=`expr $status + $ret`echo "I:checking that we can transfer a rfc2535 signed zone ($n)"ret=0$DIG $DIGOPTS rfc2535.example. SOA @10.53.0.3 \	> dig.out.ns3.test$n || ret=1grep "status: NOERROR" dig.out.ns3.test$n > /dev/null || ret=1n=`expr $n + 1`if [ $ret != 0 ]; then echo "I:failed"; fistatus=`expr $status + $ret`# Run a minimal update test if possible.  This is really just# a regression test for RT #2399; more tests should be added.if $PERL -e 'use Net::DNS;' 2>/dev/nullthen    echo "I:running DNSSEC update test"    $PERL dnssec_update_test.pl -s 10.53.0.3 -p 5300 dynamic.example. || status=1else    echo "I:The DNSSEC update test requires the Net::DNS library." >&2fiecho "I:exit status: $status"exit $status

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -