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
3635d8f9
Commit
3635d8f9
authored
Jun 14, 2016
by
Mark Andrews
Browse files
do not overflow exit status. [RT #42643]
parent
ecff557e
Changes
93
Hide whitespace changes
Inline
Side-by-side
bin/tests/system/acl/tests.sh
View file @
3635d8f9
...
...
@@ -181,4 +181,4 @@ $DIG example. soa @10.53.0.2 +subnet="192.0.2.128/32" -p 5300 > dig.out.${t}
grep
"CLIENT-SUBNET.*192.0.2.128/32/24"
dig.out.
${
t
}
>
/dev/null
||
{
echo
"I:test
$t
failed"
;
status
=
1
;
}
echo
"I:exit status:
$status
"
exit
$status
[
$status
-eq
0
]
||
exit
1
bin/tests/system/additional/tests.sh
View file @
3635d8f9
...
...
@@ -139,4 +139,5 @@ if [ $ret -eq 1 ] ; then
echo
"I: failed"
;
status
=
1
fi
exit
$status
echo
"I:exit status:
$status
"
[
$status
-eq
0
]
||
exit
1
bin/tests/system/addzone/tests.sh
View file @
3635d8f9
...
...
@@ -381,4 +381,4 @@ if [ $ret != 0 ]; then echo "I:failed"; fi
status
=
`
expr
$status
+
$ret
`
echo
"I:exit status:
$status
"
exit
$status
[
$status
-eq
0
]
||
exit
1
bin/tests/system/allow_query/tests.sh
View file @
3635d8f9
...
...
@@ -630,5 +630,4 @@ if [ $ret != 0 ]; then echo "I:failed"; fi
status
=
`
expr
$status
+
$ret
`
echo
"I:exit status:
$status
"
exit
$status
[
$status
-eq
0
]
||
exit
1
bin/tests/system/autosign/tests.sh
View file @
3635d8f9
...
...
@@ -1217,4 +1217,4 @@ if [ $ret != 0 ]; then echo "I:failed"; fi
status
=
`
expr
$status
+
$ret
`
echo
"I:exit status:
$status
"
exit
$status
[
$status
-eq
0
]
||
exit
1
bin/tests/system/builtin/tests.sh
View file @
3635d8f9
...
...
@@ -123,4 +123,5 @@ $DIG +norec +nsid foo @10.53.0.3 -p 5300 > dig.out.ns3.$n
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
exit
$status
echo
"I:exit status:
$status
"
[
$status
-eq
0
]
||
exit
1
bin/tests/system/cacheclean/tests.sh
View file @
3635d8f9
...
...
@@ -225,4 +225,4 @@ if [ $ret != 0 ]; then echo "I:failed"; fi
status
=
`
expr
$status
+
$ret
`
echo
"I:exit status:
$status
"
exit
$status
[
$status
-eq
0
]
||
exit
1
bin/tests/system/case/tests.sh
View file @
3635d8f9
...
...
@@ -137,5 +137,7 @@ echo "I:check A owner case is transfered to slave ($n)"
ret
=
0
$DIG
axfr dynamic @10.53.0.2
-p
5300
>
dig.ns2.test
$n
$PERL
../digcomp.pl dig.ns2.test
$n
postns1.good
||
ret
=
1
status
=
`
expr
$status
+
$ret
`
echo
"I:exit status:
$status
"
exit
$status
[
$status
-eq
0
]
||
exit
1
bin/tests/system/catz/tests.sh
View file @
3635d8f9
...
...
@@ -373,4 +373,4 @@ if [ $ret != 0 ]; then echo "I:failed"; fi
status
=
`
expr
$status
+
$ret
`
echo
"I:exit status:
$status
"
exit
$status
[
$status
-eq
0
]
||
exit
1
bin/tests/system/checkconf/tests.sh
View file @
3635d8f9
...
...
@@ -293,4 +293,4 @@ if [ $ret != 0 ]; then echo "I:failed"; ret=1; fi
status
=
`
expr
$status
+
$ret
`
echo
"I:exit status:
$status
"
exit
$status
[
$status
-eq
0
]
||
exit
1
bin/tests/system/checkds/tests.sh
View file @
3635d8f9
...
...
@@ -176,4 +176,4 @@ status=`expr $status + $ret`
if
[
$status
=
0
]
;
then
$SHELL
clean.sh
;
fi
echo
"I:exit status:
$status
"
exit
$status
[
$status
-eq
0
]
||
exit
1
bin/tests/system/checknames/tests.sh
View file @
3635d8f9
...
...
@@ -151,4 +151,5 @@ if [ $ret != 0 ]; then echo "I:failed"; fi
status
=
`
expr
$status
+
$ret
`
n
=
`
expr
$n
+ 1
`
exit
$status
echo
"I:exit status:
$status
"
[
$status
-eq
0
]
||
exit
1
bin/tests/system/checkzone/tests.sh
View file @
3635d8f9
...
...
@@ -171,4 +171,4 @@ if [ $ret != 0 ]; then echo "I:failed"; fi
status
=
`
expr
$status
+
$ret
`
echo
"I:exit status:
$status
"
exit
$status
[
$status
-eq
0
]
||
exit
1
bin/tests/system/cookie/tests.sh
View file @
3635d8f9
...
...
@@ -137,4 +137,4 @@ status=`expr $status + $ret`
echo
"I:exit status:
$status
"
exit
$status
[
$status
-eq
0
]
||
exit
1
bin/tests/system/coverage/tests.sh
View file @
3635d8f9
...
...
@@ -81,4 +81,4 @@ for dir in [0-9][0-9]-*; do
done
echo
"I:exit status:
$status
"
exit
$status
[
$status
-eq
0
]
||
exit
1
bin/tests/system/database/tests.sh
View file @
3635d8f9
...
...
@@ -57,4 +57,4 @@ if [ $ret != 0 ]; then echo "I:failed"; fi
status
=
`
expr
$status
+
$ret
`
echo
"I:exit status:
$status
"
exit
$status
[
$status
-eq
0
]
||
exit
1
bin/tests/system/dialup/tests.sh
View file @
3635d8f9
...
...
@@ -68,4 +68,4 @@ if [ $ret != 0 ]; then echo "I:failed"; fi
status
=
`
expr
$status
+
$ret
`
echo
"I:exit status:
$status
"
exit
$status
[
$status
-eq
0
]
||
exit
1
bin/tests/system/digdelv/clean.sh
View file @
3635d8f9
...
...
@@ -14,7 +14,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
rm
-f
dig.out.test
*
rm
-f
dig.out.
*
test
*
rm
-f
delv.out.test
*
rm
-f
*
/named.memstats
rm
-f
*
/named.run
...
...
bin/tests/system/digdelv/tests.sh
View file @
3635d8f9
...
...
@@ -263,7 +263,7 @@ if [ -x ${DIG} ] ; then
echo
"I:checking dig +subnet with various prefix lengths (
$n
)"
ret
=
0
for
i
in
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
;
do
$DIG
$DIGOPTS
+tcp @10.53.0.2 +subnet
=
255.255.255.255/
$i
A a.example
>
dig.out.test
$n
2>&1
||
ret
=
1
$DIG
$DIGOPTS
+tcp @10.53.0.2 +subnet
=
255.255.255.255/
$i
A a.example
>
dig.out.
$i
.
test
$n
2>&1
||
ret
=
1
case
$i
in
1|9|17
)
octet
=
128
;;
2|10|18
)
octet
=
192
;;
...
...
@@ -279,8 +279,8 @@ if [ -x ${DIG} ] ; then
9|10|11|12|13|14|15|16
)
addr
=
"255.
${
octet
}
.0.0"
;;
17|18|19|20|21|22|23|24
)
addr
=
"255.255.
${
octet
}
.0"
;;
esac
grep
"FORMERR"
< dig.out.test
.
$p
.
$n
>
/dev/null
&&
ret
=
1
grep
"CLIENT-SUBNET:
$addr
/
$i
/0"
< dig.out.test
$n
>
/dev/null
||
ret
=
1
grep
"FORMERR"
< dig.out.
$i
.
test
$n
>
/dev/null
&&
ret
=
1
grep
"CLIENT-SUBNET:
$addr
/
$i
/0"
< dig.out.
$i
.
test
$n
>
/dev/null
||
ret
=
1
done
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
status
=
`
expr
$status
+
$ret
`
...
...
@@ -510,7 +510,8 @@ if [ -x ${DELV} ] ; then
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
status
=
`
expr
$status
+
$ret
`
exit
$status
echo
"I:exit status:
$status
"
[
$status
-eq
0
]
||
exit
1
else
echo
"
$DELV
is needed, so skipping these delv tests"
fi
bin/tests/system/dlv/tests.sh
View file @
3635d8f9
...
...
@@ -59,4 +59,4 @@ if [ $ret != 0 ]; then echo "I:failed"; fi
status
=
`
expr
$status
+
$ret
`
echo
"I:exit status:
$status
"
exit
$status
[
$status
-eq
0
]
||
exit
1
Prev
1
2
3
4
5
Next
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