Skip to content
GitLab
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
4ec6b02e
Commit
4ec6b02e
authored
Aug 08, 1998
by
Per Cederqvist
Browse files
(client_start): Set up expect_active so that unexpected lines are reported.
(client_death): New proc.
parent
b80cf90e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/server/testsuite/config/unix.exp
View file @
4ec6b02e
...
...
@@ -152,8 +152,6 @@ proc lyskomd_start {} {
set pid [spawn ../lyskomd -d config/lyskomd-config]
set server_id $spawn_id
set expect_active($server_id) ""
set expect_always($server_id) ""
set expect_active($server_id) \
" -i $server_id eof { fail \"\$test (eof on lyskomd); wait\" }"
set expect_always($server_id) \
...
...
@@ -202,10 +200,11 @@ proc client_start {nr} {
global expect_always
global expect_active
global srcdir
global deep_any
spawn python $srcdir/tcpconnect.py localhost $clientport MRK:client$nr
set client_id($nr) $spawn_id
set expect_active($client_id($nr)) " "
set expect_active($client_id($nr)) "
-i $client_id($nr) -re \"($deep_any*)$nl\" { fail \"\$test (unexpected line \$expect_out(1,string))\"; exp_continue }
"
set expect_always($client_id($nr)) \
" -i $client_id($nr) eof { fail \"\$test (eof on client$nr); wait\" } -i $client_id($nr) buffer_full { fail \"\$test (buffer_full on client$nr)\" } "
...
...
@@ -216,6 +215,34 @@ proc client_start {nr} {
simple_expect "Connected" "client connected" meta
}
proc client_death {nr} {
global client_id
global clientport
global spawn_id
global test
global nl
global expect_always
global expect_active
global srcdir
global deep_any
talk_to client $nr
simple_expect "EOF on socket" "client $nr got EOF from server" meta
send "die\n"
set test "client $nr closes pty"
expect {
eof { pass "$test"; wait }
}
unset test
unset expect_active($client_id($nr))
unset expect_always($client_id($nr))
unset spawn_id
fix_expect_after
}
proc talk_to {what {nr ""}} {
global spawn_id
global server_id
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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