Commit a159675f authored by Tony Finch's avatar Tony Finch Committed by Evan Hunt
Browse files

dnssec-coverage: fix handling of zones without trailing dots

After change 5143, zones listed on the command line without trailing
dots were ignored.
parent cfdf457d
...@@ -189,7 +189,8 @@ def parse_args(): ...@@ -189,7 +189,8 @@ def parse_args():
fatal("ERROR: -f can only be used with one zone.") fatal("ERROR: -f can only be used with one zone.")
# strip trailing dots # strip trailing dots
args.zone = [x[:-1] for x in args.zone if len(x) > 1 and x[-1] == '.'] args.zone = [x[:-1] if len(x) > 1 and x[-1] == '.' else x
for x in args.zone]
# convert from time arguments to seconds # convert from time arguments to seconds
try: try:
......
...@@ -13,4 +13,5 @@ rm -f named-compilezone ...@@ -13,4 +13,5 @@ rm -f named-compilezone
rm -f */K*.key rm -f */K*.key
rm -f */K*.private rm -f */K*.private
rm -rf coverage.* rm -rf coverage.*
rm -rf dotted-dotless
rm -f ns*/named.lock rm -f ns*/named.lock
...@@ -81,5 +81,17 @@ for dir in [0-9][0-9]-*; do ...@@ -81,5 +81,17 @@ for dir in [0-9][0-9]-*; do
status=`expr $status + $ret` status=`expr $status + $ret`
done done
dir=dotted-dotless
[ -d $dir ] || mkdir $dir
echo_i "$dir"
zsk1=`$KEYGEN -q -K $dir -a rsasha256 one.example`
zsk2=`$KEYGEN -q -K $dir -a rsasha256 two.example`
$COVERAGE -K $dir one.example. two.example > coverage.$n 2>&1
grep one.example coverage.$n >/dev/null 2>&1 || ret=1
grep two.example coverage.$n >/dev/null 2>&1 || ret=1
n=`expr $n + 1`
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
echo_i "exit status: $status" echo_i "exit status: $status"
[ $status -eq 0 ] || exit 1 [ $status -eq 0 ] || exit 1
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment