Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Per Cederqvist
lyskom-server-ceder-1616-generations-topgit
Commits
5bbdf39f
Commit
5bbdf39f
authored
Jun 05, 1999
by
Per Cederqvist
Browse files
Added missing "wait" statements. Test lock files created by a remote system.
parent
f9f7baf0
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/server/testsuite/lyskomd.0/11.exp
View file @
5bbdf39f
...
...
@@ -47,7 +47,7 @@ expect {
send "\n"
set test "read-only dbck died"
expect {
eof { pass "$test" }
eof { pass "$test"
; wait
}
}
unset test
...
...
@@ -66,7 +66,7 @@ expect {
send "\n"
set test "read-write dbck died"
expect {
eof { pass "$test" }
eof { pass "$test"
; wait
}
}
unset test
...
...
@@ -85,7 +85,7 @@ expect {
send "\n"
set test "read-write lyskomd died"
expect {
eof { pass "$test" }
eof { pass "$test"
; wait
}
}
unset test
...
...
@@ -100,29 +100,50 @@ lyskomd_start
system "kill -KILL $lyskomd_pid"
set test "lyskomd was killed"
expect {
eof { pass "$test" }
eof { pass "$test"
; wait
}
}
# Start a new lyskomd. Check that it removes the stale lock file.
set new_pid [spawn ../lyskomd -d config/lyskomd-config]
set test "stale lock file removed"
expect {
-re "Stale lock file left by $any*:$lyskomd_pid removed\.$nl" {
-re "
$new_pid
Stale lock file left by $any*:$lyskomd_pid removed\.$nl" {
pass "$test"
}
}
system "kill -HUP $
lyskomd
_pid"
system "kill -HUP $
new
_pid"
set test "non-stale lyskomd sent final line"
expect {
-re "^\[0-9 :\]* Press enter to terminate lyskomd$nl" {
-re "^\[0-9 :\]*
$new_pid
Press enter to terminate lyskomd$nl" {
pass "$test"
}
}
send "\n"
set test "non-stale lyskomd died"
expect {
eof { pass "$test" }
eof { pass "$test"
; wait
}
}
unset test
# Start a new lyskomd while a lock file for a remote system exists.
system "ln -s inet.lysator.liu.se:4711 db/lyskomd-lock"
spawn ../lyskomd -d config/lyskomd-config
set test "remote lock file found"
expect {
-re "Database locked by inet\.lysator\.liu\.se:4711$nl" {
pass "$test"
}
}
set test "local lyskomd sent final line"
expect {
-re "^\[0-9 :\]* Press enter to terminate lyskomd$nl" {
pass "$test"
}
}
send "\n"
set test "local lyskomd died"
expect {
eof { pass "$test"; wait }
}
unset test
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment