diff --git a/bin/tests/system/digdelv/tests.sh b/bin/tests/system/digdelv/tests.sh index e147912a1b..e5c28faf79 100644 --- a/bin/tests/system/digdelv/tests.sh +++ b/bin/tests/system/digdelv/tests.sh @@ -938,7 +938,7 @@ if [ -x "$DIG" ]; then if [ $HAS_PYYAML -ne 0 ]; then n=$((n + 1)) - echo_i "check dig +yaml output ($n)" + echo_i "check dig +yaml ANY output ($n)" ret=0 dig_with_opts +qr +yaml @10.53.0.3 any ns2.example >dig.out.test$n 2>&1 || ret=1 $PYTHON yamlget.py dig.out.test$n 0 message query_message_data status >yamlget.out.test$n 2>&1 || ret=1 @@ -1430,7 +1430,7 @@ if [ -x "$DELV" ]; then if [ $HAS_PYYAML -ne 0 ]; then n=$((n + 1)) - echo_i "check delv +yaml output ($n)" + echo_i "check delv +yaml ANY output ($n)" ret=0 delv_with_opts +yaml @10.53.0.3 any ns2.example >delv.out.test$n || ret=1 $PYTHON yamlget.py delv.out.test$n status >yamlget.out.test$n 2>&1 || ret=1 @@ -1445,6 +1445,40 @@ if [ -x "$DELV" ]; then [ ${count:-0} -eq 5 ] || ret=1 if [ $ret -ne 0 ]; then echo_i "failed"; fi status=$((status + ret)) + + n=$((n + 1)) + echo_i "check delv +yaml NODATA output ($n)" + ret=0 + delv_with_opts +yaml @10.53.0.3 type500 ns2.example >delv.out.test$n || ret=1 + $PYTHON yamlget.py delv.out.test$n status >yamlget.out.test$n 2>&1 || ret=1 + read -r value yamlget.out.test$n 2>&1 || ret=1 + read -r value yamlget.out.test$n 2>&1 || ret=1 + read -r value delv.out.test$n || ret=1 + $PYTHON yamlget.py delv.out.test$n status >yamlget.out.test$n 2>&1 || ret=1 + read -r value yamlget.out.test$n 2>&1 || ret=1 + read -r value yamlget.out.test$n 2>&1 || ret=1 + read -r value attributes & DNS_RDATASETATTR_NEGATIVE) != 0) { if (NXDOMAIN(rdataset)) { - RETERR(str_totext(";-$NXDOMAIN\n", target)); + RETERR(str_totext(";-$NXDOMAIN", target)); } else { - RETERR(str_totext(";-$NXRRSET\n", target)); + RETERR(str_totext(";-$NXRRSET", target)); } + if (start != NULL) { + RETERR(yaml_stringify(target, start)); + RETERR(str_totext("'\n", target)); + } else { + RETERR(str_totext("\n", target)); + } + /* * Print a summary of the cached records which make * up the negative response.