[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Remote test tutorial
From: |
Vasan Sundar |
Subject: |
Remote test tutorial |
Date: |
Fri, 7 Mar 2003 11:41:59 -0800 |
Hi,
I am going through the remote test part of the tutorial at
http://www.gnu.org/software/dejagnu/manual/x319.html
and noticed through tcpdump that sometimes the client closes the
connection even before the server has actually run the command and
sent the output. Looks like "Hello World" in the expect statement
matches "echo Hello World" that the telnet server echoes back,
not the output of the command. Below is a simple patch for this.
Also, I wanted to modify the remote telnet test to run a ls on the
remote server and print the output. I did this:
set test "Remote_send ls"
set status [remote_send $target "ls bin"]
pass "$test"
set test "Remote_expect ls bin"
remote_expect $target 5 {
"ls bin" { puts "output: $expect_out(0,string)"
exp_continue }
-re ".*gunzip.*" { puts "output: $expect_out(0,string)"}
# default { puts "default output: $expect_out(buffer)"}
}
pass "$test"
which doesn't work. What is the right way to go about it?
Any help greatly appreciated.
thanks
sundar
--- remote_echo.exp.org 2003-03-07 11:28:34.000000000 -0800
+++ remote_echo.exp 2003-03-07 11:27:48.000000000 -0800
@@ -10,7 +10,7 @@
}
set test "Remote_send Hello World"
-set status [remote_send $target "echo \"Hello World\" \n"]
+set status [remote_send $target "echo \"Hello\" \"World\" \n"]
pass "$test"
set test "Remote_expect Hello World"
remote_expect $target 5 {
- Remote test tutorial,
Vasan Sundar <=