History

Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull locking and atomic updates from Ingo Molnar: "Main changes in this cycle are: - Extend atomic primitives with coherent logic op primitives (atomic_{or,and,xor}()) and deprecate the old partial APIs (atomic_{set,clear}_mask()) The old ops were incoherent with incompatible signatures across architectures and with incomplete support. Now every architecture supports the primitives consistently (by Peter Zijlstra) - Generic support for 'relaxed atomics': - _acquire/release/relaxed() flavours of xchg(), cmpxchg() and {add,sub}_return() - atomic_read_acquire() - atomic_set_release() This came out of porting qwrlock code to arm64 (by Will Deacon) - Clean up the fragile static_key APIs that were causing repeat bugs, by introducing a new one: DEFINE_STATIC_KEY_TRUE(name); DEFINE_STATIC_KEY_FALSE(name); which define a key of different types with an initial true/false value. Then allow: static_branch_likely() static_branch_unlikely() to take a key of either type and emit the right instruction for the case. To be able to know the 'type' of the static key we encode it in the jump entry (by Peter Zijlstra) - Static key self-tests (by Jason Baron) - qrwlock optimizations (by Waiman Long) - small futex enhancements (by Davidlohr Bueso) - ... and misc other changes" * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (63 commits) jump_label/x86: Work around asm build bug on older/backported GCCs locking, ARM, atomics: Define our SMP atomics in terms of _relaxed() operations locking, include/llist: Use linux/atomic.h instead of asm/cmpxchg.h locking/qrwlock: Make use of _{acquire|release|relaxed}() atomics locking/qrwlock: Implement queue_write_unlock() using smp_store_release() locking/lockref: Remove homebrew cmpxchg64_relaxed() macro definition locking, asm-generic: Add _{relaxed|acquire|release}() variants for 'atomic_long_t' locking, asm-generic: Rework atomic-long.h to avoid bulk code duplication locking/atomics: Add _{acquire|release|relaxed}() variants of some atomic operations locking, compiler.h: Cast away attributes in the WRITE_ONCE() magic locking/static_keys: Make verify_keys() static jump label, locking/static_keys: Update docs locking/static_keys: Provide a selftest jump_label: Provide a self-test s390/uaccess, locking/static_keys: employ static_branch_likely() x86, tsc, locking/static_keys: Employ static_branch_likely() locking/static_keys: Add selftest locking/static_keys: Add a new static_key interface locking/static_keys: Rework update logic locking/static_keys: Add static_key_{en,dis}able() helpers ...

Linus Torvalds committed 11 years ago

Commit ca520ca2 parents 4c12ab7 d420acd139 files · +2425 −3585Browse files

Showing the changes to scripts (15 of 139 files). Show all

Unified · Split

15 files
  1. scripts/rt-tester/check-all.sh +0 −21
  2. scripts/rt-tester/rt-tester.py +0 −218
  3. scripts/rt-tester/t2-l1-2rt-sameprio.tst +0 −94
  4. scripts/rt-tester/t2-l1-pi.tst +0 −77
  5. scripts/rt-tester/t2-l1-signal.tst +0 −72
  6. scripts/rt-tester/t2-l2-2rt-deadlock.tst +0 −84
  7. scripts/rt-tester/t3-l1-pi-1rt.tst +0 −87
  8. scripts/rt-tester/t3-l1-pi-2rt.tst +0 −88
  9. scripts/rt-tester/t3-l1-pi-3rt.tst +0 −87
  10. scripts/rt-tester/t3-l1-pi-signal.tst +0 −93
  11. scripts/rt-tester/t3-l1-pi-steal.tst +0 −91
  12. scripts/rt-tester/t3-l2-pi.tst +0 −87
  13. scripts/rt-tester/t4-l2-pi-deboost.tst +0 −118
  14. scripts/rt-tester/t5-l4-pi-boost-deboost-setsched.tst +0 −178
  15. scripts/rt-tester/t5-l4-pi-boost-deboost.tst +0 −138
