Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
BIND
Commits
7a721f98
Commit
7a721f98
authored
Dec 17, 2018
by
Ondřej Surý
Browse files
Revert "Merge branch '782-cygwin-grep-CRLF-issue' into 'master'"
This reverts commit
4af9f971
, reversing changes made to
0289f3f2
.
parent
4af9f971
Pipeline
#8083
passed with stages
in 16 minutes and 42 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
bin/tests/system/builtin/tests.sh
View file @
7a721f98
...
...
@@ -178,28 +178,28 @@ n=`expr $n + 1`
ret
=
0
echo_i
"Checking that default version works for query (
$n
)"
$DIG
$DIGOPTS
+short version.bind txt ch @10.53.0.1
>
dig.out.ns1.
$n
tr
-d
'\r'
< dig.out.ns1.
$n
|
grep
"^
\"
$VERSION
\"
$"
>
/dev/null
||
ret
=
1
grep
"^
\"
$VERSION
\"
$"
dig.out.ns1.
$n
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo_i
"failed"
;
status
=
`
expr
$status
+
$ret
`
;
fi
n
=
`
expr
$n
+ 1
`
ret
=
0
echo_i
"Checking that custom version works for query (
$n
)"
$DIG
$DIGOPTS
+short version.bind txt ch @10.53.0.3
>
dig.out.ns3.
$n
tr
-d
'\r'
< dig.out.ns3.
$n
|
grep
"^
\"
this is a test of version
\"
$"
>
/dev/null
||
ret
=
1
grep
"^
\"
this is a test of version
\"
$"
dig.out.ns3.
$n
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo_i
"failed"
;
status
=
`
expr
$status
+
$ret
`
;
fi
n
=
`
expr
$n
+ 1
`
ret
=
0
echo_i
"Checking that default hostname works for query (
$n
)"
$DIG
$DIGOPTS
+short hostname.bind txt ch @10.53.0.1
>
dig.out.ns1.
$n
tr
-d
'\r'
< dig.out.ns1.
$n
|
grep
"^
\"
$HOSTNAME
\"
$"
>
/dev/null
||
ret
=
1
grep
"^
\"
$HOSTNAME
\"
$"
dig.out.ns1.
$n
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo_i
"failed"
;
status
=
`
expr
$status
+
$ret
`
;
fi
n
=
`
expr
$n
+ 1
`
ret
=
0
echo_i
"Checking that custom hostname works for query (
$n
)"
$DIG
$DIGOPTS
+short hostname.bind txt ch @10.53.0.3
>
dig.out.ns3.
$n
tr
-d
'\r'
< dig.out.ns3.
$n
|
grep
"^
\"
this.is.a.test.of.hostname
\"
$"
>
/dev/null
||
ret
=
1
grep
"^
\"
this.is.a.test.of.hostname
\"
$"
dig.out.ns3.
$n
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo_i
"failed"
;
status
=
`
expr
$status
+
$ret
`
;
fi
n
=
`
expr
$n
+ 1
`
...
...
@@ -214,28 +214,28 @@ n=`expr $n + 1`
ret
=
0
echo_i
"Checking that server-id hostname works for query (
$n
)"
$DIG
$DIGOPTS
+short id.server txt ch @10.53.0.2
>
dig.out.ns2.
$n
tr
-d
'\r'
< dig.out.ns2.
$n
|
grep
"^
\"
$HOSTNAME
\"
$"
>
/dev/null
||
ret
=
1
grep
"^
\"
$HOSTNAME
\"
$"
dig.out.ns2.
$n
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo_i
"failed"
;
status
=
`
expr
$status
+
$ret
`
;
fi
n
=
`
expr
$n
+ 1
`
ret
=
0
echo_i
"Checking that server-id hostname works for EDNS name server ID request (
$n
)"
$DIG
$DIGOPTS
+norec +nsid foo @10.53.0.2
>
dig.out.ns2.
$n
tr
-d
'\r'
< dig.out.ns2.
$n
|
grep
"^; NSID: .* (
\"
$HOSTNAME
\"
)$"
>
/dev/null
||
ret
=
1
grep
"^; NSID: .* (
\"
$HOSTNAME
\"
)$"
dig.out.ns2.
$n
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo_i
"failed"
;
status
=
`
expr
$status
+
$ret
`
;
fi
n
=
`
expr
$n
+ 1
`
ret
=
0
echo_i
"Checking that custom server-id works for query (
$n
)"
$DIG
$DIGOPTS
+short id.server txt ch @10.53.0.3
>
dig.out.ns3.
$n
tr
-d
'\r'
< dig.out.ns3.
$n
|
grep
"^
\"
this.is.a.test.of.server-id
\"
$"
>
/dev/null
||
ret
=
1
grep
"^
\"
this.is.a.test.of.server-id
\"
$"
dig.out.ns3.
$n
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo_i
"failed"
;
status
=
`
expr
$status
+
$ret
`
;
fi
n
=
`
expr
$n
+ 1
`
ret
=
0
echo_i
"Checking that custom server-id works for EDNS name server ID request (
$n
)"
$DIG
$DIGOPTS
+norec +nsid foo @10.53.0.3
>
dig.out.ns3.
$n
tr
-d
'\r'
< dig.out.ns3.
$n
|
grep
"^; NSID: .* (
\"
this.is.a.test.of.server-id
\"
)$"
>
/dev/null
||
ret
=
1
grep
"^; NSID: .* (
\"
this.is.a.test.of.server-id
\"
)$"
dig.out.ns3.
$n
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo_i
"failed"
;
status
=
`
expr
$status
+
$ret
`
;
fi
echo_i
"exit status:
$status
"
...
...
bin/tests/system/digdelv/tests.sh
View file @
7a721f98
...
...
@@ -76,7 +76,7 @@ if [ -x "$DIG" ] ; then
echo_i
"checking dig over TCP works (
$n
)"
ret
=
0
dig_with_opts +tcp @10.53.0.3 a a.example
>
dig.out.test
$n
||
ret
=
1
tr
-d
'\r'
< dig.out.test
$n
|
grep
"10
\\
.0
\\
.0
\\
.1$"
>
/dev/null
||
ret
=
1
grep
"10
\\
.0
\\
.0
\\
.1$"
< dig.out.test
$n
>
/dev/null
||
ret
=
1
if
[
$ret
-ne
0
]
;
then
echo_i
"failed"
;
fi
status
=
$((
status+ret
))
...
...
@@ -124,7 +124,7 @@ if [ -x "$DIG" ] ; then
echo_i
"checking dig +short +rrcomments works(
$n
)"
ret
=
0
dig_with_opts +tcp @10.53.0.3 +short +rrcomments DNSKEY dnskey.example
>
dig.out.test
$n
||
ret
=
1
tr
-d
'\r'
< dig.out.test
$n
|
grep
-q
"
$KEYDATA
; ZSK; alg =
$DEFAULT_ALGORITHM
; key id =
$KEYID
\$
"
>
/dev/null
||
ret
=
1
grep
-q
"
$KEYDATA
; ZSK; alg =
$DEFAULT_ALGORITHM
; key id =
$KEYID
\$
"
< dig.out.test
$n
||
ret
=
1
if
[
$ret
-ne
0
]
;
then
echo_i
"failed"
;
fi
status
=
$((
status+ret
))
...
...
@@ -158,7 +158,7 @@ if [ -x "$DIG" ] ; then
echo_i
"checking dig +short +rrcomments works(
$n
)"
ret
=
0
dig_with_opts +tcp @10.53.0.3 +short +rrcomments DNSKEY dnskey.example
>
dig.out.test
$n
||
ret
=
1
tr
-d
'\r'
< dig.out.test
$n
|
grep
-q
"
$KEYDATA
; ZSK; alg =
$DEFAULT_ALGORITHM
; key id =
$KEYID
\$
"
>
/dev/null
||
ret
=
1
grep
-q
"
$KEYDATA
; ZSK; alg =
$DEFAULT_ALGORITHM
; key id =
$KEYID
\$
"
< dig.out.test
$n
||
ret
=
1
if
[
$ret
-ne
0
]
;
then
echo_i
"failed"
;
fi
status
=
$((
status+ret
))
...
...
@@ -474,7 +474,7 @@ if [ -x "$DIG" ] ; then
n
=
$((
n+1
))
echo_i
"check that dig processes +ednsopt=key-tag and FORMERR is returned (
$n
)"
dig_with_opts @10.53.0.3 +ednsopt
=
key-tag a.example +qr
>
dig.out.test
$n
2>&1
||
ret
=
1
tr
-d
'\r'
< dig.out.test
$n
|
grep
"; KEY-TAG$"
>
/dev/null
||
ret
=
1
grep
"; KEY-TAG$"
dig.out.test
$n
>
/dev/null
||
ret
=
1
grep
"status: FORMERR"
dig.out.test
$n
>
/dev/null
||
ret
=
1
if
[
$ret
-ne
0
]
;
then
echo_i
"failed"
;
fi
status
=
$((
status+ret
))
...
...
@@ -482,7 +482,7 @@ if [ -x "$DIG" ] ; then
n
=
$((
n+1
))
echo_i
"check that dig processes +ednsopt=key-tag:<value-list> (
$n
)"
dig_with_opts @10.53.0.3 +ednsopt
=
key-tag:00010002 a.example +qr
>
dig.out.test
$n
2>&1
||
ret
=
1
tr
-d
'\r'
< dig.out.test
$n
|
grep
"; KEY-TAG: 1, 2$"
>
/dev/null
||
ret
=
1
grep
"; KEY-TAG: 1, 2$"
dig.out.test
$n
>
/dev/null
||
ret
=
1
grep
"status: FORMERR"
dig.out.test
$n
>
/dev/null
&&
ret
=
1
if
[
$ret
-ne
0
]
;
then
echo_i
"failed"
;
fi
status
=
$((
status+ret
))
...
...
@@ -520,7 +520,7 @@ if [ -x "$DIG" ] ; then
echo_i
"check that dig -q -m works (
$n
)"
ret
=
0
dig_with_opts @10.53.0.3
-q
-m
>
dig.out.test
$n
2>&1
tr
-d
'\r'
< dig.out.test
$n
|
grep
'^;-m\..*IN.*A$'
>
/dev/null
||
ret
=
1
grep
'^;-m\..*IN.*A$'
dig.out.test
$n
>
/dev/null
||
ret
=
1
grep
"Dump of all outstanding memory allocations"
dig.out.test
$n
>
/dev/null
&&
ret
=
1
if
[
$ret
-ne
0
]
;
then
echo_i
"failed"
;
fi
status
=
$((
status+ret
))
...
...
@@ -622,7 +622,7 @@ if [ -x "$DELV" ] ; then
echo_i
"checking delv over TCP works (
$n
)"
ret
=
0
delv_with_opts +tcp @10.53.0.3 a a.example
>
delv.out.test
$n
||
ret
=
1
tr
-d
'\r'
< delv.out.test
$n
|
grep
"10
\\
.0
\\
.0
\\
.1$"
>
/dev/null
||
ret
=
1
grep
"10
\\
.0
\\
.0
\\
.1$"
< delv.out.test
$n
>
/dev/null
||
ret
=
1
if
[
$ret
-ne
0
]
;
then
echo_i
"failed"
;
fi
status
=
$((
status+ret
))
...
...
@@ -680,7 +680,7 @@ if [ -x "$DELV" ] ; then
echo_i
"checking delv +short +nosplit +norrcomments works (
$n
)"
ret
=
0
delv_with_opts +tcp @10.53.0.3 +short +nosplit +norrcomments DNSKEY dnskey.example
>
delv.out.test
$n
||
ret
=
1
tr
-d
'\r'
< delv.out.test
$n
|
grep
-q
"
$NOSPLIT
\$
"
>
/dev/null
||
ret
=
1
grep
-q
"
$NOSPLIT
\$
"
< delv.out.test
$n
||
ret
=
1
test
"
$(
wc
-l
< delv.out.test
$n
)
"
-eq
1
||
ret
=
1
test
"
$(
awk
'{print NF}'
< delv.out.test
$n
)
"
-eq
4
||
ret
=
1
if
[
$ret
-ne
0
]
;
then
echo_i
"failed"
;
fi
...
...
bin/tests/system/dns64/tests.sh
View file @
7a721f98
...
...
@@ -1278,7 +1278,7 @@ status=`expr $status + $ret`
echo_i
"checking reverse mapping (
$n
)"
ret
=
0
$DIG
$DIGOPTS
-x
2001:aaaa::10.0.0.1 @10.53.0.2
>
dig.out.ns2.test
$n
||
ret
=
1
tr
-d
'\r'
< dig.out.ns2.test
$n
|
grep
-i
"CNAME.1.0.0.10.IN-ADDR.ARPA.$"
>
/dev/null
||
ret
=
1
grep
-i
"CNAME.1.0.0.10.IN-ADDR.ARPA.$"
dig.out.ns2.test
$n
>
/dev/null
||
ret
=
1
n
=
`
expr
$n
+ 1
`
if
[
$ret
!=
0
]
;
then
echo_i
"failed"
;
fi
status
=
`
expr
$status
+
$ret
`
...
...
bin/tests/system/rndc/tests.sh
View file @
7a721f98
...
...
@@ -229,7 +229,7 @@ do
done
serial
=
`
awk
'$3 == "serial" {print $1}'
ns2/other.db
`
newserial
=
`
expr
$serial
+ 1
`
sed
"
s/
$serial
/
$newserial
/
"
ns2/other.db
>
ns2/other.db.new
sed
s/
$serial
/
$newserial
/ ns2/other.db
>
ns2/other.db.new
echo
'frozen TXT "frozen addition"'
>>
ns2/other.db.new
mv
-f
ns2/other.db.new ns2/other.db
$RNDCCMD
10.53.0.2 thaw 2>&1 |
sed
's/^/ns2 /'
| cat_i
...
...
@@ -272,7 +272,7 @@ do
done
serial
=
`
awk
'$3 == "serial" {print $1}'
ns2/nil.db
`
newserial
=
`
expr
$serial
+ 1
`
sed
"
s/
$serial
/
$newserial
/
"
ns2/nil.db
>
ns2/nil.db.new
sed
s/
$serial
/
$newserial
/ ns2/nil.db
>
ns2/nil.db.new
echo
'frozen TXT "frozen addition"'
>>
ns2/nil.db.new
mv
-f
ns2/nil.db.new ns2/nil.db
$RNDCCMD
10.53.0.2 thaw 2>&1 |
sed
's/^/ns2 /'
| cat_i
...
...
@@ -452,7 +452,7 @@ $RNDC -s 10.53.0.4 -p ${EXTRAPORT6} -c ns4/key6.conf querylog on >/dev/null 2>&1
grep
"query logging is now on"
ns4/named.run
>
/dev/null
||
ret
=
1
# query for builtin and check if query was logged (without +subnet)
$DIG
@10.53.0.4
-p
${
PORT
}
-c
ch
-t
txt foo12345.bind
>
/dev/null
||
ret
=
1
tr
-d
'\r'
< ns4/named.run |
grep
"query: foo12345.bind CH TXT.*(.*)$"
>
/dev/null
||
ret
=
1
grep
"query: foo12345.bind CH TXT.*(.*)$"
ns4/named.run
>
/dev/null
||
ret
=
1
# query for another builtin zone and check if query was logged (with +subnet=127.0.0.1)
$DIG
+subnet
=
127.0.0.1 @10.53.0.4
-p
${
PORT
}
-c
ch
-t
txt foo12346.bind
>
/dev/null
||
ret
=
1
grep
"query: foo12346.bind CH TXT.*
\[
ECS 127
\.
0
\.
0
\.
1
\/
32
\/
0]"
ns4/named.run
>
/dev/null
||
ret
=
1
...
...
@@ -467,7 +467,7 @@ $RNDC -s 10.53.0.4 -p ${EXTRAPORT6} -c ns4/key6.conf querylog > /dev/null 2>&1 |
grep
"query logging is now off"
ns4/named.run
>
/dev/null
||
ret
=
1
# query for another builtin zone and check if query was logged (without +subnet)
$DIG
@10.53.0.4
-p
${
PORT
}
-c
ch
-t
txt foo9876.bind
>
/dev/null
||
ret
=
1
tr
-d
'\r'
< ns4/named.run |
grep
"query: foo9876.bind CH TXT.*(.*)$"
>
/dev/null
&&
ret
=
1
grep
"query: foo9876.bind CH TXT.*(.*)$"
ns4/named.run
>
/dev/null
&&
ret
=
1
if
[
$ret
!=
0
]
;
then
echo_i
"failed"
;
fi
status
=
`
expr
$status
+
$ret
`
...
...
bin/tests/system/rpzrecurse/tests.sh
View file @
7a721f98
...
...
@@ -478,7 +478,7 @@ for mode in native dnsrps; do
echo_i
"testing for invalid prefix length error (
${
t
}
)"
add_test_marker 10.53.0.2
run_server invalidprefixlength
tr
-d
'\r'
< ns2/named.run |
grep
"invalid rpz IP address
\"
1000.4.0.53.10.rpz-client-ip.invalidprefixlength
\"
; invalid prefix length of 1000$"
>
/dev/null
||
{
grep
"invalid rpz IP address
\"
1000.4.0.53.10.rpz-client-ip.invalidprefixlength
\"
; invalid prefix length of 1000$"
ns2/named.run
>
/dev/null
||
{
echo_i
" failed: expected that invalid prefix length error would be logged"
status
=
1
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment