File: bug25514

package info (click to toggle)
oce 0.18.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 301,548 kB
  • sloc: cpp: 1,190,609; ansic: 67,225; sh: 11,630; tcl: 7,954; cs: 5,221; python: 2,867; java: 1,522; makefile: 342; xml: 292; perl: 37
file content (48 lines) | stat: -rw-r--r-- 1,376 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
puts "========"
puts "OCC25514"
puts "========"
puts ""
#########################################################################################
# TKernel, OSD_Timer - do not accumulate error in timer within queries in running state
#########################################################################################

# Set number of cycle iteration
set IterationCount 10000
set iCounter 1

# Set rank of timer's value
set TimeRank 2

# Start timers
dchrono bug_info_1 reset
dchrono bug_info_2 reset
dchrono bug_info_1 start
dchrono bug_info_2 start

# Operation cycle (show only one timer state)
while {$iCounter != $IterationCount} {
  dchrono bug_info_1 show
  set iCounter [expr {$iCounter + 1}]
}

# Stop timers
dchrono bug_info_1 stop
dchrono bug_info_2 stop

# Get timers value
set Timer_1 [dchrono bug_info_1 show]
set Timer_2 [dchrono bug_info_2 show]

# Modify timers value for comparison
set TimerValue_1 [lindex $Timer_1 6]
set TimerValue_1 [string range $TimerValue_1 0 [expr {[string first "." $TimerValue_1] + $TimeRank}]]
set TimerValue_2 [lindex $Timer_2 6]
set TimerValue_2 [string range $TimerValue_2 0 [expr {[string first "." $TimerValue_2] + $TimeRank}]]

# Comparison of timer's values
puts "Compare: [lindex $Timer_1 6] vs [lindex $Timer_2 6]"
if {$TimerValue_1 != $TimerValue_2} {
  puts "ERROR: OCC25514 is reproduced."
} else {
  puts "OK"
}