[master] fix corrupt map file handling

3564.	[bug]		Improved handling of corrupted map files. [RT #33380]
This commit is contained in:
Evan Hunt
2013-05-03 14:00:12 -07:00
parent b07086de42
commit 1a076410c2
3 changed files with 19 additions and 9 deletions

View File

@@ -241,7 +241,8 @@ ret=0
./named-compilezone -D -f text -F map -o map.5 example.nil baseline.txt > /dev/null
cp map.5 badmap
stomp badmap 2754 2 99
./named-compilezone -D -f map -F text -o text.5 example.nil badmap > /dev/null && ret=1
./named-compilezone -D -f map -F text -o text.5 example.nil badmap > /dev/null
[ $? = 1 ] || ret=1
[ $ret -eq 0 ] || echo "I:failed"
status=`expr $status + $ret`
@@ -249,7 +250,8 @@ echo "I:checking corrupt map files fail to load (bad node data)"
ret=0
cp map.5 badmap
stomp badmap 2897 5 127
./named-compilezone -D -f map -F text -o text.5 example.nil badmap > /dev/null && ret=1
./named-compilezone -D -f map -F text -o text.5 example.nil badmap > /dev/null
[ $? = 1 ] || ret=1
[ $ret -eq 0 ] || echo "I:failed"
status=`expr $status + $ret`