Commit 7f11c20f authored by Per Cederqvist's avatar Per Cederqvist

Refuse to run the test suite if expect is broken.

This causes "make check" to fail quickly if running on an expect that
has broken handling of zero-lenght writes, or if expect is really,
really slow due to broken glob gate.

* src/server/testsuite/Makefile.am (check-l2g): Depend on
working-dejagnu.
(check-lyskomd): Ditto.
(check-leaks): Ditto.
(working-dejagnu): New target.
(EXTRA_DIST): Added dejagnu.0/00-zero-length-write.exp and
dejagnu.0/90-slow-glob-gate.exp.

* src/server/testsuite/dejagnu.0/00-zero-length-write.exp: New
test, that fails on known bad versions of expect.

* src/server/testsuite/dejagnu.0/90-slow-glob-gate.exp: New test,
that fails if a simple regexp pattern causes expect to run too
slow, indicating that it is converted to a glob pattern that
causes a lot of backtracking.

* src/server/testsuite/.gitignore: Ignore dejagnu.log and
dejagnu.sum.
parent 0deaed08
2010-06-19 Per Cederqvist <ceder@lysator.liu.se>
Refuse to run the test suite if expect is known to be so broken
that it cannot be run.
* src/server/testsuite/Makefile.am (check-l2g): Depend on
working-dejagnu.
(check-lyskomd): Ditto.
(check-leaks): Ditto.
(working-dejagnu): New target.
(EXTRA_DIST): Added dejagnu.0/00-zero-length-write.exp and
dejagnu.0/90-slow-glob-gate.exp.
* src/server/testsuite/dejagnu.0/00-zero-length-write.exp: New
test, that fails on known bad versions of expect.
* src/server/testsuite/dejagnu.0/90-slow-glob-gate.exp: New test,
that fails if a simple regexp pattern causes expect to run too
slow, indicating that it is converted to a glob pattern that
causes a lot of backtracking.
* src/server/testsuite/.gitignore: Ignore dejagnu.log and
dejagnu.sum.
2010-05-23 Per Cederqvist <ceder@lysator.liu.se>
Don't attempt to use DNS when no nameserver is available.
......
......@@ -13,6 +13,8 @@ bignum
core
db
dbg.log
dejagnu.log
dejagnu.sum
etc
get-time-often
gmon.out
......
......@@ -52,6 +52,8 @@ EXTRA_DIST = \
leaks.0/leaks10.exp \
leaks.0/lots-aux-items.conf \
leaks.0/no-aux-items.conf \
dejagnu.0/00-zero-length-write.exp \
dejagnu.0/90-slow-glob-gate.exp \
locksuite.py \
lyskomd.supp \
renumber.el \
......@@ -130,10 +132,10 @@ check-nondejagnu: check-testfd check-test-select check-test-sigjmp
check-dejagnu: check-l2g check-lyskomd check-leaks
check-l2g: test-l2g site.exp valgrind.wrap
check-l2g: test-l2g site.exp valgrind.wrap working-dejagnu
runtest --tool l2g --srcdir $(srcdir)
check-lyskomd: site.exp ../lyskomd valgrind.wrap bignum timeval-overflow
check-lyskomd: site.exp ../lyskomd valgrind.wrap bignum timeval-overflow working-dejagnu
if HAVE_PYTHON
runtest --tool lyskomd --srcdir $(srcdir) \
3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&-
......@@ -149,7 +151,7 @@ endif
# "make check" in lyskomd.0.
check-lyskomd: check-recursive
check-leaks: site.exp ../lyskomd valgrind.wrap
check-leaks: site.exp ../lyskomd valgrind.wrap working-dejagnu
if HAVE_PYTHON
runtest --tool leaks --srcdir $(srcdir) \
3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&-
......@@ -160,6 +162,9 @@ else
@echo >&2
endif
working-dejagnu:
runtest --tool dejagnu --srcdir $(srcdir)
check-testfd: testfd
./testfd
......
# expect 5.43.0 contains a bug that causes the LysKOM test suite to
# hang. Unfortunately, I have not been able to create a short example
# that reproduces the problem. The official fix is visible here:
#
# http://expect.cvs.sourceforge.net/viewvc/expect/expect/exp_chan.c?r1=5.12&r2=5.13
if {[exp_version] == "5.43.0"} {
fail "expect 5.43.0 is broken and causes the test suite to hang"
} else {
pass "zero-length write bug probably not present"
}
# expect 5.44.1.1 introduced a "gate keeper glob pattern", to avoid
# using "slow" regexp matching. Unfortunately, the glob pattern
# constructed for many of our fast regular expressions are very, very
# slow. So slow that the test suite cannot continue.
#
# This test reproduces the problem to a small extent. In expect
# 5.43.0 and earlier this runs in less than 1 ms, but in 5.44.1.14 it
# takes 1.3 seconds (on a particular computer).
#
# The bug is reported here:
# http://sourceforge.net/tracker/?func=detail&atid=113179&aid=3010684&group_id=13179
spawn echo "MRK:client1: :18 14 6 6 3 22 1 5 110 2 151 1 5 0 8 0 2 { 0 1 6 5 } 0 *\nMRK:client1: :18 14 7 6 3 22 1\n"
set t0 [clock clicks -milliseconds]
expect {
-re "^MRK:client1: :18 14 6 \[0-9\]* \[0-9\]* \[0-9\]* \[0-9\]* \[0-9\]* \[0-9\]* \[0-9\]* \[0-9\]* \[0-9\]* 5 0 8 0 2 { 0 1 6 5 } 0 \\\\*\r?\n" {
}
}
set t1 [clock clicks -milliseconds]
if {$t1 - $t0 > 20} {
fail "regexp matchint too slow ([expr $t1 - $t0] ms)"
} else {
pass "regexp matching seems to be fast"
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment