• Ingo Molnar's avatar
    [PATCH] lockdep: locking API self tests · cae2ed9a
    Ingo Molnar authored
    Introduce DEBUG_LOCKING_API_SELFTESTS, which uses the generic lock debugging
    code's silent-failure feature to run a matrix of testcases.  There are 210
    testcases currently:
    
      +-----------------------
      | Locking API testsuite:
      +------------------------------+------+------+------+------+------+------+
                                     | spin |wlock |rlock |mutex | wsem | rsem |
      -------------------------------+------+------+------+------+------+------+
                         A-A deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
                     A-B-B-A deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
                 A-B-B-C-C-A deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
                 A-B-C-A-B-C deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
             A-B-B-C-C-D-D-A deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
             A-B-C-D-B-D-D-A deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
             A-B-C-D-B-C-D-A deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
                        double unlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
                     bad unlock order:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
      --------------------------------------+------+------+------+------+------+
                  recursive read-lock:             |  ok  |             |  ok  |
      --------------------------------------+------+------+------+------+------+
                    non-nested unlock:  ok  |  ok  |  ok  |  ok  |
      --------------------------------------+------+------+------+
         hard-irqs-on + irq-safe-A/12:  ok  |  ok  |  ok  |
         soft-irqs-on + irq-safe-A/12:  ok  |  ok  |  ok  |
         hard-irqs-on + irq-safe-A/21:  ok  |  ok  |  ok  |
         soft-irqs-on + irq-safe-A/21:  ok  |  ok  |  ok  |
           sirq-safe-A => hirqs-on/12:  ok  |  ok  |  ok  |
           sirq-safe-A => hirqs-on/21:  ok  |  ok  |  ok  |
             hard-safe-A + irqs-on/12:  ok  |  ok  |  ok  |
             soft-safe-A + irqs-on/12:  ok  |  ok  |  ok  |
             hard-safe-A + irqs-on/21:  ok  |  ok  |  ok  |
             soft-safe-A + irqs-on/21:  ok  |  ok  |  ok  |
        hard-safe-A + unsafe-B #1/123:  ok  |  ok  |  ok  |
        soft-safe-A + unsafe-B #1/123:  ok  |  ok  |  ok  |
        hard-safe-A + unsafe-B #1/132:  ok  |  ok  |  ok  |
        soft-safe-A + unsafe-B #1/132:  ok  |  ok  |  ok  |
        hard-safe-A + unsafe-B #1/213:  ok  |  ok  |  ok  |
        soft-safe-A + unsafe-B #1/213:  ok  |  ok  |  ok  |
        hard-safe-A + unsafe-B #1/231:  ok  |  ok  |  ok  |
        soft-safe-A + unsafe-B #1/231:  ok  |  ok  |  ok  |
        hard-safe-A + unsafe-B #1/312:  ok  |  ok  |  ok  |
        soft-safe-A + unsafe-B #1/312:  ok  |  ok  |  ok  |
        hard-safe-A + unsafe-B #1/321:  ok  |  ok  |  ok  |
        soft-safe-A + unsafe-B #1/321:  ok  |  ok  |  ok  |
        hard-safe-A + unsafe-B #2/123:  ok  |  ok  |  ok  |
        soft-safe-A + unsafe-B #2/123:  ok  |  ok  |  ok  |
        hard-safe-A + unsafe-B #2/132:  ok  |  ok  |  ok  |
        soft-safe-A + unsafe-B #2/132:  ok  |  ok  |  ok  |
        hard-safe-A + unsafe-B #2/213:  ok  |  ok  |  ok  |
        soft-safe-A + unsafe-B #2/213:  ok  |  ok  |  ok  |
        hard-safe-A + unsafe-B #2/231:  ok  |  ok  |  ok  |
        soft-safe-A + unsafe-B #2/231:  ok  |  ok  |  ok  |
        hard-safe-A + unsafe-B #2/312:  ok  |  ok  |  ok  |
        soft-safe-A + unsafe-B #2/312:  ok  |  ok  |  ok  |
        hard-safe-A + unsafe-B #2/321:  ok  |  ok  |  ok  |
        soft-safe-A + unsafe-B #2/321:  ok  |  ok  |  ok  |
          hard-irq lock-inversion/123:  ok  |  ok  |  ok  |
          soft-irq lock-inversion/123:  ok  |  ok  |  ok  |
          hard-irq lock-inversion/132:  ok  |  ok  |  ok  |
          soft-irq lock-inversion/132:  ok  |  ok  |  ok  |
          hard-irq lock-inversion/213:  ok  |  ok  |  ok  |
          soft-irq lock-inversion/213:  ok  |  ok  |  ok  |
          hard-irq lock-inversion/231:  ok  |  ok  |  ok  |
          soft-irq lock-inversion/231:  ok  |  ok  |  ok  |
          hard-irq lock-inversion/312:  ok  |  ok  |  ok  |
          soft-irq lock-inversion/312:  ok  |  ok  |  ok  |
          hard-irq lock-inversion/321:  ok  |  ok  |  ok  |
          soft-irq lock-inversion/321:  ok  |  ok  |  ok  |
          hard-irq read-recursion/123:  ok  |
          soft-irq read-recursion/123:  ok  |
          hard-irq read-recursion/132:  ok  |
          soft-irq read-recursion/132:  ok  |
          hard-irq read-recursion/213:  ok  |
          soft-irq read-recursion/213:  ok  |
          hard-irq read-recursion/231:  ok  |
          soft-irq read-recursion/231:  ok  |
          hard-irq read-recursion/312:  ok  |
          soft-irq read-recursion/312:  ok  |
          hard-irq read-recursion/321:  ok  |
          soft-irq read-recursion/321:  ok  |
      --------------------------------+-----+----------------
      Good, all 210 testcases passed! |
      --------------------------------+
    Signed-off-by: 's avatarIngo Molnar <mingo@elte.hu>
    Signed-off-by: 's avatarArjan van de Ven <arjan@linux.intel.com>
    Signed-off-by: 's avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: 's avatarLinus Torvalds <torvalds@osdl.org>
    cae2ed9a
