[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Serious flaw in the testsuite
From: |
Pavel Roskin |
Subject: |
Serious flaw in the testsuite |
Date: |
Sun, 29 Oct 2000 00:17:22 -0400 (EDT) |
Hello!
There is a serious problem in the tesuite that has been masking problems
with the incorrect exit codes.
If the second argument to AT_CHECK (expected exit code) is set to a
non-zero value but the process exits with the code 0 the testsuite would
ignore the failure.
The problem with AC_MSG_ERROR not working properly under zsh could have
been discovered earlier if not this bug.
Also I have added a warning in the verbose mode if the exit code has a
wrong value. Currenly it's very hard to say what is wrong in such cases.
I'll appreciate comments on whether the message should be emphasized or
re-formatted anyhow.
ChangeLog:
* tests/atgeneral.m4 (AT_CHECK): Warn if the expected exit status
is different from what we got. Don't preserve exit status other
than 77.
________________________
Index: tests/atgeneral.m4
--- tests/atgeneral.m4 Wed Oct 18 17:34:39 2000
+++ tests/atgeneral.m4 Sat Oct 28 23:50:26 2000
@@ -372,10 +372,12 @@
ifelse([$2], [], [],
[at_status=$?
if test $at_status != $2; then
+ $at_verbose && echo "Exit code was $at_status, expected $2" >&6
dnl Maybe there was an important message to read before it died.
$at_verbose && $at_check_stds && cat stderr >&6
-dnl Exit with the same code, at least to preserve 77.
- exit $at_status
+dnl Preserve exit code 77.
+ test $at_status = 77 && exit 77
+ exit 1
fi
])dnl
$at_traceoff
________________________
Regards,
Pavel Roskin
- Serious flaw in the testsuite,
Pavel Roskin <=