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−
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−testit 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−#
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− "signal" : "11",
37− "resetevent" : "98",
38− "reset" : "99",
39− }
40−
41−test_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
62−def 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
73−def progress(str):
74− if not quiet:
75− print str
76−
77−# Analyse a status value
78−def 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
102−try:
103− (options, arguments) = getopt.getopt(sys.argv[1:],'chqt')
104−except getopt.GetoptError, ex:
105− usage()
106− sys.exit(1)
107−
108−# Parse commandline options
109−for 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
121−if 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)
127−else:
128− fd = sys.stdin
129−
130−linenr = 0
131−
132−# Read the test patterns
133−while 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
217−print "Pass"
218−sys.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−#
50−C: resetevent: 0: 0
51−W: opcodeeq: 0: 0
52−
53−# Set schedulers
54−C: schedfifo: 0: 80
55−C: schedfifo: 1: 80
56−
57−# T0 lock L0
58−C: locknowait: 0: 0
59−C: locknowait: 1: 0
60−W: locked: 0: 0
61−W: blocked: 1: 0
62−T: prioeq: 0: 80
63−
64−# T0 unlock L0
65−C: unlock: 0: 0
66−W: locked: 1: 0
67−
68−# Verify T0
69−W: unlocked: 0: 0
70−T: prioeq: 0: 80
71−
72−# Unlock
73−C: unlock: 1: 0
74−W: unlocked: 1: 0
75−
76−# T1,T0 lock L0
77−C: locknowait: 1: 0
78−C: locknowait: 0: 0
79−W: locked: 1: 0
80−W: blocked: 0: 0
81−T: prioeq: 1: 80
82−
83−# T1 unlock L0
84−C: unlock: 1: 0
85−W: locked: 0: 0
86−
87−# Verify T1
88−W: unlocked: 1: 0
89−T: prioeq: 1: 80
90−
91−# Unlock and exit
92−C: unlock: 0: 0
93−W: 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−#
50−C: resetevent: 0: 0
51−W: opcodeeq: 0: 0
52−
53−# Set schedulers
54−C: schedother: 0: 0
55−C: schedfifo: 1: 80
56−
57−# T0 lock L0
58−C: locknowait: 0: 0
59−W: locked: 0: 0
60−
61−# T1 lock L0
62−C: locknowait: 1: 0
63−W: blocked: 1: 0
64−T: prioeq: 0: 80
65−
66−# T0 unlock L0
67−C: unlock: 0: 0
68−W: locked: 1: 0
69−
70−# Verify T1
71−W: unlocked: 0: 0
72−T: priolt: 0: 1
73−
74−# Unlock and exit
75−C: unlock: 1: 0
76−W: 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−#
50−C: resetevent: 0: 0
51−W: opcodeeq: 0: 0
52−
53−# Set schedulers
54−C: schedother: 0: 0
55−C: schedother: 1: 0
56−
57−# T0 lock L0
58−C: locknowait: 0: 0
59−W: locked: 0: 0
60−
61−# T1 lock L0
62−C: lockintnowait: 1: 0
63−W: blocked: 1: 0
64−
65−# Interrupt T1
66−C: signal: 1: 0
67−W: unlocked: 1: 0
68−T: opcodeeq: 1: -4
69−
70−# Unlock and exit
71−C: unlock: 0: 0
72−W: 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−#
50−C: resetevent: 0: 0
51−W: opcodeeq: 0: 0
52−
53−# Set schedulers
54−C: schedfifo: 0: 80
55−C: schedfifo: 1: 80
56−
57−# T0 lock L0
58−C: locknowait: 0: 0
59−W: locked: 0: 0
60−
61−# T1 lock L1
62−C: locknowait: 1: 1
63−W: locked: 1: 1
64−
65−# T0 lock L1
66−C: lockintnowait: 0: 1
67−W: blocked: 0: 1
68−
69−# T1 lock L0
70−C: lockintnowait: 1: 0
71−W: blocked: 1: 0
72−
73−# Make deadlock go away
74−C: signal: 1: 0
75−W: unlocked: 1: 0
76−C: signal: 0: 0
77−W: unlocked: 0: 1
78−
79−# Unlock and exit
80−C: unlock: 0: 0
81−W: unlocked: 0: 0
82−C: unlock: 1: 1
83−W: 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−#
50−C: resetevent: 0: 0
51−W: opcodeeq: 0: 0
52−
53−# Set schedulers
54−C: schedother: 0: 0
55−C: schedother: 1: 0
56−C: schedfifo: 2: 82
57−
58−# T0 lock L0
59−C: locknowait: 0: 0
60−W: locked: 0: 0
61−
62−# T1 lock L0
63−C: locknowait: 1: 0
64−W: blocked: 1: 0
65−T: priolt: 0: 1
66−
67−# T2 lock L0
68−C: locknowait: 2: 0
69−W: blocked: 2: 0
70−T: prioeq: 0: 82
71−
72−# T0 unlock L0
73−C: unlock: 0: 0
74−
75−# Wait until T2 got the lock
76−W: locked: 2: 0
77−W: unlocked: 0: 0
78−T: priolt: 0: 1
79−
80−# T2 unlock L0
81−C: unlock: 2: 0
82−
83−W: unlocked: 2: 0
84−W: locked: 1: 0
85−
86−C: unlock: 1: 0
87−W: 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−#
50−C: resetevent: 0: 0
51−W: opcodeeq: 0: 0
52−
53−# Set schedulers
54−C: schedother: 0: 0
55−C: schedfifo: 1: 81
56−C: schedfifo: 2: 82
57−
58−# T0 lock L0
59−C: locknowait: 0: 0
60−W: locked: 0: 0
61−
62−# T1 lock L0
63−C: locknowait: 1: 0
64−W: blocked: 1: 0
65−T: prioeq: 0: 81
66−
67−# T2 lock L0
68−C: locknowait: 2: 0
69−W: blocked: 2: 0
70−T: prioeq: 0: 82
71−T: prioeq: 1: 81
72−
73−# T0 unlock L0
74−C: unlock: 0: 0
75−
76−# Wait until T2 got the lock
77−W: locked: 2: 0
78−W: unlocked: 0: 0
79−T: priolt: 0: 1
80−
81−# T2 unlock L0
82−C: unlock: 2: 0
83−
84−W: unlocked: 2: 0
85−W: locked: 1: 0
86−
87−C: unlock: 1: 0
88−W: 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−#
50−C: resetevent: 0: 0
51−W: opcodeeq: 0: 0
52−
53−# Set schedulers
54−C: schedfifo: 0: 80
55−C: schedfifo: 1: 81
56−C: schedfifo: 2: 82
57−
58−# T0 lock L0
59−C: locknowait: 0: 0
60−W: locked: 0: 0
61−
62−# T1 lock L0
63−C: locknowait: 1: 0
64−W: blocked: 1: 0
65−T: prioeq: 0: 81
66−
67−# T2 lock L0
68−C: locknowait: 2: 0
69−W: blocked: 2: 0
70−T: prioeq: 0: 82
71−
72−# T0 unlock L0
73−C: unlock: 0: 0
74−
75−# Wait until T2 got the lock
76−W: locked: 2: 0
77−W: unlocked: 0: 0
78−T: prioeq: 0: 80
79−
80−# T2 unlock L0
81−C: unlock: 2: 0
82−
83−W: locked: 1: 0
84−W: unlocked: 2: 0
85−
86−C: unlock: 1: 0
87−W: 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
48−C: resetevent: 0: 0
49−W: opcodeeq: 0: 0
50−
51−# Set priorities
52−C: schedother: 0: 0
53−C: schedfifo: 1: 80
54−C: schedfifo: 2: 81
55−
56−# T0 lock L0
57−C: lock: 0: 0
58−W: locked: 0: 0
59−
60−# T1 lock L0, no wait in the wakeup path
61−C: locknowait: 1: 0
62−W: blocked: 1: 0
63−T: prioeq: 0: 80
64−T: prioeq: 1: 80
65−
66−# T2 lock L0 interruptible, no wait in the wakeup path
67−C: lockintnowait: 2: 0
68−W: blocked: 2: 0
69−T: prioeq: 0: 81
70−T: prioeq: 1: 80
71−
72−# Interrupt T2
73−C: signal: 2: 2
74−W: unlocked: 2: 0
75−T: prioeq: 1: 80
76−T: prioeq: 0: 80
77−
78−T: locked: 0: 0
79−T: blocked: 1: 0
80−
81−# T0 unlock L0
82−C: unlock: 0: 0
83−
84−# Wait until T1 has locked L0 and exit
85−W: locked: 1: 0
86−W: unlocked: 0: 0
87−T: priolt: 0: 1
88−
89−C: unlock: 1: 0
90−W: 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−#
50−C: resetevent: 0: 0
51−W: opcodeeq: 0: 0
52−
53−# Set schedulers
54−C: schedother: 0: 0
55−C: schedfifo: 1: 80
56−C: schedfifo: 2: 81
57−
58−# T0 lock L0
59−C: lock: 0: 0
60−W: locked: 0: 0
61−
62−# T1 lock L0
63−C: lock: 1: 0
64−W: blocked: 1: 0
65−T: prioeq: 0: 80
66−
67−# T0 unlock L0
68−C: unlock: 0: 0
69−
70−# Wait until T1 is in the wakeup loop
71−W: blockedwake: 1: 0
72−T: priolt: 0: 1
73−
74−# T2 lock L0
75−C: lock: 2: 0
76−# T1 leave wakeup loop
77−C: lockcont: 1: 0
78−
79−# T2 must have the lock and T1 must be blocked
80−W: locked: 2: 0
81−W: blocked: 1: 0
82−
83−# T2 unlock L0
84−C: unlock: 2: 0
85−
86−# Wait until T1 is in the wakeup loop and let it run
87−W: blockedwake: 1: 0
88−C: lockcont: 1: 0
89−W: locked: 1: 0
90−C: unlock: 1: 0
91−W: 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−#
50−C: resetevent: 0: 0
51−W: opcodeeq: 0: 0
52−
53−# Set schedulers
54−C: schedother: 0: 0
55−C: schedother: 1: 0
56−C: schedfifo: 2: 82
57−
58−# T0 lock L0
59−C: locknowait: 0: 0
60−W: locked: 0: 0
61−
62−# T1 lock L0
63−C: locknowait: 1: 0
64−W: blocked: 1: 0
65−T: priolt: 0: 1
66−
67−# T2 lock L0
68−C: locknowait: 2: 0
69−W: blocked: 2: 0
70−T: prioeq: 0: 82
71−
72−# T0 unlock L0
73−C: unlock: 0: 0
74−
75−# Wait until T2 got the lock
76−W: locked: 2: 0
77−W: unlocked: 0: 0
78−T: priolt: 0: 1
79−
80−# T2 unlock L0
81−C: unlock: 2: 0
82−
83−W: unlocked: 2: 0
84−W: locked: 1: 0
85−
86−C: unlock: 1: 0
87−W: 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−#
50−C: resetevent: 0: 0
51−W: opcodeeq: 0: 0
52−
53−# Set schedulers
54−C: schedother: 0: 0
55−C: schedother: 1: 0
56−C: schedfifo: 2: 82
57−C: schedfifo: 3: 83
58−
59−# T0 lock L0
60−C: locknowait: 0: 0
61−W: locked: 0: 0
62−
63−# T1 lock L1
64−C: locknowait: 1: 1
65−W: locked: 1: 1
66−
67−# T3 lock L0
68−C: lockintnowait: 3: 0
69−W: blocked: 3: 0
70−T: prioeq: 0: 83
71−
72−# T0 lock L1
73−C: lock: 0: 1
74−W: blocked: 0: 1
75−T: prioeq: 1: 83
76−
77−# T1 unlock L1
78−C: unlock: 1: 1
79−
80−# Wait until T0 is in the wakeup code
81−W: blockedwake: 0: 1
82−
83−# Verify that T1 is unboosted
84−W: unlocked: 1: 1
85−T: priolt: 1: 1
86−
87−# T2 lock L1 (T0 is boosted and pending owner !)
88−C: locknowait: 2: 1
89−W: blocked: 2: 1
90−T: prioeq: 0: 83
91−
92−# Interrupt T3 and wait until T3 returned
93−C: signal: 3: 0
94−W: unlocked: 3: 0
95−
96−# Verify prio of T0 (still pending owner,
97−# but T2 is enqueued due to the previous boost by T3
98−T: prioeq: 0: 82
99−
100−# Let T0 continue
101−C: lockcont: 0: 1
102−W: locked: 0: 1
103−
104−# Unlock L1 and let T2 get L1
105−C: unlock: 0: 1
106−W: locked: 2: 1
107−
108−# Verify that T0 is unboosted
109−W: unlocked: 0: 1
110−T: priolt: 0: 1
111−
112−# Unlock everything and exit
113−C: unlock: 2: 1
114−W: unlocked: 2: 1
115−
116−C: unlock: 0: 0
117−W: 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−#
50−C: resetevent: 0: 0
51−W: opcodeeq: 0: 0
52−
53−# Set schedulers
54−C: schedother: 0: 0
55−C: schedfifo: 1: 81
56−C: schedfifo: 2: 82
57−C: schedfifo: 3: 83
58−C: schedfifo: 4: 84
59−
60−# T0 lock L0
61−C: locknowait: 0: 0
62−W: locked: 0: 0
63−
64−# T1 lock L1
65−C: locknowait: 1: 1
66−W: locked: 1: 1
67−
68−# T1 lock L0
69−C: lockintnowait: 1: 0
70−W: blocked: 1: 0
71−T: prioeq: 0: 81
72−
73−# T2 lock L2
74−C: locknowait: 2: 2
75−W: locked: 2: 2
76−
77−# T2 lock L1
78−C: lockintnowait: 2: 1
79−W: blocked: 2: 1
80−T: prioeq: 0: 82
81−T: prioeq: 1: 82
82−
83−# T3 lock L3
84−C: locknowait: 3: 3
85−W: locked: 3: 3
86−
87−# T3 lock L2
88−C: lockintnowait: 3: 2
89−W: blocked: 3: 2
90−T: prioeq: 0: 83
91−T: prioeq: 1: 83
92−T: prioeq: 2: 83
93−
94−# T4 lock L3
95−C: lockintnowait: 4: 3
96−W: blocked: 4: 3
97−T: prioeq: 0: 84
98−T: prioeq: 1: 84
99−T: prioeq: 2: 84
100−T: prioeq: 3: 84
101−
102−# Reduce prio of T4
103−C: schedfifo: 4: 80
104−T: prioeq: 0: 83
105−T: prioeq: 1: 83
106−T: prioeq: 2: 83
107−T: prioeq: 3: 83
108−T: prioeq: 4: 80
109−
110−# Increase prio of T4
111−C: schedfifo: 4: 84
112−T: prioeq: 0: 84
113−T: prioeq: 1: 84
114−T: prioeq: 2: 84
115−T: prioeq: 3: 84
116−T: prioeq: 4: 84
117−
118−# Reduce prio of T3
119−C: schedfifo: 3: 80
120−T: prioeq: 0: 84
121−T: prioeq: 1: 84
122−T: prioeq: 2: 84
123−T: prioeq: 3: 84
124−T: prioeq: 4: 84
125−
126−# Increase prio of T3
127−C: schedfifo: 3: 85
128−T: prioeq: 0: 85
129−T: prioeq: 1: 85
130−T: prioeq: 2: 85
131−T: prioeq: 3: 85
132−T: prioeq: 4: 84
133−
134−# Reduce prio of T3
135−C: schedfifo: 3: 83
136−T: prioeq: 0: 84
137−T: prioeq: 1: 84
138−T: prioeq: 2: 84
139−T: prioeq: 3: 84
140−T: prioeq: 4: 84
141−
142−# Signal T4
143−C: signal: 4: 0
144−W: unlocked: 4: 3
145−T: prioeq: 0: 83
146−T: prioeq: 1: 83
147−T: prioeq: 2: 83
148−T: prioeq: 3: 83
149−
150−# Signal T3
151−C: signal: 3: 0
152−W: unlocked: 3: 2
153−T: prioeq: 0: 82
154−T: prioeq: 1: 82
155−T: prioeq: 2: 82
156−
157−# Signal T2
158−C: signal: 2: 0
159−W: unlocked: 2: 1
160−T: prioeq: 0: 81
161−T: prioeq: 1: 81
162−
163−# Signal T1
164−C: signal: 1: 0
165−W: unlocked: 1: 0
166−T: priolt: 0: 1
167−
168−# Unlock and exit
169−C: unlock: 3: 3
170−C: unlock: 2: 2
171−C: unlock: 1: 1
172−C: unlock: 0: 0
173−
174−W: unlocked: 3: 3
175−W: unlocked: 2: 2
176−W: unlocked: 1: 1
177−W: 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−#
50−C: resetevent: 0: 0
51−W: opcodeeq: 0: 0
52−
53−# Set schedulers
54−C: schedother: 0: 0
55−C: schedfifo: 1: 81
56−C: schedfifo: 2: 82
57−C: schedfifo: 3: 83
58−C: schedfifo: 4: 84
59−
60−# T0 lock L0
61−C: locknowait: 0: 0
62−W: locked: 0: 0
63−
64−# T1 lock L1
65−C: locknowait: 1: 1
66−W: locked: 1: 1
67−
68−# T1 lock L0
69−C: lockintnowait: 1: 0
70−W: blocked: 1: 0
71−T: prioeq: 0: 81
72−
73−# T2 lock L2
74−C: locknowait: 2: 2
75−W: locked: 2: 2
76−
77−# T2 lock L1
78−C: lockintnowait: 2: 1
79−W: blocked: 2: 1
80−T: prioeq: 0: 82
81−T: prioeq: 1: 82
82−
83−# T3 lock L3
84−C: locknowait: 3: 3
85−W: locked: 3: 3
86−
87−# T3 lock L2
88−C: lockintnowait: 3: 2
89−W: blocked: 3: 2
90−T: prioeq: 0: 83
91−T: prioeq: 1: 83
92−T: prioeq: 2: 83
93−
94−# T4 lock L3
95−C: lockintnowait: 4: 3
96−W: blocked: 4: 3
97−T: prioeq: 0: 84
98−T: prioeq: 1: 84
99−T: prioeq: 2: 84
100−T: prioeq: 3: 84
101−
102−# Signal T4
103−C: signal: 4: 0
104−W: unlocked: 4: 3
105−T: prioeq: 0: 83
106−T: prioeq: 1: 83
107−T: prioeq: 2: 83
108−T: prioeq: 3: 83
109−
110−# Signal T3
111−C: signal: 3: 0
112−W: unlocked: 3: 2
113−T: prioeq: 0: 82
114−T: prioeq: 1: 82
115−T: prioeq: 2: 82
116−
117−# Signal T2
118−C: signal: 2: 0
119−W: unlocked: 2: 1
120−T: prioeq: 0: 81
121−T: prioeq: 1: 81
122−
123−# Signal T1
124−C: signal: 1: 0
125−W: unlocked: 1: 0
126−T: priolt: 0: 1
127−
128−# Unlock and exit
129−C: unlock: 3: 3
130−C: unlock: 2: 2
131−C: unlock: 1: 1
132−C: unlock: 0: 0
133−
134−W: unlocked: 3: 3
135−W: unlocked: 2: 2
136−W: unlocked: 1: 1
137−W: unlocked: 0: 0
138−