[master] Ensure consistent handling of -4/-6 command line options in all tools

4690.	[bug]		Command line options -4/-6 were handled inconsistently
			between tools. [RT #45632]
This commit is contained in:
Michał Kępień
2017-08-16 11:10:24 +02:00
parent 503223b800
commit d6814700de
11 changed files with 86 additions and 16 deletions

View File

@@ -51,5 +51,19 @@ diff refb outputb.mdig || ret=1
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
echo "I:check mdig -4 -6"
ret=0
$MDIG -4 -6 -f input @10.53.0.4 > output46.mdig 2>&1 && ret=1
grep "only one of -4 and -6 allowed" output46.mdig > /dev/null || ret=1
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
echo "I:check mdig -4 with an IPv6 server address"
ret=0
$MDIG -4 -f input @fd92:7065:b8e:ffff::2 > output4.mdig 2>&1 && ret=1
grep "address family not supported" output4.mdig > /dev/null || ret=1
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
echo "I:exit status: $status"
[ $status -eq 0 ] || exit 1