scripts/rt-tester/check-all.sh+0−21
@@ -1,21 +0,0 @@
1
2
3function testit ()
4{
5 printf "%-30s: " $1
6 ./rt-tester.py $1 | grep Pass
7}
8
9testit t2-l1-2rt-sameprio.tst
10testit t2-l1-pi.tst
11testit t2-l1-signal.tst
12#testit t2-l2-2rt-deadlock.tst
13testit t3-l1-pi-1rt.tst
14testit t3-l1-pi-2rt.tst
15testit t3-l1-pi-3rt.tst
16testit t3-l1-pi-signal.tst
17testit t3-l1-pi-steal.tst
18testit t3-l2-pi.tst
19testit t4-l2-pi-deboost.tst
20testit t5-l4-pi-boost-deboost.tst
21testit t5-l4-pi-boost-deboost-setsched.tst
scripts/rt-tester/rt-tester.py+0−218
@@ -1,218 +0,0 @@
1#!/usr/bin/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#
11import os
12import sys
13import getopt
14import shutil
15import string
16
17# Globals
18quiet = 0
19test = 0
20comments = 0
21
22sysfsprefix = "/sys/devices/system/rttest/rttest"
23statusfile = "/status"
24commandfile = "/command"
25
26# Command opcodes
27cmd_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 "signal" : "11",
37 "resetevent" : "98",
38 "reset" : "99",
39 }
40
41test_opcodes = {
42 "prioeq" : ["P" , "eq" , None],
43 "priolt" : ["P" , "lt" , None],
44 "priogt" : ["P" , "gt" , None],
45 "nprioeq" : ["N" , "eq" , None],
46 "npriolt" : ["N" , "lt" , None],
47 "npriogt" : ["N" , "gt" , None],
48 "unlocked" : ["M" , "eq" , 0],
49 "trylock" : ["M" , "eq" , 1],
50 "blocked" : ["M" , "eq" , 2],
51 "blockedwake" : ["M" , "eq" , 3],
52 "locked" : ["M" , "eq" , 4],
53 "opcodeeq" : ["O" , "eq" , None],
54 "opcodelt" : ["O" , "lt" , None],
55 "opcodegt" : ["O" , "gt" , None],
56 "eventeq" : ["E" , "eq" , None],
57 "eventlt" : ["E" , "lt" , None],
58 "eventgt" : ["E" , "gt" , None],
59 }
60
61# Print usage information
62def usage():
63 print "rt-tester.py <-c -h -q -t> <testfile>"
64 print " -c display comments after first command"
65 print " -h help"
66 print " -q quiet mode"
67 print " -t test mode (syntax check)"
68 print " testfile: read test specification from testfile"
69 print " otherwise from stdin"
70 return
71
72# Print progress when not in quiet mode
73def progress(str):
74 if not quiet:
75 print str
76
77# Analyse a status value
78def analyse(val, top, arg):
79
80 intval = int(val)
81
82 if top[0] == "M":
83 intval = intval / (10 ** int(arg))
84 intval = intval % 10
85 argval = top[2]
86 elif top[0] == "O":
87 argval = int(cmd_opcodes.get(arg, arg))
88 else:
89 argval = int(arg)
90
91 # progress("%d %s %d" %(intval, top[1], argval))
92
93 if top[1] == "eq" and intval == argval:
94 return 1
95 if top[1] == "lt" and intval < argval:
96 return 1
97 if top[1] == "gt" and intval > argval:
98 return 1
99 return 0
100
101# Parse the commandline
102try:
103 (options, arguments) = getopt.getopt(sys.argv[1:],'chqt')
104except getopt.GetoptError, ex:
105 usage()
106 sys.exit(1)
107
108# Parse commandline options
109for option, value in options:
110 if option == "-c":
111 comments = 1
112 elif option == "-q":
113 quiet = 1
114 elif option == "-t":
115 test = 1
116 elif option == '-h':
117 usage()
118 sys.exit(0)
119
120# Select the input source
121if arguments:
122 try:
123 fd = open(arguments[0])
124 except Exception,ex:
125 sys.stderr.write("File not found %s\n" %(arguments[0]))
126 sys.exit(1)
127else:
128 fd = sys.stdin
129
130linenr = 0
131
132# Read the test patterns
133while 1:
134
135 linenr = linenr + 1
136 line = fd.readline()
137 if not len(line):
138 break
139
140 line = line.strip()
141 parts = line.split(":")
142
143 if not parts or len(parts) < 1:
144 continue
145
146 if len(parts[0]) == 0:
147 continue
148
149 if parts[0].startswith("#"):
150 if comments > 1:
151 progress(line)
152 continue
153
154 if comments == 1:
155 comments = 2
156
157 progress(line)
158
159 cmd = parts[0].strip().lower()
160 opc = parts[1].strip().lower()
161 tid = parts[2].strip()
162 dat = parts[3].strip()
163
164 try:
165 # Test or wait for a status value
166 if cmd == "t" or cmd == "w":
167 testop = test_opcodes[opc]
168
169 fname = "%s%s%s" %(sysfsprefix, tid, statusfile)
170 if test:
171 print fname
172 continue
173
174 while 1:
175 query = 1
176 fsta = open(fname, 'r')
177 status = fsta.readline().strip()
178 fsta.close()
179 stat = status.split(",")
180 for s in stat:
181 s = s.strip()
182 if s.startswith(testop[0]):
183 # Separate status value
184 val = s[2:].strip()
185 query = analyse(val, testop, dat)
186 break
187 if query or cmd == "t":
188 break
189
190 progress(" " + status)
191
192 if not query:
193 sys.stderr.write("Test failed in line %d\n" %(linenr))
194 sys.exit(1)
195
196 # Issue a command to the tester
197 elif cmd == "c":
198 cmdnr = cmd_opcodes[opc]
199 # Build command string and sys filename
200 cmdstr = "%s:%s" %(cmdnr, dat)
201 fname = "%s%s%s" %(sysfsprefix, tid, commandfile)
202 if test:
203 print fname
204 continue
205 fcmd = open(fname, 'w')
206 fcmd.write(cmdstr)
207 fcmd.close()
208
209 except Exception,ex:
210 sys.stderr.write(str(ex))
211 sys.stderr.write("\nSyntax error in line %d\n" %(linenr))
212 if not test:
213 fd.close()
214 sys.exit(1)
215
216# Normal exit pass
217print "Pass"
218sys.exit(0)
scripts/rt-tester/t2-l1-2rt-sameprio.tst+0−94
@@ -1,94 +0,0 @@
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# signal 0
23# reset 0
24# resetevent 0
25#
26# Tests / Wait
27#
28# opcode opcode argument
29#
30# prioeq priority
31# priolt priority
32# priogt priority
33# nprioeq normal priority
34# npriolt normal priority
35# npriogt normal priority
36# locked lock nr (0-7)
37# blocked lock nr (0-7)
38# blockedwake lock nr (0-7)
39# unlocked lock nr (0-7)
40# opcodeeq command opcode or number
41# opcodelt number
42# opcodegt number
43# eventeq number
44# eventgt number
45# eventlt number
46
47#
48# 2 threads 1 lock
49#
50C: resetevent: 0: 0
51W: opcodeeq: 0: 0
52
53# Set schedulers
54C: schedfifo: 0: 80
55C: schedfifo: 1: 80
56
57# T0 lock L0
58C: locknowait: 0: 0
59C: locknowait: 1: 0
60W: locked: 0: 0
61W: blocked: 1: 0
62T: prioeq: 0: 80
63
64# T0 unlock L0
65C: unlock: 0: 0
66W: locked: 1: 0
67
68# Verify T0
69W: unlocked: 0: 0
70T: prioeq: 0: 80
71
72# Unlock
73C: unlock: 1: 0
74W: unlocked: 1: 0
75
76# T1,T0 lock L0
77C: locknowait: 1: 0
78C: locknowait: 0: 0
79W: locked: 1: 0
80W: blocked: 0: 0
81T: prioeq: 1: 80
82
83# T1 unlock L0
84C: unlock: 1: 0
85W: locked: 0: 0
86
87# Verify T1
88W: unlocked: 1: 0
89T: prioeq: 1: 80
90
91# Unlock and exit
92C: unlock: 0: 0
93W: unlocked: 0: 0
94
scripts/rt-tester/t2-l1-pi.tst+0−77
@@ -1,77 +0,0 @@
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# signal 0
23# reset 0
24# resetevent 0
25#
26# Tests / Wait
27#
28# opcode opcode argument
29#
30# prioeq priority
31# priolt priority
32# priogt priority
33# nprioeq normal priority
34# npriolt normal priority
35# npriogt normal priority
36# locked lock nr (0-7)
37# blocked lock nr (0-7)
38# blockedwake lock nr (0-7)
39# unlocked lock nr (0-7)
40# opcodeeq command opcode or number
41# opcodelt number
42# opcodegt number
43# eventeq number
44# eventgt number
45# eventlt number
46
47#
48# 2 threads 1 lock with priority inversion
49#
50C: resetevent: 0: 0
51W: opcodeeq: 0: 0
52
53# Set schedulers
54C: schedother: 0: 0
55C: schedfifo: 1: 80
56
57# T0 lock L0
58C: locknowait: 0: 0
59W: locked: 0: 0
60
61# T1 lock L0
62C: locknowait: 1: 0
63W: blocked: 1: 0
64T: prioeq: 0: 80
65
66# T0 unlock L0
67C: unlock: 0: 0
68W: locked: 1: 0
69
70# Verify T1
71W: unlocked: 0: 0
72T: priolt: 0: 1
73
74# Unlock and exit
75C: unlock: 1: 0
76W: unlocked: 1: 0
77
scripts/rt-tester/t2-l1-signal.tst+0−72
@@ -1,72 +0,0 @@
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# signal 0
23# reset 0
24# resetevent 0
25#
26# Tests / Wait
27#
28# opcode opcode argument
29#
30# prioeq priority
31# priolt priority
32# priogt priority
33# nprioeq normal priority
34# npriolt normal priority
35# npriogt normal priority
36# locked lock nr (0-7)
37# blocked lock nr (0-7)
38# blockedwake lock nr (0-7)
39# unlocked lock nr (0-7)
40# opcodeeq command opcode or number
41# opcodelt number
42# opcodegt number
43# eventeq number
44# eventgt number
45# eventlt number
46
47#
48# 2 threads 1 lock with priority inversion
49#
50C: resetevent: 0: 0
51W: opcodeeq: 0: 0
52
53# Set schedulers
54C: schedother: 0: 0
55C: schedother: 1: 0
56
57# T0 lock L0
58C: locknowait: 0: 0
59W: locked: 0: 0
60
61# T1 lock L0
62C: lockintnowait: 1: 0
63W: blocked: 1: 0
64
65# Interrupt T1
66C: signal: 1: 0
67W: unlocked: 1: 0
68T: opcodeeq: 1: -4
69
70# Unlock and exit
71C: unlock: 0: 0
72W: unlocked: 0: 0
scripts/rt-tester/t2-l2-2rt-deadlock.tst+0−84
@@ -1,84 +0,0 @@
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# signal 0
23# reset 0
24# resetevent 0
25#
26# Tests / Wait
27#
28# opcode opcode argument
29#
30# prioeq priority
31# priolt priority
32# priogt priority
33# nprioeq normal priority
34# npriolt normal priority
35# npriogt normal priority
36# locked lock nr (0-7)
37# blocked lock nr (0-7)
38# blockedwake lock nr (0-7)
39# unlocked lock nr (0-7)
40# opcodeeq command opcode or number
41# opcodelt number
42# opcodegt number
43# eventeq number
44# eventgt number
45# eventlt number
46
47#
48# 2 threads 2 lock
49#
50C: resetevent: 0: 0
51W: opcodeeq: 0: 0
52
53# Set schedulers
54C: schedfifo: 0: 80
55C: schedfifo: 1: 80
56
57# T0 lock L0
58C: locknowait: 0: 0
59W: locked: 0: 0
60
61# T1 lock L1
62C: locknowait: 1: 1
63W: locked: 1: 1
64
65# T0 lock L1
66C: lockintnowait: 0: 1
67W: blocked: 0: 1
68
69# T1 lock L0
70C: lockintnowait: 1: 0
71W: blocked: 1: 0
72
73# Make deadlock go away
74C: signal: 1: 0
75W: unlocked: 1: 0
76C: signal: 0: 0
77W: unlocked: 0: 1
78
79# Unlock and exit
80C: unlock: 0: 0
81W: unlocked: 0: 0
82C: unlock: 1: 1
83W: unlocked: 1: 1
84
scripts/rt-tester/t3-l1-pi-1rt.tst+0−87
@@ -1,87 +0,0 @@
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# signal thread to signal (0-7)
23# reset 0
24# resetevent 0
25#
26# Tests / Wait
27#
28# opcode opcode argument
29#
30# prioeq priority
31# priolt priority
32# priogt priority
33# nprioeq normal priority
34# npriolt normal priority
35# npriogt normal priority
36# locked lock nr (0-7)
37# blocked lock nr (0-7)
38# blockedwake lock nr (0-7)
39# unlocked lock nr (0-7)
40# opcodeeq command opcode or number
41# opcodelt number
42# opcodegt number
43# eventeq number
44# eventgt number
45# eventlt number
46
47#
48# 3 threads 1 lock PI
49#
50C: resetevent: 0: 0
51W: opcodeeq: 0: 0
52
53# Set schedulers
54C: schedother: 0: 0
55C: schedother: 1: 0
56C: schedfifo: 2: 82
57
58# T0 lock L0
59C: locknowait: 0: 0
60W: locked: 0: 0
61
62# T1 lock L0
63C: locknowait: 1: 0
64W: blocked: 1: 0
65T: priolt: 0: 1
66
67# T2 lock L0
68C: locknowait: 2: 0
69W: blocked: 2: 0
70T: prioeq: 0: 82
71
72# T0 unlock L0
73C: unlock: 0: 0
74
75# Wait until T2 got the lock
76W: locked: 2: 0
77W: unlocked: 0: 0
78T: priolt: 0: 1
79
80# T2 unlock L0
81C: unlock: 2: 0
82
83W: unlocked: 2: 0
84W: locked: 1: 0
85
86C: unlock: 1: 0
87W: unlocked: 1: 0
scripts/rt-tester/t3-l1-pi-2rt.tst+0−88
@@ -1,88 +0,0 @@
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# signal thread to signal (0-7)
23# reset 0
24# resetevent 0
25#
26# Tests / Wait
27#
28# opcode opcode argument
29#
30# prioeq priority
31# priolt priority
32# priogt priority
33# nprioeq normal priority
34# npriolt normal priority
35# npriogt normal priority
36# locked lock nr (0-7)
37# blocked lock nr (0-7)
38# blockedwake lock nr (0-7)
39# unlocked lock nr (0-7)
40# opcodeeq command opcode or number
41# opcodelt number
42# opcodegt number
43# eventeq number
44# eventgt number
45# eventlt number
46
47#
48# 3 threads 1 lock PI
49#
50C: resetevent: 0: 0
51W: opcodeeq: 0: 0
52
53# Set schedulers
54C: schedother: 0: 0
55C: schedfifo: 1: 81
56C: schedfifo: 2: 82
57
58# T0 lock L0
59C: locknowait: 0: 0
60W: locked: 0: 0
61
62# T1 lock L0
63C: locknowait: 1: 0
64W: blocked: 1: 0
65T: prioeq: 0: 81
66
67# T2 lock L0
68C: locknowait: 2: 0
69W: blocked: 2: 0
70T: prioeq: 0: 82
71T: prioeq: 1: 81
72
73# T0 unlock L0
74C: unlock: 0: 0
75
76# Wait until T2 got the lock
77W: locked: 2: 0
78W: unlocked: 0: 0
79T: priolt: 0: 1
80
81# T2 unlock L0
82C: unlock: 2: 0
83
84W: unlocked: 2: 0
85W: locked: 1: 0
86
87C: unlock: 1: 0
88W: unlocked: 1: 0
scripts/rt-tester/t3-l1-pi-3rt.tst+0−87
@@ -1,87 +0,0 @@
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# signal thread to signal (0-7)
23# reset 0
24# resetevent 0
25#
26# Tests / Wait
27#
28# opcode opcode argument
29#
30# prioeq priority
31# priolt priority
32# priogt priority
33# nprioeq normal priority
34# npriolt normal priority
35# npriogt normal priority
36# locked lock nr (0-7)
37# blocked lock nr (0-7)
38# blockedwake lock nr (0-7)
39# unlocked lock nr (0-7)
40# opcodeeq command opcode or number
41# opcodelt number
42# opcodegt number
43# eventeq number
44# eventgt number
45# eventlt number
46
47#
48# 3 threads 1 lock PI
49#
50C: resetevent: 0: 0
51W: opcodeeq: 0: 0
52
53# Set schedulers
54C: schedfifo: 0: 80
55C: schedfifo: 1: 81
56C: schedfifo: 2: 82
57
58# T0 lock L0
59C: locknowait: 0: 0
60W: locked: 0: 0
61
62# T1 lock L0
63C: locknowait: 1: 0
64W: blocked: 1: 0
65T: prioeq: 0: 81
66
67# T2 lock L0
68C: locknowait: 2: 0
69W: blocked: 2: 0
70T: prioeq: 0: 82
71
72# T0 unlock L0
73C: unlock: 0: 0
74
75# Wait until T2 got the lock
76W: locked: 2: 0
77W: unlocked: 0: 0
78T: prioeq: 0: 80
79
80# T2 unlock L0
81C: unlock: 2: 0
82
83W: locked: 1: 0
84W: unlocked: 2: 0
85
86C: unlock: 1: 0
87W: unlocked: 1: 0
scripts/rt-tester/t3-l1-pi-signal.tst+0−93
@@ -1,93 +0,0 @@
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# signal thread to signal (0-7)
23# reset 0
24# resetevent 0
25#
26# Tests / Wait
27#
28# opcode opcode argument
29#
30# prioeq priority
31# priolt priority
32# priogt priority
33# nprioeq normal priority
34# npriolt normal priority
35# npriogt normal priority
36# locked lock nr (0-7)
37# blocked lock nr (0-7)
38# blockedwake lock nr (0-7)
39# unlocked lock nr (0-7)
40# opcodeeq command opcode or number
41# opcodelt number
42# opcodegt number
43# eventeq number
44# eventgt number
45# eventlt number
46
47# Reset event counter
48C: resetevent: 0: 0
49W: opcodeeq: 0: 0
50
51# Set priorities
52C: schedother: 0: 0
53C: schedfifo: 1: 80
54C: schedfifo: 2: 81
55
56# T0 lock L0
57C: lock: 0: 0
58W: locked: 0: 0
59
60# T1 lock L0, no wait in the wakeup path
61C: locknowait: 1: 0
62W: blocked: 1: 0
63T: prioeq: 0: 80
64T: prioeq: 1: 80
65
66# T2 lock L0 interruptible, no wait in the wakeup path
67C: lockintnowait: 2: 0
68W: blocked: 2: 0
69T: prioeq: 0: 81
70T: prioeq: 1: 80
71
72# Interrupt T2
73C: signal: 2: 2
74W: unlocked: 2: 0
75T: prioeq: 1: 80
76T: prioeq: 0: 80
77
78T: locked: 0: 0
79T: blocked: 1: 0
80
81# T0 unlock L0
82C: unlock: 0: 0
83
84# Wait until T1 has locked L0 and exit
85W: locked: 1: 0
86W: unlocked: 0: 0
87T: priolt: 0: 1
88
89C: unlock: 1: 0
90W: unlocked: 1: 0
91
92
93
scripts/rt-tester/t3-l1-pi-steal.tst+0−91
@@ -1,91 +0,0 @@
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# signal thread to signal (0-7)
23# reset 0
24# resetevent 0
25#
26# Tests / Wait
27#
28# opcode opcode argument
29#
30# prioeq priority
31# priolt priority
32# priogt priority
33# nprioeq normal priority
34# npriolt normal priority
35# npriogt normal priority
36# locked lock nr (0-7)
37# blocked lock nr (0-7)
38# blockedwake lock nr (0-7)
39# unlocked lock nr (0-7)
40# opcodeeq command opcode or number
41# opcodelt number
42# opcodegt number
43# eventeq number
44# eventgt number
45# eventlt number
46
47#
48# 3 threads 1 lock PI steal pending ownership
49#
50C: resetevent: 0: 0
51W: opcodeeq: 0: 0
52
53# Set schedulers
54C: schedother: 0: 0
55C: schedfifo: 1: 80
56C: schedfifo: 2: 81
57
58# T0 lock L0
59C: lock: 0: 0
60W: locked: 0: 0
61
62# T1 lock L0
63C: lock: 1: 0
64W: blocked: 1: 0
65T: prioeq: 0: 80
66
67# T0 unlock L0
68C: unlock: 0: 0
69
70# Wait until T1 is in the wakeup loop
71W: blockedwake: 1: 0
72T: priolt: 0: 1
73
74# T2 lock L0
75C: lock: 2: 0
76# T1 leave wakeup loop
77C: lockcont: 1: 0
78
79# T2 must have the lock and T1 must be blocked
80W: locked: 2: 0
81W: blocked: 1: 0
82
83# T2 unlock L0
84C: unlock: 2: 0
85
86# Wait until T1 is in the wakeup loop and let it run
87W: blockedwake: 1: 0
88C: lockcont: 1: 0
89W: locked: 1: 0
90C: unlock: 1: 0
91W: unlocked: 1: 0
scripts/rt-tester/t3-l2-pi.tst+0−87
@@ -1,87 +0,0 @@
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# signal thread to signal (0-7)
23# reset 0
24# resetevent 0
25#
26# Tests / Wait
27#
28# opcode opcode argument
29#
30# prioeq priority
31# priolt priority
32# priogt priority
33# nprioeq normal priority
34# npriolt normal priority
35# npriogt normal priority
36# locked lock nr (0-7)
37# blocked lock nr (0-7)
38# blockedwake lock nr (0-7)
39# unlocked lock nr (0-7)
40# opcodeeq command opcode or number
41# opcodelt number
42# opcodegt number
43# eventeq number
44# eventgt number
45# eventlt number
46
47#
48# 3 threads 2 lock PI
49#
50C: resetevent: 0: 0
51W: opcodeeq: 0: 0
52
53# Set schedulers
54C: schedother: 0: 0
55C: schedother: 1: 0
56C: schedfifo: 2: 82
57
58# T0 lock L0
59C: locknowait: 0: 0
60W: locked: 0: 0
61
62# T1 lock L0
63C: locknowait: 1: 0
64W: blocked: 1: 0
65T: priolt: 0: 1
66
67# T2 lock L0
68C: locknowait: 2: 0
69W: blocked: 2: 0
70T: prioeq: 0: 82
71
72# T0 unlock L0
73C: unlock: 0: 0
74
75# Wait until T2 got the lock
76W: locked: 2: 0
77W: unlocked: 0: 0
78T: priolt: 0: 1
79
80# T2 unlock L0
81C: unlock: 2: 0
82
83W: unlocked: 2: 0
84W: locked: 1: 0
85
86C: unlock: 1: 0
87W: unlocked: 1: 0
scripts/rt-tester/t4-l2-pi-deboost.tst+0−118
@@ -1,118 +0,0 @@
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# signal thread to signal (0-7)
23# reset 0
24# resetevent 0
25#
26# Tests / Wait
27#
28# opcode opcode argument
29#
30# prioeq priority
31# priolt priority
32# priogt priority
33# nprioeq normal priority
34# npriolt normal priority
35# npriogt normal priority
36# locked lock nr (0-7)
37# blocked lock nr (0-7)
38# blockedwake lock nr (0-7)
39# unlocked lock nr (0-7)
40# opcodeeq command opcode or number
41# opcodelt number
42# opcodegt number
43# eventeq number
44# eventgt number
45# eventlt number
46
47#
48# 4 threads 2 lock PI
49#
50C: resetevent: 0: 0
51W: opcodeeq: 0: 0
52
53# Set schedulers
54C: schedother: 0: 0
55C: schedother: 1: 0
56C: schedfifo: 2: 82
57C: schedfifo: 3: 83
58
59# T0 lock L0
60C: locknowait: 0: 0
61W: locked: 0: 0
62
63# T1 lock L1
64C: locknowait: 1: 1
65W: locked: 1: 1
66
67# T3 lock L0
68C: lockintnowait: 3: 0
69W: blocked: 3: 0
70T: prioeq: 0: 83
71
72# T0 lock L1
73C: lock: 0: 1
74W: blocked: 0: 1
75T: prioeq: 1: 83
76
77# T1 unlock L1
78C: unlock: 1: 1
79
80# Wait until T0 is in the wakeup code
81W: blockedwake: 0: 1
82
83# Verify that T1 is unboosted
84W: unlocked: 1: 1
85T: priolt: 1: 1
86
87# T2 lock L1 (T0 is boosted and pending owner !)
88C: locknowait: 2: 1
89W: blocked: 2: 1
90T: prioeq: 0: 83
91
92# Interrupt T3 and wait until T3 returned
93C: signal: 3: 0
94W: unlocked: 3: 0
95
96# Verify prio of T0 (still pending owner,
97# but T2 is enqueued due to the previous boost by T3
98T: prioeq: 0: 82
99
100# Let T0 continue
101C: lockcont: 0: 1
102W: locked: 0: 1
103
104# Unlock L1 and let T2 get L1
105C: unlock: 0: 1
106W: locked: 2: 1
107
108# Verify that T0 is unboosted
109W: unlocked: 0: 1
110T: priolt: 0: 1
111
112# Unlock everything and exit
113C: unlock: 2: 1
114W: unlocked: 2: 1
115
116C: unlock: 0: 0
117W: unlocked: 0: 0
118
scripts/rt-tester/t5-l4-pi-boost-deboost-setsched.tst+0−178
@@ -1,178 +0,0 @@
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# signal thread to signal (0-7)
23# reset 0
24# resetevent 0
25#
26# Tests / Wait
27#
28# opcode opcode argument
29#
30# prioeq priority
31# priolt priority
32# priogt priority
33# nprioeq normal priority
34# npriolt normal priority
35# npriogt normal priority
36# locked lock nr (0-7)
37# blocked lock nr (0-7)
38# blockedwake lock nr (0-7)
39# unlocked lock nr (0-7)
40# opcodeeq command opcode or number
41# opcodelt number
42# opcodegt number
43# eventeq number
44# eventgt number
45# eventlt number
46
47#
48# 5 threads 4 lock PI - modify priority of blocked threads
49#
50C: resetevent: 0: 0
51W: opcodeeq: 0: 0
52
53# Set schedulers
54C: schedother: 0: 0
55C: schedfifo: 1: 81
56C: schedfifo: 2: 82
57C: schedfifo: 3: 83
58C: schedfifo: 4: 84
59
60# T0 lock L0
61C: locknowait: 0: 0
62W: locked: 0: 0
63
64# T1 lock L1
65C: locknowait: 1: 1
66W: locked: 1: 1
67
68# T1 lock L0
69C: lockintnowait: 1: 0
70W: blocked: 1: 0
71T: prioeq: 0: 81
72
73# T2 lock L2
74C: locknowait: 2: 2
75W: locked: 2: 2
76
77# T2 lock L1
78C: lockintnowait: 2: 1
79W: blocked: 2: 1
80T: prioeq: 0: 82
81T: prioeq: 1: 82
82
83# T3 lock L3
84C: locknowait: 3: 3
85W: locked: 3: 3
86
87# T3 lock L2
88C: lockintnowait: 3: 2
89W: blocked: 3: 2
90T: prioeq: 0: 83
91T: prioeq: 1: 83
92T: prioeq: 2: 83
93
94# T4 lock L3
95C: lockintnowait: 4: 3
96W: blocked: 4: 3
97T: prioeq: 0: 84
98T: prioeq: 1: 84
99T: prioeq: 2: 84
100T: prioeq: 3: 84
101
102# Reduce prio of T4
103C: schedfifo: 4: 80
104T: prioeq: 0: 83
105T: prioeq: 1: 83
106T: prioeq: 2: 83
107T: prioeq: 3: 83
108T: prioeq: 4: 80
109
110# Increase prio of T4
111C: schedfifo: 4: 84
112T: prioeq: 0: 84
113T: prioeq: 1: 84
114T: prioeq: 2: 84
115T: prioeq: 3: 84
116T: prioeq: 4: 84
117
118# Reduce prio of T3
119C: schedfifo: 3: 80
120T: prioeq: 0: 84
121T: prioeq: 1: 84
122T: prioeq: 2: 84
123T: prioeq: 3: 84
124T: prioeq: 4: 84
125
126# Increase prio of T3
127C: schedfifo: 3: 85
128T: prioeq: 0: 85
129T: prioeq: 1: 85
130T: prioeq: 2: 85
131T: prioeq: 3: 85
132T: prioeq: 4: 84
133
134# Reduce prio of T3
135C: schedfifo: 3: 83
136T: prioeq: 0: 84
137T: prioeq: 1: 84
138T: prioeq: 2: 84
139T: prioeq: 3: 84
140T: prioeq: 4: 84
141
142# Signal T4
143C: signal: 4: 0
144W: unlocked: 4: 3
145T: prioeq: 0: 83
146T: prioeq: 1: 83
147T: prioeq: 2: 83
148T: prioeq: 3: 83
149
150# Signal T3
151C: signal: 3: 0
152W: unlocked: 3: 2
153T: prioeq: 0: 82
154T: prioeq: 1: 82
155T: prioeq: 2: 82
156
157# Signal T2
158C: signal: 2: 0
159W: unlocked: 2: 1
160T: prioeq: 0: 81
161T: prioeq: 1: 81
162
163# Signal T1
164C: signal: 1: 0
165W: unlocked: 1: 0
166T: priolt: 0: 1
167
168# Unlock and exit
169C: unlock: 3: 3
170C: unlock: 2: 2
171C: unlock: 1: 1
172C: unlock: 0: 0
173
174W: unlocked: 3: 3
175W: unlocked: 2: 2
176W: unlocked: 1: 1
177W: unlocked: 0: 0
178
scripts/rt-tester/t5-l4-pi-boost-deboost.tst+0−138
@@ -1,138 +0,0 @@
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# signal thread to signal (0-7)
23# reset 0
24# resetevent 0
25#
26# Tests / Wait
27#
28# opcode opcode argument
29#
30# prioeq priority
31# priolt priority
32# priogt priority
33# nprioeq normal priority
34# npriolt normal priority
35# npriogt normal priority
36# locked lock nr (0-7)
37# blocked lock nr (0-7)
38# blockedwake lock nr (0-7)
39# unlocked lock nr (0-7)
40# opcodeeq command opcode or number
41# opcodelt number
42# opcodegt number
43# eventeq number
44# eventgt number
45# eventlt number
46
47#
48# 5 threads 4 lock PI
49#
50C: resetevent: 0: 0
51W: opcodeeq: 0: 0
52
53# Set schedulers
54C: schedother: 0: 0
55C: schedfifo: 1: 81
56C: schedfifo: 2: 82
57C: schedfifo: 3: 83
58C: schedfifo: 4: 84
59
60# T0 lock L0
61C: locknowait: 0: 0
62W: locked: 0: 0
63
64# T1 lock L1
65C: locknowait: 1: 1
66W: locked: 1: 1
67
68# T1 lock L0
69C: lockintnowait: 1: 0
70W: blocked: 1: 0
71T: prioeq: 0: 81
72
73# T2 lock L2
74C: locknowait: 2: 2
75W: locked: 2: 2
76
77# T2 lock L1
78C: lockintnowait: 2: 1
79W: blocked: 2: 1
80T: prioeq: 0: 82
81T: prioeq: 1: 82
82
83# T3 lock L3
84C: locknowait: 3: 3
85W: locked: 3: 3
86
87# T3 lock L2
88C: lockintnowait: 3: 2
89W: blocked: 3: 2
90T: prioeq: 0: 83
91T: prioeq: 1: 83
92T: prioeq: 2: 83
93
94# T4 lock L3
95C: lockintnowait: 4: 3
96W: blocked: 4: 3
97T: prioeq: 0: 84
98T: prioeq: 1: 84
99T: prioeq: 2: 84
100T: prioeq: 3: 84
101
102# Signal T4
103C: signal: 4: 0
104W: unlocked: 4: 3
105T: prioeq: 0: 83
106T: prioeq: 1: 83
107T: prioeq: 2: 83
108T: prioeq: 3: 83
109
110# Signal T3
111C: signal: 3: 0
112W: unlocked: 3: 2
113T: prioeq: 0: 82
114T: prioeq: 1: 82
115T: prioeq: 2: 82
116
117# Signal T2
118C: signal: 2: 0
119W: unlocked: 2: 1
120T: prioeq: 0: 81
121T: prioeq: 1: 81
122
123# Signal T1
124C: signal: 1: 0
125W: unlocked: 1: 0
126T: priolt: 0: 1
127
128# Unlock and exit
129C: unlock: 3: 3
130C: unlock: 2: 2
131C: unlock: 1: 1
132C: unlock: 0: 0
133
134W: unlocked: 3: 3
135W: unlocked: 2: 2
136W: unlocked: 1: 1
137W: unlocked: 0: 0
138