From a87e292272e2275893695a3fc58ccb7f4625ecb6 Mon Sep 17 00:00:00 2001 From: Evan Huus Date: Thu, 26 Jun 2014 23:43:51 -0400 Subject: Tighten the dump-glossary test. 1. The only indication we get of an out-of-order value string is a message on STDERR, so check that and fail the test if STDERR wasn't empty. 2. This exposes an out-of-order value string in packet-stun.c; fix it. 3. This triggered the pre-commit hook on packet-stun.c, which noticed an API error (ENC_ASCII -> ENC_ASCII|ENC_NA); fix that too. Change-Id: I36f87a2a87b40537119562f22a7e3012716ff239 Lesson: automated testing/tooling is both wonderful and scary. Reviewed-on: https://code.wireshark.org/review/2682 Reviewed-by: Evan Huus --- test/suite-clopts.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/suite-clopts.sh b/test/suite-clopts.sh index f9932a70a5..ee1b9c4e9d 100755 --- a/test/suite-clopts.sh +++ b/test/suite-clopts.sh @@ -278,10 +278,13 @@ clopts_step_valid_name_resolving() { } test_dump_glossary() { - $TSHARK -G $1 > /dev/null + $TSHARK -G $1 > /dev/null 2> ./testout.txt RETURNVALUE=$? if [ ! $RETURNVALUE -eq $EXIT_OK ]; then test_step_failed "exit status: $RETURNVALUE" + elif [ -s ./testout.txt ]; then + test_step_output_print ./testout.txt + test_step_failed "Error messages on stderr" else test_step_ok fi -- cgit v1.2.3