From 2469e4703e9fe6c0adccc5c2e4e86b8e45c92da6 Mon Sep 17 00:00:00 2001 From: Per Cederqvist Date: Mon, 28 Jun 1999 21:40:44 +0000 Subject: [PATCH] (dbck_run): New proc. (lyskomd_death): Call dbck_run to check the database after each shutdown. --- src/server/testsuite/config/unix.exp | 35 ++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/src/server/testsuite/config/unix.exp b/src/server/testsuite/config/unix.exp index 41a0a1d9..17d1e88b 100644 --- a/src/server/testsuite/config/unix.exp +++ b/src/server/testsuite/config/unix.exp @@ -499,8 +499,43 @@ proc lyskomd_death {} { } system "cat etc/memory-usage >> usage.all" check_memory_usage + dbck_run } +proc dbck_run {} { + global nl + global test + global any_num + + spawn ../dbck -d config/lyskomd-config + set test "dbck started" + expect_after { + timeout { fail "$test (timeout)" } + eof { fail "$test (eof)" } + } + expect { + -re "^MSG: init_cache: using datafile\.$nl" { pass "$test" } + } + set test "dbck sent second line" + expect { + -re "^Read $any_num confs/persons and $any_num texts, eof at $any_num$nl" { + pass "$test" + } + } + set test "dbck sent final line" + expect { + -re "^Press enter to terminate dbck$nl" { + pass "$test" + } + } + send "\n" + set test "dbck died" + expect { + eof { pass "$test"; wait } + } + unset test +} + proc client_start {nr} { global client_id global clientport -- GitLab