OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [insight/] [dejagnu/] [testsuite/] [runtest.all/] [remote.test] - Blame information for rev 1765

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
set srcdir [lindex $argv 0]
2
set subdir [lindex $argv 1]
3
set objdir [lindex $argv 2]
4
 
5
if [ file exists $objdir/setval.tmp ] {
6
    source $objdir/setval.tmp
7
} else {
8
    puts "ERROR: $objdir/setval.tmp doesn't exist"
9
}
10
if [ file exists $srcdir/$subdir/default_procs.tcl ] {
11
    source "$srcdir/$subdir/default_procs.tcl"
12
} else {
13
    puts "ERROR: $srcdir/$subdir/default_procs.tcl doesn't exist"
14
}
15
 
16
set file $srcdir/../lib/remote.exp
17
if [ file exists $file] {
18
    source $file
19
} else {
20
    puts "ERROR: $file doesn't exist"
21
}
22
 
23
global errno ""
24
 
25
#
26
# Create a false target config array
27
#
28
set target_info(idp,name)       "idp"
29
set target_info(idp,ldflags)    "-Tidp.ld"
30
set target_info(idp,config)     m68k-unknown-aout
31
set target_info(idp,cflags)     ""
32
set target_info(idp,connect)    telnet
33
set target_info(idp,target)     "s12"
34
set target_info(idp,serial)     "tstty12"
35
set target_info(idp,netport)    "localhost:23"
36
set target_info(idp,baud)       "9600"
37
# MVME target
38
set target_info(mvme,name)      "mvme"
39
set target_info(mvme,ldflags)   "-Tmvme.ld"
40
set target_info(mvme,config)    m68k-unknown-aout
41
set target_info(mvme,cflags)    ""
42
set target_info(mvme,connect)   telnet
43
set target_info(mvme,target)    "s12"
44
set target_info(mvme,serial)    "tstty8"
45
set target_info(mvme,netport)   "localhost:23"
46
set target_info(mvme,baud)      "9600"
47
 
48
# Test remote open. We try not to use any of the support procs in
49
# target.exp to for isolation testing. "target" is the name of the
50
# default array setup by the procs in target.exp.
51
 
52
set timeout 100
53
set errno ""
54
 
55
#
56
# Force connection errors
57
#
58
 
59
# force an rlogin error
60
if { [rlogin foobar.barfoo.com] < 0 } {
61
    puts "PASSED: rlogin bogus host"
62
} else {
63
    puts "FAILED: rlogin bogus"
64
}
65
 
66
# force an rsh error
67
if { [rsh foobar.barfoo.com] < 0 } {
68
    puts "PASSED: rsh bogus host"
69
} else {
70
    puts "FAILED: rsh bogus"
71
}
72
 
73
# force a telnet error
74
if { [telnet foobar.barfoo.com] < 0 } {
75
    puts "PASSED: telnet bogus host"
76
} else {
77
    puts "FAILED: telnet bogus"
78
}
79
 
80
#
81
# Connect to localhost
82
#
83
 
84
# localhost rlogin test
85
if { [rlogin localhost] < 0 } {
86
    if [string match "*unencrypted connection" $errno] {
87
        NOTTESTED "rlogin localhost"
88
    } else {
89
        puts "FAILED: rlogin localhost"
90
    }
91
} else {
92
    puts "PASSED: rlogin localhost"
93
}
94
catch "exp_send exit\n"
95
catch "close -i $spawn_id"
96
catch "wait -i $spawn_id"
97
 
98
# localhost rsh test
99
if { [rsh localhost] < 0 } {
100
    if [string match "*kinit" $errno] {
101
        puts "NOTTESTED: rsh localhost"
102
    } else {
103
        puts "FAILED: rsh localhost"
104
    }
105
} else {
106
    puts "PASSED: rsh localhost"
107
}
108
catch "exp_send exit\n"
109
catch "close -i $spawn_id"
110
catch "wait -i $spawn_id"
111
 
112
# localhost telnet test. In this case it will return
113
# an error cause we get prompted for a password or login. For
114
# now this is considered an error, as we usually only
115
# telnet to a terminal server.
116
if { [telnet localhost] < 0 } {
117
    if [string match "*password." $errno] {
118
        puts "NOTTESTED: telnet localhost"
119
    } else {
120
        puts "FAILED: telnet localhost"
121
    }
122
} else {
123
    puts "PASSED: telnet localhost"
124
}
125
catch "exp_send exit\n"
126
catch "close -i $spawn_id"
127
catch "wait -i $spawn_id"
128
 
129
#
130
# Connect to the configured target
131
#
132
set target_info(target,netport) $target_info(idp,netport)
133
set target_info(target,target)  localhost
134
set target_info(target,connect) rlogin
135
if { [rlogin target] < 0 } {
136
    if [ string match "*kinit" $errno] {
137
        puts "NOTTESTED: rlogin target"
138
    } else {
139
        puts "FAILED: rlogin target"
140
    }
141
} else {
142
    puts "PASSED: rlogin target"
143
}
144
catch "exp_send exit\n"
145
catch "close -i $spawn_id"
146
catch "wait -i $spawn_id"
147
 
148
# test remote_open
149
if { [rsh target] < 0 } {
150
    if [ string match "*kinit" $errno] {
151
        puts "NOTTESTED: rsh target"
152
    } else {
153
        puts "FAILED: rsh target"
154
    }
155
} else {
156
    puts "PASSED: rsh target"
157
}
158
catch "exp_send exit\n"
159
catch "close -i $spawn_id"
160
catch "wait -i $spawn_id"
161
 
162
# telnet to host
163
# FIXME: This won't work till we figure out how to telnet and
164
# not get a password prompt.
165
 
166
#
167
# Connect to the configured host
168
#
169
set target_info(host,connect) rlogin
170
set target_info(host,netport) $target_info(idp,netport)
171
set target_info(host,target)  localhost
172
 
173
# rlogin to host
174
if { [rlogin host] < 0 } {
175
    if [ string match "*kinit*" $errno] {
176
        puts "NOTTESTED: rlogin host"
177
    } else {
178
        puts "FAILED: rlogin host"
179
    }
180
} else {
181
    puts "PASSED: rlogin host"
182
}
183
catch "exp_send exit\n"
184
catch "close -i $spawn_id"
185
catch "wait -i $spawn_id"
186
 
187
# rsh to host
188
if { [rsh host] < 0 } {
189
    if [ string match "*kinit*" $errno] {
190
        puts "NOTTESTED: rsh host"
191
    } else {
192
        puts "FAILED: rsh host"
193
    }
194
} else {
195
    puts "PASSED: rsh host"
196
}
197
catch "exp_send exit\n"
198
catch "close -i $spawn_id"
199
catch "wait -i $spawn_id"
200
 
201
# telnet to host
202
# FIXME: This won't work till we figure out how to telnet and
203
# not get a password prompt.
204
 
205
# tip port
206
# remote_close args
207
# rcp_download src dest
208
# tip_download shell_id file
209
# kermit args
210
# download args
211
 
212
 
213
 
214
 
215
 
216
 
217
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.