Name
Last commit
Last update
..
reed_solomon Loading commit data...
zlib_deflate Loading commit data...
zlib_inflate Loading commit data...
.gitignore Loading commit data...
Kconfig Loading commit data...
Kconfig.debug Loading commit data...
Makefile Loading commit data...
bitmap.c Loading commit data...
bust_spinlocks.c Loading commit data...
cmdline.c Loading commit data...
cpumask.c Loading commit data...
crc-ccitt.c Loading commit data...
crc16.c Loading commit data...
crc32.c Loading commit data...
crc32defs.h Loading commit data...
ctype.c Loading commit data...
debug_locks.c Loading commit data...
dec_and_lock.c Loading commit data...
div64.c Loading commit data...
dump_stack.c Loading commit data...
errno.c Loading commit data...
extable.c Loading commit data...
find_next_bit.c Loading commit data...
gen_crc32table.c Loading commit data...
genalloc.c Loading commit data...
halfmd4.c Loading commit data...
hweight.c Loading commit data...
idr.c Loading commit data...
inflate.c Loading commit data...
int_sqrt.c Loading commit data...
iomap.c Loading commit data...
iomap_copy.c Loading commit data...
kernel_lock.c Loading commit data...
klist.c Loading commit data...
kobject.c Loading commit data...
kobject_uevent.c Loading commit data...
kref.c Loading commit data...
libcrc32c.c Loading commit data...
locking-selftest-hardirq.h Loading commit data...
locking-selftest-mutex.h Loading commit data...
locking-selftest-rlock-hardirq.h Loading commit data...
locking-selftest-rlock-softirq.h Loading commit data...
locking-selftest-rlock.h Loading commit data...
locking-selftest-rsem.h Loading commit data...
locking-selftest-softirq.h Loading commit data...
locking-selftest-spin-hardirq.h Loading commit data...
locking-selftest-spin-softirq.h Loading commit data...
locking-selftest-spin.h Loading commit data...
locking-selftest-wlock-hardirq.h Loading commit data...
locking-selftest-wlock-softirq.h Loading commit data...
locking-selftest-wlock.h Loading commit data...
locking-selftest-wsem.h Loading commit data...
locking-selftest.c Loading commit data...
parser.c Loading commit data...
percpu_counter.c Loading commit data...
plist.c Loading commit data...
prio_tree.c Loading commit data...
radix-tree.c Loading commit data...
rbtree.c Loading commit data...
rwsem-spinlock.c Loading commit data...
rwsem.c Loading commit data...
semaphore-sleepers.c Loading commit data...
sha1.c Loading commit data...
smp_processor_id.c Loading commit data...
sort.c Loading commit data...
spinlock_debug.c Loading commit data...
string.c Loading commit data...
swiotlb.c Loading commit data...
textsearch.c Loading commit data...
ts_bm.c Loading commit data...
ts_fsm.c Loading commit data...
ts_kmp.c Loading commit data...
vsprintf.c Loading commit data...