+2001-08-23 Frank Ch. Eigler <fche@redhat.com>
+
+ * lib/monkey.exp (monkey_stop): New routine.
+ (monkey_test): Upon failure in test loop, break out, to always
+ call `monkey_stop'.
+ (monkey_test_pin): Don't mistakenly return "eof".
+
2001-08-22 Ben Elliston <bje@redhat.com>
* config/default.exp (sid_assert): New proc.
# (e.g. m => minutes), then run the tests for the specified
# duration, rather than as a fixed number of iterations.
+ set condition "pass"
if {[regexp {[smhd]$} $iterations]} {
regexp {([0-9]+)[smhd]$} $iterations ignore units
set now [clock seconds]
note "Testing $type until [clock format $finishtime]"
}
while {[clock seconds] < $finishtime} {
- if {[do_one_test] == 0} then return
+ if {[do_one_test] == 0} then {set condition "fail"; break}
}
} else {
for {set i 0} {$i < $iterations} {incr i} {
- if {[do_one_test] == 0} then return
+ if {[do_one_test] == 0} then {set condition "fail"; break}
}
}
- sid_stop
- pass "$test ($iterations iterations)"
+ monkey_stop
+ $condition "$test ($iterations iterations)"
catch {unset pins buses attributes}
return 0
}
+proc monkey_stop {} {
+ sid_stop
+}
+
+
# Monkey test a pin (decided at runtime).
proc monkey_test_pin {} {
global pins victim
# Value-carrying pin.
set value [random [expr int(pow(2,16))]]
set result [sid_cmd [list sid::pin::driven_h4 $handle $value]]
- if [string match "" $result] then { return "eof" }
+
+ # sid::pin::driven_h4 returns nothing!
+ # if [string match "" $result] then { return "eof" }
}
# Monkey test a bus (transaction type and width decided at runtime).