[PATCH] pi-futex: rt mutex tester
[safe/jmp/linux-2.6] / scripts / rt-tester / t3-l1-pi-steal.tst
1 #
2 # rt-mutex test
3 #
4 # Op: C(ommand)/T(est)/W(ait)
5 # |  opcode
6 # |  |     threadid: 0-7
7 # |  |     |  opcode argument
8 # |  |     |  |
9 # C: lock: 0: 0
10 #
11 # Commands
12 #
13 # opcode        opcode argument
14 # schedother    nice value
15 # schedfifo     priority
16 # lock          lock nr (0-7)
17 # locknowait    lock nr (0-7)
18 # lockint       lock nr (0-7)
19 # lockintnowait lock nr (0-7)
20 # lockcont      lock nr (0-7)
21 # unlock        lock nr (0-7)
22 # lockbkl       lock nr (0-7)
23 # unlockbkl     lock nr (0-7)
24 # signal        thread to signal (0-7)
25 # reset         0
26 # resetevent    0
27 #
28 # Tests / Wait
29 #
30 # opcode        opcode argument
31 #
32 # prioeq        priority
33 # priolt        priority
34 # priogt        priority
35 # nprioeq       normal priority
36 # npriolt       normal priority
37 # npriogt       normal priority
38 # locked        lock nr (0-7)
39 # blocked       lock nr (0-7)
40 # blockedwake   lock nr (0-7)
41 # unlocked      lock nr (0-7)
42 # lockedbkl     dont care
43 # blockedbkl    dont care
44 # unlockedbkl   dont care
45 # opcodeeq      command opcode or number
46 # opcodelt      number
47 # opcodegt      number
48 # eventeq       number
49 # eventgt       number
50 # eventlt       number
51
52 #
53 # 3 threads 1 lock PI steal pending ownership
54 #
55 C: resetevent:          0:      0
56 W: opcodeeq:            0:      0
57
58 # Set schedulers
59 C: schedother:          0:      0
60 W: opcodeeq:            0:      0
61 C: schedfifo:           1:      80
62 W: opcodeeq:            1:      0
63 C: schedfifo:           2:      81
64 W: opcodeeq:            2:      0
65
66 # T0 lock L0
67 C: lock:                0:      0
68 W: locked:              0:      0
69
70 # T1 lock L0
71 C: lock:                1:      0
72 W: blocked:             1:      0
73 T: prioeq:              0:      80
74
75 # T0 unlock L0
76 C: unlock:              0:      0
77
78 # Wait until T1 is in the wakeup loop
79 W: blockedwake:         1:      0
80 T: priolt:              0:      1
81
82 # T2 lock L0
83 C: lock:                2:      0
84 # T1 leave wakeup loop
85 C: lockcont:            1:      0
86
87 # T2 must have the lock and T1 must be blocked
88 W: locked:              2:      0
89 W: blocked:             1:      0
90
91 # T2 unlock L0
92 C: unlock:              2:      0
93
94 # Wait until T1 is in the wakeup loop and let it run
95 W: blockedwake:         1:      0
96 C: lockcont:            1:      0
97 W: locked:              1:      0
98 C: unlock:              1:      0
99 W: unlocked:            1:      0