diff options
Diffstat (limited to 'tools/lib/lockdep/tests')
-rw-r--r-- | tools/lib/lockdep/tests/AA.sh | 2 | ||||
-rw-r--r-- | tools/lib/lockdep/tests/ABA.sh | 2 | ||||
-rw-r--r-- | tools/lib/lockdep/tests/ABBA.c | 3 | ||||
-rw-r--r-- | tools/lib/lockdep/tests/ABBA.sh | 2 | ||||
-rw-r--r-- | tools/lib/lockdep/tests/ABBA_2threads.sh | 2 | ||||
-rw-r--r-- | tools/lib/lockdep/tests/ABBCCA.c | 4 | ||||
-rw-r--r-- | tools/lib/lockdep/tests/ABBCCA.sh | 2 | ||||
-rw-r--r-- | tools/lib/lockdep/tests/ABBCCDDA.c | 5 | ||||
-rw-r--r-- | tools/lib/lockdep/tests/ABBCCDDA.sh | 2 | ||||
-rw-r--r-- | tools/lib/lockdep/tests/ABCABC.c | 4 | ||||
-rw-r--r-- | tools/lib/lockdep/tests/ABCABC.sh | 2 | ||||
-rw-r--r-- | tools/lib/lockdep/tests/ABCDBCDA.c | 5 | ||||
-rw-r--r-- | tools/lib/lockdep/tests/ABCDBCDA.sh | 2 | ||||
-rw-r--r-- | tools/lib/lockdep/tests/ABCDBDDA.c | 5 | ||||
-rw-r--r-- | tools/lib/lockdep/tests/ABCDBDDA.sh | 2 | ||||
-rw-r--r-- | tools/lib/lockdep/tests/WW.sh | 2 | ||||
-rw-r--r-- | tools/lib/lockdep/tests/unlock_balance.c | 2 | ||||
-rw-r--r-- | tools/lib/lockdep/tests/unlock_balance.sh | 2 |
18 files changed, 50 insertions, 0 deletions
diff --git a/tools/lib/lockdep/tests/AA.sh b/tools/lib/lockdep/tests/AA.sh new file mode 100644 index 000000000000..f39b32865074 --- /dev/null +++ b/tools/lib/lockdep/tests/AA.sh | |||
@@ -0,0 +1,2 @@ | |||
1 | #!/bin/bash | ||
2 | grep -q 'WARNING: possible recursive locking detected' | ||
diff --git a/tools/lib/lockdep/tests/ABA.sh b/tools/lib/lockdep/tests/ABA.sh new file mode 100644 index 000000000000..f39b32865074 --- /dev/null +++ b/tools/lib/lockdep/tests/ABA.sh | |||
@@ -0,0 +1,2 @@ | |||
1 | #!/bin/bash | ||
2 | grep -q 'WARNING: possible recursive locking detected' | ||
diff --git a/tools/lib/lockdep/tests/ABBA.c b/tools/lib/lockdep/tests/ABBA.c index 1460afd33d71..623313f54720 100644 --- a/tools/lib/lockdep/tests/ABBA.c +++ b/tools/lib/lockdep/tests/ABBA.c | |||
@@ -11,4 +11,7 @@ void main(void) | |||
11 | 11 | ||
12 | LOCK_UNLOCK_2(a, b); | 12 | LOCK_UNLOCK_2(a, b); |
13 | LOCK_UNLOCK_2(b, a); | 13 | LOCK_UNLOCK_2(b, a); |
14 | |||
15 | pthread_mutex_destroy(&b); | ||
16 | pthread_mutex_destroy(&a); | ||
14 | } | 17 | } |
diff --git a/tools/lib/lockdep/tests/ABBA.sh b/tools/lib/lockdep/tests/ABBA.sh new file mode 100644 index 000000000000..fc31c607a5a8 --- /dev/null +++ b/tools/lib/lockdep/tests/ABBA.sh | |||
@@ -0,0 +1,2 @@ | |||
1 | #!/bin/bash | ||
2 | grep -q 'WARNING: possible circular locking dependency detected' | ||
diff --git a/tools/lib/lockdep/tests/ABBA_2threads.sh b/tools/lib/lockdep/tests/ABBA_2threads.sh new file mode 100644 index 000000000000..fc31c607a5a8 --- /dev/null +++ b/tools/lib/lockdep/tests/ABBA_2threads.sh | |||
@@ -0,0 +1,2 @@ | |||
1 | #!/bin/bash | ||
2 | grep -q 'WARNING: possible circular locking dependency detected' | ||
diff --git a/tools/lib/lockdep/tests/ABBCCA.c b/tools/lib/lockdep/tests/ABBCCA.c index a54c1b2af118..48446129d496 100644 --- a/tools/lib/lockdep/tests/ABBCCA.c +++ b/tools/lib/lockdep/tests/ABBCCA.c | |||
@@ -13,4 +13,8 @@ void main(void) | |||
13 | LOCK_UNLOCK_2(a, b); | 13 | LOCK_UNLOCK_2(a, b); |
14 | LOCK_UNLOCK_2(b, c); | 14 | LOCK_UNLOCK_2(b, c); |
15 | LOCK_UNLOCK_2(c, a); | 15 | LOCK_UNLOCK_2(c, a); |
16 | |||
17 | pthread_mutex_destroy(&c); | ||
18 | pthread_mutex_destroy(&b); | ||
19 | pthread_mutex_destroy(&a); | ||
16 | } | 20 | } |
diff --git a/tools/lib/lockdep/tests/ABBCCA.sh b/tools/lib/lockdep/tests/ABBCCA.sh new file mode 100644 index 000000000000..fc31c607a5a8 --- /dev/null +++ b/tools/lib/lockdep/tests/ABBCCA.sh | |||
@@ -0,0 +1,2 @@ | |||
1 | #!/bin/bash | ||
2 | grep -q 'WARNING: possible circular locking dependency detected' | ||
diff --git a/tools/lib/lockdep/tests/ABBCCDDA.c b/tools/lib/lockdep/tests/ABBCCDDA.c index aa5d194e8869..3570bf7b3804 100644 --- a/tools/lib/lockdep/tests/ABBCCDDA.c +++ b/tools/lib/lockdep/tests/ABBCCDDA.c | |||
@@ -15,4 +15,9 @@ void main(void) | |||
15 | LOCK_UNLOCK_2(b, c); | 15 | LOCK_UNLOCK_2(b, c); |
16 | LOCK_UNLOCK_2(c, d); | 16 | LOCK_UNLOCK_2(c, d); |
17 | LOCK_UNLOCK_2(d, a); | 17 | LOCK_UNLOCK_2(d, a); |
18 | |||
19 | pthread_mutex_destroy(&d); | ||
20 | pthread_mutex_destroy(&c); | ||
21 | pthread_mutex_destroy(&b); | ||
22 | pthread_mutex_destroy(&a); | ||
18 | } | 23 | } |
diff --git a/tools/lib/lockdep/tests/ABBCCDDA.sh b/tools/lib/lockdep/tests/ABBCCDDA.sh new file mode 100644 index 000000000000..fc31c607a5a8 --- /dev/null +++ b/tools/lib/lockdep/tests/ABBCCDDA.sh | |||
@@ -0,0 +1,2 @@ | |||
1 | #!/bin/bash | ||
2 | grep -q 'WARNING: possible circular locking dependency detected' | ||
diff --git a/tools/lib/lockdep/tests/ABCABC.c b/tools/lib/lockdep/tests/ABCABC.c index b54a08e60416..a1c4659894cd 100644 --- a/tools/lib/lockdep/tests/ABCABC.c +++ b/tools/lib/lockdep/tests/ABCABC.c | |||
@@ -13,4 +13,8 @@ void main(void) | |||
13 | LOCK_UNLOCK_2(a, b); | 13 | LOCK_UNLOCK_2(a, b); |
14 | LOCK_UNLOCK_2(c, a); | 14 | LOCK_UNLOCK_2(c, a); |
15 | LOCK_UNLOCK_2(b, c); | 15 | LOCK_UNLOCK_2(b, c); |
16 | |||
17 | pthread_mutex_destroy(&c); | ||
18 | pthread_mutex_destroy(&b); | ||
19 | pthread_mutex_destroy(&a); | ||
16 | } | 20 | } |
diff --git a/tools/lib/lockdep/tests/ABCABC.sh b/tools/lib/lockdep/tests/ABCABC.sh new file mode 100644 index 000000000000..fc31c607a5a8 --- /dev/null +++ b/tools/lib/lockdep/tests/ABCABC.sh | |||
@@ -0,0 +1,2 @@ | |||
1 | #!/bin/bash | ||
2 | grep -q 'WARNING: possible circular locking dependency detected' | ||
diff --git a/tools/lib/lockdep/tests/ABCDBCDA.c b/tools/lib/lockdep/tests/ABCDBCDA.c index a56742250d86..335af1c90ab5 100644 --- a/tools/lib/lockdep/tests/ABCDBCDA.c +++ b/tools/lib/lockdep/tests/ABCDBCDA.c | |||
@@ -15,4 +15,9 @@ void main(void) | |||
15 | LOCK_UNLOCK_2(c, d); | 15 | LOCK_UNLOCK_2(c, d); |
16 | LOCK_UNLOCK_2(b, c); | 16 | LOCK_UNLOCK_2(b, c); |
17 | LOCK_UNLOCK_2(d, a); | 17 | LOCK_UNLOCK_2(d, a); |
18 | |||
19 | pthread_mutex_destroy(&d); | ||
20 | pthread_mutex_destroy(&c); | ||
21 | pthread_mutex_destroy(&b); | ||
22 | pthread_mutex_destroy(&a); | ||
18 | } | 23 | } |
diff --git a/tools/lib/lockdep/tests/ABCDBCDA.sh b/tools/lib/lockdep/tests/ABCDBCDA.sh new file mode 100644 index 000000000000..fc31c607a5a8 --- /dev/null +++ b/tools/lib/lockdep/tests/ABCDBCDA.sh | |||
@@ -0,0 +1,2 @@ | |||
1 | #!/bin/bash | ||
2 | grep -q 'WARNING: possible circular locking dependency detected' | ||
diff --git a/tools/lib/lockdep/tests/ABCDBDDA.c b/tools/lib/lockdep/tests/ABCDBDDA.c index 238a3353f3c3..3c5972863049 100644 --- a/tools/lib/lockdep/tests/ABCDBDDA.c +++ b/tools/lib/lockdep/tests/ABCDBDDA.c | |||
@@ -15,4 +15,9 @@ void main(void) | |||
15 | LOCK_UNLOCK_2(c, d); | 15 | LOCK_UNLOCK_2(c, d); |
16 | LOCK_UNLOCK_2(b, d); | 16 | LOCK_UNLOCK_2(b, d); |
17 | LOCK_UNLOCK_2(d, a); | 17 | LOCK_UNLOCK_2(d, a); |
18 | |||
19 | pthread_mutex_destroy(&d); | ||
20 | pthread_mutex_destroy(&c); | ||
21 | pthread_mutex_destroy(&b); | ||
22 | pthread_mutex_destroy(&a); | ||
18 | } | 23 | } |
diff --git a/tools/lib/lockdep/tests/ABCDBDDA.sh b/tools/lib/lockdep/tests/ABCDBDDA.sh new file mode 100644 index 000000000000..fc31c607a5a8 --- /dev/null +++ b/tools/lib/lockdep/tests/ABCDBDDA.sh | |||
@@ -0,0 +1,2 @@ | |||
1 | #!/bin/bash | ||
2 | grep -q 'WARNING: possible circular locking dependency detected' | ||
diff --git a/tools/lib/lockdep/tests/WW.sh b/tools/lib/lockdep/tests/WW.sh new file mode 100644 index 000000000000..f39b32865074 --- /dev/null +++ b/tools/lib/lockdep/tests/WW.sh | |||
@@ -0,0 +1,2 @@ | |||
1 | #!/bin/bash | ||
2 | grep -q 'WARNING: possible recursive locking detected' | ||
diff --git a/tools/lib/lockdep/tests/unlock_balance.c b/tools/lib/lockdep/tests/unlock_balance.c index 34cf32f689de..dba25064b50a 100644 --- a/tools/lib/lockdep/tests/unlock_balance.c +++ b/tools/lib/lockdep/tests/unlock_balance.c | |||
@@ -10,4 +10,6 @@ void main(void) | |||
10 | pthread_mutex_lock(&a); | 10 | pthread_mutex_lock(&a); |
11 | pthread_mutex_unlock(&a); | 11 | pthread_mutex_unlock(&a); |
12 | pthread_mutex_unlock(&a); | 12 | pthread_mutex_unlock(&a); |
13 | |||
14 | pthread_mutex_destroy(&a); | ||
13 | } | 15 | } |
diff --git a/tools/lib/lockdep/tests/unlock_balance.sh b/tools/lib/lockdep/tests/unlock_balance.sh new file mode 100644 index 000000000000..c6e3952303fe --- /dev/null +++ b/tools/lib/lockdep/tests/unlock_balance.sh | |||
@@ -0,0 +1,2 @@ | |||
1 | #!/bin/bash | ||
2 | grep -q 'WARNING: bad unlock balance detected' | ||