diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2006-06-27 05:54:56 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-27 20:32:47 -0400 |
commit | 61a87122869b6340a63b6f9f84097d3688604b90 (patch) | |
tree | 11d60d29763a42abd66453a920cc06bebc852427 /scripts | |
parent | e7eebaf6a81b956c989f184ee4b27277c88f8afe (diff) |
[PATCH] pi-futex: rt mutex tester
RT-mutex tester: scriptable tester for rt mutexes, which allows userspace
scripting of mutex unit-tests (and dynamic tests as well), using the actual
rt-mutex implementation of the kernel.
[akpm@osdl.org: fixlet]
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/rt-tester/check-all.sh | 21 | ||||
-rw-r--r-- | scripts/rt-tester/rt-tester.py | 222 | ||||
-rw-r--r-- | scripts/rt-tester/t2-l1-2rt-sameprio.tst | 101 | ||||
-rw-r--r-- | scripts/rt-tester/t2-l1-pi.tst | 84 | ||||
-rw-r--r-- | scripts/rt-tester/t2-l1-signal.tst | 79 | ||||
-rw-r--r-- | scripts/rt-tester/t2-l2-2rt-deadlock.tst | 91 | ||||
-rw-r--r-- | scripts/rt-tester/t3-l1-pi-1rt.tst | 95 | ||||
-rw-r--r-- | scripts/rt-tester/t3-l1-pi-2rt.tst | 96 | ||||
-rw-r--r-- | scripts/rt-tester/t3-l1-pi-3rt.tst | 95 | ||||
-rw-r--r-- | scripts/rt-tester/t3-l1-pi-signal.tst | 101 | ||||
-rw-r--r-- | scripts/rt-tester/t3-l1-pi-steal.tst | 99 | ||||
-rw-r--r-- | scripts/rt-tester/t3-l2-pi.tst | 95 | ||||
-rw-r--r-- | scripts/rt-tester/t4-l2-pi-deboost.tst | 127 | ||||
-rw-r--r-- | scripts/rt-tester/t5-l4-pi-boost-deboost.tst | 148 |
14 files changed, 1454 insertions, 0 deletions
diff --git a/scripts/rt-tester/check-all.sh b/scripts/rt-tester/check-all.sh new file mode 100644 index 000000000000..ac45c3e65a35 --- /dev/null +++ b/scripts/rt-tester/check-all.sh | |||
@@ -0,0 +1,21 @@ | |||
1 | |||
2 | |||
3 | function testit () | ||
4 | { | ||
5 | printf "%-30s: " $1 | ||
6 | ./rt-tester.py $1 | grep Pass | ||
7 | } | ||
8 | |||
9 | testit t2-l1-2rt-sameprio.tst | ||
10 | testit t2-l1-pi.tst | ||
11 | testit t2-l1-signal.tst | ||
12 | #testit t2-l2-2rt-deadlock.tst | ||
13 | testit t3-l1-pi-1rt.tst | ||
14 | testit t3-l1-pi-2rt.tst | ||
15 | testit t3-l1-pi-3rt.tst | ||
16 | testit t3-l1-pi-signal.tst | ||
17 | testit t3-l1-pi-steal.tst | ||
18 | testit t3-l2-pi.tst | ||
19 | testit t4-l2-pi-deboost.tst | ||
20 | testit t5-l4-pi-boost-deboost.tst | ||
21 | |||
diff --git a/scripts/rt-tester/rt-tester.py b/scripts/rt-tester/rt-tester.py new file mode 100644 index 000000000000..4c79660793cf --- /dev/null +++ b/scripts/rt-tester/rt-tester.py | |||
@@ -0,0 +1,222 @@ | |||
1 | #!/usr/bin/env python | ||
2 | # | ||
3 | # rt-mutex tester | ||
4 | # | ||
5 | # (C) 2006 Thomas Gleixner <tglx@linutronix.de> | ||
6 | # | ||
7 | # This program is free software; you can redistribute it and/or modify | ||
8 | # it under the terms of the GNU General Public License version 2 as | ||
9 | # published by the Free Software Foundation. | ||
10 | # | ||
11 | import os | ||
12 | import sys | ||
13 | import getopt | ||
14 | import shutil | ||
15 | import string | ||
16 | |||
17 | # Globals | ||
18 | quiet = 0 | ||
19 | test = 0 | ||
20 | comments = 0 | ||
21 | |||
22 | sysfsprefix = "/sys/devices/system/rttest/rttest" | ||
23 | statusfile = "/status" | ||
24 | commandfile = "/command" | ||
25 | |||
26 | # Command opcodes | ||
27 | cmd_opcodes = { | ||
28 | "schedother" : "1", | ||
29 | "schedfifo" : "2", | ||
30 | "lock" : "3", | ||
31 | "locknowait" : "4", | ||
32 | "lockint" : "5", | ||
33 | "lockintnowait" : "6", | ||
34 | "lockcont" : "7", | ||
35 | "unlock" : "8", | ||
36 | "lockbkl" : "9", | ||
37 | "unlockbkl" : "10", | ||
38 | "signal" : "11", | ||
39 | "resetevent" : "98", | ||
40 | "reset" : "99", | ||
41 | } | ||
42 | |||
43 | test_opcodes = { | ||
44 | "prioeq" : ["P" , "eq" , None], | ||
45 | "priolt" : ["P" , "lt" , None], | ||
46 | "priogt" : ["P" , "gt" , None], | ||
47 | "nprioeq" : ["N" , "eq" , None], | ||
48 | "npriolt" : ["N" , "lt" , None], | ||
49 | "npriogt" : ["N" , "gt" , None], | ||
50 | "unlocked" : ["M" , "eq" , 0], | ||
51 | "trylock" : ["M" , "eq" , 1], | ||
52 | "blocked" : ["M" , "eq" , 2], | ||
53 | "blockedwake" : ["M" , "eq" , 3], | ||
54 | "locked" : ["M" , "eq" , 4], | ||
55 | "opcodeeq" : ["O" , "eq" , None], | ||
56 | "opcodelt" : ["O" , "lt" , None], | ||
57 | "opcodegt" : ["O" , "gt" , None], | ||
58 | "eventeq" : ["E" , "eq" , None], | ||
59 | "eventlt" : ["E" , "lt" , None], | ||
60 | "eventgt" : ["E" , "gt" , None], | ||
61 | } | ||
62 | |||
63 | # Print usage information | ||
64 | def usage(): | ||
65 | print "rt-tester.py <-c -h -q -t> <testfile>" | ||
66 | print " -c display comments after first command" | ||
67 | print " -h help" | ||
68 | print " -q quiet mode" | ||
69 | print " -t test mode (syntax check)" | ||
70 | print " testfile: read test specification from testfile" | ||
71 | print " otherwise from stdin" | ||
72 | return | ||
73 | |||
74 | # Print progress when not in quiet mode | ||
75 | def progress(str): | ||
76 | if not quiet: | ||
77 | print str | ||
78 | |||
79 | # Analyse a status value | ||
80 | def analyse(val, top, arg): | ||
81 | |||
82 | intval = int(val) | ||
83 | |||
84 | if top[0] == "M": | ||
85 | intval = intval / (10 ** int(arg)) | ||
86 | intval = intval % 10 | ||
87 | argval = top[2] | ||
88 | elif top[0] == "O": | ||
89 | argval = int(cmd_opcodes.get(arg, arg)) | ||
90 | else: | ||
91 | argval = int(arg) | ||
92 | |||
93 | # progress("%d %s %d" %(intval, top[1], argval)) | ||
94 | |||
95 | if top[1] == "eq" and intval == argval: | ||
96 | return 1 | ||
97 | if top[1] == "lt" and intval < argval: | ||
98 | return 1 | ||
99 | if top[1] == "gt" and intval > argval: | ||
100 | return 1 | ||
101 | return 0 | ||
102 | |||
103 | # Parse the commandline | ||
104 | try: | ||
105 | (options, arguments) = getopt.getopt(sys.argv[1:],'chqt') | ||
106 | except getopt.GetoptError, ex: | ||
107 | usage() | ||
108 | sys.exit(1) | ||
109 | |||
110 | # Parse commandline options | ||
111 | for option, value in options: | ||
112 | if option == "-c": | ||
113 | comments = 1 | ||
114 | elif option == "-q": | ||
115 | quiet = 1 | ||
116 | elif option == "-t": | ||
117 | test = 1 | ||
118 | elif option == '-h': | ||
119 | usage() | ||
120 | sys.exit(0) | ||
121 | |||
122 | # Select the input source | ||
123 | if arguments: | ||
124 | try: | ||
125 | fd = open(arguments[0]) | ||
126 | except Exception,ex: | ||
127 | sys.stderr.write("File not found %s\n" %(arguments[0])) | ||
128 | sys.exit(1) | ||
129 | else: | ||
130 | fd = sys.stdin | ||
131 | |||
132 | linenr = 0 | ||
133 | |||
134 | # Read the test patterns | ||
135 | while 1: | ||
136 | |||
137 | linenr = linenr + 1 | ||
138 | line = fd.readline() | ||
139 | if not len(line): | ||
140 | break | ||
141 | |||
142 | line = line.strip() | ||
143 | parts = line.split(":") | ||
144 | |||
145 | if not parts or len(parts) < 1: | ||
146 | continue | ||
147 | |||
148 | if len(parts[0]) == 0: | ||
149 | continue | ||
150 | |||
151 | if parts[0].startswith("#"): | ||
152 | if comments > 1: | ||
153 | progress(line) | ||
154 | continue | ||
155 | |||
156 | if comments == 1: | ||
157 | comments = 2 | ||
158 | |||
159 | progress(line) | ||
160 | |||
161 | cmd = parts[0].strip().lower() | ||
162 | opc = parts[1].strip().lower() | ||
163 | tid = parts[2].strip() | ||
164 | dat = parts[3].strip() | ||
165 | |||
166 | try: | ||
167 | # Test or wait for a status value | ||
168 | if cmd == "t" or cmd == "w": | ||
169 | testop = test_opcodes[opc] | ||
170 | |||
171 | fname = "%s%s%s" %(sysfsprefix, tid, statusfile) | ||
172 | if test: | ||
173 | print fname | ||
174 | continue | ||
175 | |||
176 | while 1: | ||
177 | query = 1 | ||
178 | fsta = open(fname, 'r') | ||
179 | status = fsta.readline().strip() | ||
180 | fsta.close() | ||
181 | stat = status.split(",") | ||
182 | for s in stat: | ||
183 | s = s.strip() | ||
184 | if s.startswith(testop[0]): | ||
185 | # Seperate status value | ||
186 | val = s[2:].strip() | ||
187 | query = analyse(val, testop, dat) | ||
188 | break | ||
189 | if query or cmd == "t": | ||
190 | break | ||
191 | |||
192 | progress(" " + status) | ||
193 | |||
194 | if not query: | ||
195 | sys.stderr.write("Test failed in line %d\n" %(linenr)) | ||
196 | sys.exit(1) | ||
197 | |||
198 | # Issue a command to the tester | ||
199 | elif cmd == "c": | ||
200 | cmdnr = cmd_opcodes[opc] | ||
201 | # Build command string and sys filename | ||
202 | cmdstr = "%s:%s" %(cmdnr, dat) | ||
203 | fname = "%s%s%s" %(sysfsprefix, tid, commandfile) | ||
204 | if test: | ||
205 | print fname | ||
206 | continue | ||
207 | fcmd = open(fname, 'w') | ||
208 | fcmd.write(cmdstr) | ||
209 | fcmd.close() | ||
210 | |||
211 | except Exception,ex: | ||
212 | sys.stderr.write(str(ex)) | ||
213 | sys.stderr.write("\nSyntax error in line %d\n" %(linenr)) | ||
214 | if not test: | ||
215 | fd.close() | ||
216 | sys.exit(1) | ||
217 | |||
218 | # Normal exit pass | ||
219 | print "Pass" | ||
220 | sys.exit(0) | ||
221 | |||
222 | |||
diff --git a/scripts/rt-tester/t2-l1-2rt-sameprio.tst b/scripts/rt-tester/t2-l1-2rt-sameprio.tst new file mode 100644 index 000000000000..a2b6f2aae755 --- /dev/null +++ b/scripts/rt-tester/t2-l1-2rt-sameprio.tst | |||
@@ -0,0 +1,101 @@ | |||
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 0 | ||
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 | # 2 threads 1 lock | ||
54 | # | ||
55 | C: resetevent: 0: 0 | ||
56 | W: opcodeeq: 0: 0 | ||
57 | |||
58 | # Set schedulers | ||
59 | C: schedfifo: 0: 80 | ||
60 | W: opcodeeq: 0: 0 | ||
61 | C: schedfifo: 1: 80 | ||
62 | W: opcodeeq: 1: 0 | ||
63 | |||
64 | # T0 lock L0 | ||
65 | C: locknowait: 0: 0 | ||
66 | C: locknowait: 1: 0 | ||
67 | W: locked: 0: 0 | ||
68 | W: blocked: 1: 0 | ||
69 | T: prioeq: 0: 80 | ||
70 | |||
71 | # T0 unlock L0 | ||
72 | C: unlock: 0: 0 | ||
73 | W: locked: 1: 0 | ||
74 | |||
75 | # Verify T0 | ||
76 | W: unlocked: 0: 0 | ||
77 | T: prioeq: 0: 80 | ||
78 | |||
79 | # Unlock | ||
80 | C: unlock: 1: 0 | ||
81 | W: unlocked: 1: 0 | ||
82 | |||
83 | # T1,T0 lock L0 | ||
84 | C: locknowait: 1: 0 | ||
85 | C: locknowait: 0: 0 | ||
86 | W: locked: 1: 0 | ||
87 | W: blocked: 0: 0 | ||
88 | T: prioeq: 1: 80 | ||
89 | |||
90 | # T1 unlock L0 | ||
91 | C: unlock: 1: 0 | ||
92 | W: locked: 0: 0 | ||
93 | |||
94 | # Verify T1 | ||
95 | W: unlocked: 1: 0 | ||
96 | T: prioeq: 1: 80 | ||
97 | |||
98 | # Unlock and exit | ||
99 | C: unlock: 0: 0 | ||
100 | W: unlocked: 0: 0 | ||
101 | |||
diff --git a/scripts/rt-tester/t2-l1-pi.tst b/scripts/rt-tester/t2-l1-pi.tst new file mode 100644 index 000000000000..aa4c8940acd6 --- /dev/null +++ b/scripts/rt-tester/t2-l1-pi.tst | |||
@@ -0,0 +1,84 @@ | |||
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 0 | ||
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 | # 2 threads 1 lock with priority inversion | ||
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 | |||
64 | # T0 lock L0 | ||
65 | C: locknowait: 0: 0 | ||
66 | W: locked: 0: 0 | ||
67 | |||
68 | # T1 lock L0 | ||
69 | C: locknowait: 1: 0 | ||
70 | W: blocked: 1: 0 | ||
71 | T: prioeq: 0: 80 | ||
72 | |||
73 | # T0 unlock L0 | ||
74 | C: unlock: 0: 0 | ||
75 | W: locked: 1: 0 | ||
76 | |||
77 | # Verify T1 | ||
78 | W: unlocked: 0: 0 | ||
79 | T: priolt: 0: 1 | ||
80 | |||
81 | # Unlock and exit | ||
82 | C: unlock: 1: 0 | ||
83 | W: unlocked: 1: 0 | ||
84 | |||
diff --git a/scripts/rt-tester/t2-l1-signal.tst b/scripts/rt-tester/t2-l1-signal.tst new file mode 100644 index 000000000000..c47ba06af209 --- /dev/null +++ b/scripts/rt-tester/t2-l1-signal.tst | |||
@@ -0,0 +1,79 @@ | |||
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 0 | ||
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 | # 2 threads 1 lock with priority inversion | ||
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: schedother: 1: 0 | ||
62 | W: opcodeeq: 1: 0 | ||
63 | |||
64 | # T0 lock L0 | ||
65 | C: locknowait: 0: 0 | ||
66 | W: locked: 0: 0 | ||
67 | |||
68 | # T1 lock L0 | ||
69 | C: lockintnowait: 1: 0 | ||
70 | W: blocked: 1: 0 | ||
71 | |||
72 | # Interrupt T1 | ||
73 | C: signal: 1: 0 | ||
74 | W: unlocked: 1: 0 | ||
75 | T: opcodeeq: 1: -4 | ||
76 | |||
77 | # Unlock and exit | ||
78 | C: unlock: 0: 0 | ||
79 | W: unlocked: 0: 0 | ||
diff --git a/scripts/rt-tester/t2-l2-2rt-deadlock.tst b/scripts/rt-tester/t2-l2-2rt-deadlock.tst new file mode 100644 index 000000000000..0cee476b206e --- /dev/null +++ b/scripts/rt-tester/t2-l2-2rt-deadlock.tst | |||
@@ -0,0 +1,91 @@ | |||
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 0 | ||
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 | # 2 threads 2 lock | ||
54 | # | ||
55 | C: resetevent: 0: 0 | ||
56 | W: opcodeeq: 0: 0 | ||
57 | |||
58 | # Set schedulers | ||
59 | C: schedfifo: 0: 80 | ||
60 | W: opcodeeq: 0: 0 | ||
61 | C: schedfifo: 1: 80 | ||
62 | W: opcodeeq: 1: 0 | ||
63 | |||
64 | # T0 lock L0 | ||
65 | C: locknowait: 0: 0 | ||
66 | W: locked: 0: 0 | ||
67 | |||
68 | # T1 lock L1 | ||
69 | C: locknowait: 1: 1 | ||
70 | W: locked: 1: 1 | ||
71 | |||
72 | # T0 lock L1 | ||
73 | C: lockintnowait: 0: 1 | ||
74 | W: blocked: 0: 1 | ||
75 | |||
76 | # T1 lock L0 | ||
77 | C: lockintnowait: 1: 0 | ||
78 | W: blocked: 1: 0 | ||
79 | |||
80 | # Make deadlock go away | ||
81 | C: signal: 1: 0 | ||
82 | W: unlocked: 1: 0 | ||
83 | C: signal: 0: 0 | ||
84 | W: unlocked: 0: 1 | ||
85 | |||
86 | # Unlock and exit | ||
87 | C: unlock: 0: 0 | ||
88 | W: unlocked: 0: 0 | ||
89 | C: unlock: 1: 1 | ||
90 | W: unlocked: 1: 1 | ||
91 | |||
diff --git a/scripts/rt-tester/t3-l1-pi-1rt.tst b/scripts/rt-tester/t3-l1-pi-1rt.tst new file mode 100644 index 000000000000..a5eaf7ed5d54 --- /dev/null +++ b/scripts/rt-tester/t3-l1-pi-1rt.tst | |||
@@ -0,0 +1,95 @@ | |||
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 | ||
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: schedother: 1: 0 | ||
62 | W: opcodeeq: 1: 0 | ||
63 | C: schedfifo: 2: 82 | ||
64 | W: opcodeeq: 2: 0 | ||
65 | |||
66 | # T0 lock L0 | ||
67 | C: locknowait: 0: 0 | ||
68 | W: locked: 0: 0 | ||
69 | |||
70 | # T1 lock L0 | ||
71 | C: locknowait: 1: 0 | ||
72 | W: blocked: 1: 0 | ||
73 | T: priolt: 0: 1 | ||
74 | |||
75 | # T2 lock L0 | ||
76 | C: locknowait: 2: 0 | ||
77 | W: blocked: 2: 0 | ||
78 | T: prioeq: 0: 82 | ||
79 | |||
80 | # T0 unlock L0 | ||
81 | C: unlock: 0: 0 | ||
82 | |||
83 | # Wait until T2 got the lock | ||
84 | W: locked: 2: 0 | ||
85 | W: unlocked: 0: 0 | ||
86 | T: priolt: 0: 1 | ||
87 | |||
88 | # T2 unlock L0 | ||
89 | C: unlock: 2: 0 | ||
90 | |||
91 | W: unlocked: 2: 0 | ||
92 | W: locked: 1: 0 | ||
93 | |||
94 | C: unlock: 1: 0 | ||
95 | W: unlocked: 1: 0 | ||
diff --git a/scripts/rt-tester/t3-l1-pi-2rt.tst b/scripts/rt-tester/t3-l1-pi-2rt.tst new file mode 100644 index 000000000000..c622391a8afe --- /dev/null +++ b/scripts/rt-tester/t3-l1-pi-2rt.tst | |||
@@ -0,0 +1,96 @@ | |||
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 | ||
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: 81 | ||
62 | W: opcodeeq: 1: 0 | ||
63 | C: schedfifo: 2: 82 | ||
64 | W: opcodeeq: 2: 0 | ||
65 | |||
66 | # T0 lock L0 | ||
67 | C: locknowait: 0: 0 | ||
68 | W: locked: 0: 0 | ||
69 | |||
70 | # T1 lock L0 | ||
71 | C: locknowait: 1: 0 | ||
72 | W: blocked: 1: 0 | ||
73 | T: prioeq: 0: 81 | ||
74 | |||
75 | # T2 lock L0 | ||
76 | C: locknowait: 2: 0 | ||
77 | W: blocked: 2: 0 | ||
78 | T: prioeq: 0: 82 | ||
79 | T: prioeq: 1: 81 | ||
80 | |||
81 | # T0 unlock L0 | ||
82 | C: unlock: 0: 0 | ||
83 | |||
84 | # Wait until T2 got the lock | ||
85 | W: locked: 2: 0 | ||
86 | W: unlocked: 0: 0 | ||
87 | T: priolt: 0: 1 | ||
88 | |||
89 | # T2 unlock L0 | ||
90 | C: unlock: 2: 0 | ||
91 | |||
92 | W: unlocked: 2: 0 | ||
93 | W: locked: 1: 0 | ||
94 | |||
95 | C: unlock: 1: 0 | ||
96 | W: unlocked: 1: 0 | ||
diff --git a/scripts/rt-tester/t3-l1-pi-3rt.tst b/scripts/rt-tester/t3-l1-pi-3rt.tst new file mode 100644 index 000000000000..b5057fb13e09 --- /dev/null +++ b/scripts/rt-tester/t3-l1-pi-3rt.tst | |||
@@ -0,0 +1,95 @@ | |||
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 | ||
54 | # | ||
55 | C: resetevent: 0: 0 | ||
56 | W: opcodeeq: 0: 0 | ||
57 | |||
58 | # Set schedulers | ||
59 | C: schedfifo: 0: 80 | ||
60 | W: opcodeeq: 0: 0 | ||
61 | C: schedfifo: 1: 81 | ||
62 | W: opcodeeq: 1: 0 | ||
63 | C: schedfifo: 2: 82 | ||
64 | W: opcodeeq: 2: 0 | ||
65 | |||
66 | # T0 lock L0 | ||
67 | C: locknowait: 0: 0 | ||
68 | W: locked: 0: 0 | ||
69 | |||
70 | # T1 lock L0 | ||
71 | C: locknowait: 1: 0 | ||
72 | W: blocked: 1: 0 | ||
73 | T: prioeq: 0: 81 | ||
74 | |||
75 | # T2 lock L0 | ||
76 | C: locknowait: 2: 0 | ||
77 | W: blocked: 2: 0 | ||
78 | T: prioeq: 0: 82 | ||
79 | |||
80 | # T0 unlock L0 | ||
81 | C: unlock: 0: 0 | ||
82 | |||
83 | # Wait until T2 got the lock | ||
84 | W: locked: 2: 0 | ||
85 | W: unlocked: 0: 0 | ||
86 | T: prioeq: 0: 80 | ||
87 | |||
88 | # T2 unlock L0 | ||
89 | C: unlock: 2: 0 | ||
90 | |||
91 | W: locked: 1: 0 | ||
92 | W: unlocked: 2: 0 | ||
93 | |||
94 | C: unlock: 1: 0 | ||
95 | W: unlocked: 1: 0 | ||
diff --git a/scripts/rt-tester/t3-l1-pi-signal.tst b/scripts/rt-tester/t3-l1-pi-signal.tst new file mode 100644 index 000000000000..3e427daa33ff --- /dev/null +++ b/scripts/rt-tester/t3-l1-pi-signal.tst | |||
@@ -0,0 +1,101 @@ | |||
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 | # Reset event counter | ||
53 | C: resetevent: 0: 0 | ||
54 | W: opcodeeq: 0: 0 | ||
55 | |||
56 | # Set priorities | ||
57 | C: schedother: 0: 0 | ||
58 | W: opcodeeq: 0: 0 | ||
59 | C: schedfifo: 1: 80 | ||
60 | W: opcodeeq: 1: 0 | ||
61 | C: schedfifo: 2: 81 | ||
62 | W: opcodeeq: 2: 0 | ||
63 | |||
64 | # T0 lock L0 | ||
65 | C: lock: 0: 0 | ||
66 | W: locked: 0: 0 | ||
67 | |||
68 | # T1 lock L0, no wait in the wakeup path | ||
69 | C: locknowait: 1: 0 | ||
70 | W: blocked: 1: 0 | ||
71 | T: prioeq: 0: 80 | ||
72 | T: prioeq: 1: 80 | ||
73 | |||
74 | # T2 lock L0 interruptible, no wait in the wakeup path | ||
75 | C: lockintnowait: 2: 0 | ||
76 | W: blocked: 2: 0 | ||
77 | T: prioeq: 0: 81 | ||
78 | T: prioeq: 1: 80 | ||
79 | |||
80 | # Interrupt T2 | ||
81 | C: signal: 2: 2 | ||
82 | W: unlocked: 2: 0 | ||
83 | T: prioeq: 1: 80 | ||
84 | T: prioeq: 0: 80 | ||
85 | |||
86 | T: locked: 0: 0 | ||
87 | T: blocked: 1: 0 | ||
88 | |||
89 | # T0 unlock L0 | ||
90 | C: unlock: 0: 0 | ||
91 | |||
92 | # Wait until T1 has locked L0 and exit | ||
93 | W: locked: 1: 0 | ||
94 | W: unlocked: 0: 0 | ||
95 | T: priolt: 0: 1 | ||
96 | |||
97 | C: unlock: 1: 0 | ||
98 | W: unlocked: 1: 0 | ||
99 | |||
100 | |||
101 | |||
diff --git a/scripts/rt-tester/t3-l1-pi-steal.tst b/scripts/rt-tester/t3-l1-pi-steal.tst new file mode 100644 index 000000000000..72c24a9e4be4 --- /dev/null +++ b/scripts/rt-tester/t3-l1-pi-steal.tst | |||
@@ -0,0 +1,99 @@ | |||
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 | ||
diff --git a/scripts/rt-tester/t3-l2-pi.tst b/scripts/rt-tester/t3-l2-pi.tst new file mode 100644 index 000000000000..2ba0dced48fa --- /dev/null +++ b/scripts/rt-tester/t3-l2-pi.tst | |||
@@ -0,0 +1,95 @@ | |||
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 2 lock PI | ||
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: schedother: 1: 0 | ||
62 | W: opcodeeq: 1: 0 | ||
63 | C: schedfifo: 2: 82 | ||
64 | W: opcodeeq: 2: 0 | ||
65 | |||
66 | # T0 lock L0 | ||
67 | C: locknowait: 0: 0 | ||
68 | W: locked: 0: 0 | ||
69 | |||
70 | # T1 lock L0 | ||
71 | C: locknowait: 1: 0 | ||
72 | W: blocked: 1: 0 | ||
73 | T: priolt: 0: 1 | ||
74 | |||
75 | # T2 lock L0 | ||
76 | C: locknowait: 2: 0 | ||
77 | W: blocked: 2: 0 | ||
78 | T: prioeq: 0: 82 | ||
79 | |||
80 | # T0 unlock L0 | ||
81 | C: unlock: 0: 0 | ||
82 | |||
83 | # Wait until T2 got the lock | ||
84 | W: locked: 2: 0 | ||
85 | W: unlocked: 0: 0 | ||
86 | T: priolt: 0: 1 | ||
87 | |||
88 | # T2 unlock L0 | ||
89 | C: unlock: 2: 0 | ||
90 | |||
91 | W: unlocked: 2: 0 | ||
92 | W: locked: 1: 0 | ||
93 | |||
94 | C: unlock: 1: 0 | ||
95 | W: unlocked: 1: 0 | ||
diff --git a/scripts/rt-tester/t4-l2-pi-deboost.tst b/scripts/rt-tester/t4-l2-pi-deboost.tst new file mode 100644 index 000000000000..01f1a80fa02a --- /dev/null +++ b/scripts/rt-tester/t4-l2-pi-deboost.tst | |||
@@ -0,0 +1,127 @@ | |||
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 | # 4 threads 2 lock PI | ||
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: schedother: 1: 0 | ||
62 | W: opcodeeq: 1: 0 | ||
63 | C: schedfifo: 2: 82 | ||
64 | W: opcodeeq: 2: 0 | ||
65 | C: schedfifo: 3: 83 | ||
66 | W: opcodeeq: 3: 0 | ||
67 | |||
68 | # T0 lock L0 | ||
69 | C: locknowait: 0: 0 | ||
70 | W: locked: 0: 0 | ||
71 | |||
72 | # T1 lock L1 | ||
73 | C: locknowait: 1: 1 | ||
74 | W: locked: 1: 1 | ||
75 | |||
76 | # T3 lock L0 | ||
77 | C: lockintnowait: 3: 0 | ||
78 | W: blocked: 3: 0 | ||
79 | T: prioeq: 0: 83 | ||
80 | |||
81 | # T0 lock L1 | ||
82 | C: lock: 0: 1 | ||
83 | W: blocked: 0: 1 | ||
84 | T: prioeq: 1: 83 | ||
85 | |||
86 | # T1 unlock L1 | ||
87 | C: unlock: 1: 1 | ||
88 | |||
89 | # Wait until T0 is in the wakeup code | ||
90 | W: blockedwake: 0: 1 | ||
91 | |||
92 | # Verify that T1 is unboosted | ||
93 | W: unlocked: 1: 1 | ||
94 | T: priolt: 1: 1 | ||
95 | |||
96 | # T2 lock L1 (T0 is boosted and pending owner !) | ||
97 | C: locknowait: 2: 1 | ||
98 | W: blocked: 2: 1 | ||
99 | T: prioeq: 0: 83 | ||
100 | |||
101 | # Interrupt T3 and wait until T3 returned | ||
102 | C: signal: 3: 0 | ||
103 | W: unlocked: 3: 0 | ||
104 | |||
105 | # Verify prio of T0 (still pending owner, | ||
106 | # but T2 is enqueued due to the previous boost by T3 | ||
107 | T: prioeq: 0: 82 | ||
108 | |||
109 | # Let T0 continue | ||
110 | C: lockcont: 0: 1 | ||
111 | W: locked: 0: 1 | ||
112 | |||
113 | # Unlock L1 and let T2 get L1 | ||
114 | C: unlock: 0: 1 | ||
115 | W: locked: 2: 1 | ||
116 | |||
117 | # Verify that T0 is unboosted | ||
118 | W: unlocked: 0: 1 | ||
119 | T: priolt: 0: 1 | ||
120 | |||
121 | # Unlock everything and exit | ||
122 | C: unlock: 2: 1 | ||
123 | W: unlocked: 2: 1 | ||
124 | |||
125 | C: unlock: 0: 0 | ||
126 | W: unlocked: 0: 0 | ||
127 | |||
diff --git a/scripts/rt-tester/t5-l4-pi-boost-deboost.tst b/scripts/rt-tester/t5-l4-pi-boost-deboost.tst new file mode 100644 index 000000000000..efa0788c1189 --- /dev/null +++ b/scripts/rt-tester/t5-l4-pi-boost-deboost.tst | |||
@@ -0,0 +1,148 @@ | |||
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 | # 5 threads 4 lock PI | ||
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: 81 | ||
62 | W: opcodeeq: 1: 0 | ||
63 | C: schedfifo: 2: 82 | ||
64 | W: opcodeeq: 2: 0 | ||
65 | C: schedfifo: 3: 83 | ||
66 | W: opcodeeq: 3: 0 | ||
67 | C: schedfifo: 4: 84 | ||
68 | W: opcodeeq: 4: 0 | ||
69 | |||
70 | # T0 lock L0 | ||
71 | C: locknowait: 0: 0 | ||
72 | W: locked: 0: 0 | ||
73 | |||
74 | # T1 lock L1 | ||
75 | C: locknowait: 1: 1 | ||
76 | W: locked: 1: 1 | ||
77 | |||
78 | # T1 lock L0 | ||
79 | C: lockintnowait: 1: 0 | ||
80 | W: blocked: 1: 0 | ||
81 | T: prioeq: 0: 81 | ||
82 | |||
83 | # T2 lock L2 | ||
84 | C: locknowait: 2: 2 | ||
85 | W: locked: 2: 2 | ||
86 | |||
87 | # T2 lock L1 | ||
88 | C: lockintnowait: 2: 1 | ||
89 | W: blocked: 2: 1 | ||
90 | T: prioeq: 0: 82 | ||
91 | T: prioeq: 1: 82 | ||
92 | |||
93 | # T3 lock L3 | ||
94 | C: locknowait: 3: 3 | ||
95 | W: locked: 3: 3 | ||
96 | |||
97 | # T3 lock L2 | ||
98 | C: lockintnowait: 3: 2 | ||
99 | W: blocked: 3: 2 | ||
100 | T: prioeq: 0: 83 | ||
101 | T: prioeq: 1: 83 | ||
102 | T: prioeq: 2: 83 | ||
103 | |||
104 | # T4 lock L3 | ||
105 | C: lockintnowait: 4: 3 | ||
106 | W: blocked: 4: 3 | ||
107 | T: prioeq: 0: 84 | ||
108 | T: prioeq: 1: 84 | ||
109 | T: prioeq: 2: 84 | ||
110 | T: prioeq: 3: 84 | ||
111 | |||
112 | # Signal T4 | ||
113 | C: signal: 4: 0 | ||
114 | W: unlocked: 4: 3 | ||
115 | T: prioeq: 0: 83 | ||
116 | T: prioeq: 1: 83 | ||
117 | T: prioeq: 2: 83 | ||
118 | T: prioeq: 3: 83 | ||
119 | |||
120 | # Signal T3 | ||
121 | C: signal: 3: 0 | ||
122 | W: unlocked: 3: 2 | ||
123 | T: prioeq: 0: 82 | ||
124 | T: prioeq: 1: 82 | ||
125 | T: prioeq: 2: 82 | ||
126 | |||
127 | # Signal T2 | ||
128 | C: signal: 2: 0 | ||
129 | W: unlocked: 2: 1 | ||
130 | T: prioeq: 0: 81 | ||
131 | T: prioeq: 1: 81 | ||
132 | |||
133 | # Signal T1 | ||
134 | C: signal: 1: 0 | ||
135 | W: unlocked: 1: 0 | ||
136 | T: priolt: 0: 1 | ||
137 | |||
138 | # Unlock and exit | ||
139 | C: unlock: 3: 3 | ||
140 | C: unlock: 2: 2 | ||
141 | C: unlock: 1: 1 | ||
142 | C: unlock: 0: 0 | ||
143 | |||
144 | W: unlocked: 3: 3 | ||
145 | W: unlocked: 2: 2 | ||
146 | W: unlocked: 1: 1 | ||
147 | W: unlocked: 0: 0 | ||
148 | |||