Function report | 
Source Code:lib\locking-selftest.c | 
Create Date:2022-07-28 06:53:21 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:locking_selftest
Proto:void locking_selftest(void)
Type:void
Parameter:Nothing
| 1975 | printk("----------------------------------\n") | 
| 1976 | printk("| Locking API testsuite disabled |\n") | 
| 1977 | printk("----------------------------------\n") | 
| 1978 | Return | 
| 1984 | printk("------------------------\n") | 
| 1985 | printk("| Locking API testsuite:\n") | 
| 1986 | printk("----------------------------------------------------------------------------\n") | 
| 1987 | printk(" | spin |wlock |rlock |mutex | wsem | rsem |\n") | 
| 1988 | printk(" --------------------------------------------------------------------------\n") | 
| 1990 | init_shared_classes() | 
| 1991 | 
  The locking-testsuite uses | 
| 2004 | printk(" --------------------------------------------------------------------------\n") | 
| 2005 | print_testname("recursive read-lock") | 
| 2007 | dotest(Special-case for read-locking, they are* allowed to recurse on the same lock class:, SUCCESS, LOCKTYPE_RWLOCK) | 
| 2009 | dotest(rsem_AA1, FAILURE, LOCKTYPE_RWSEM) | 
| 2012 | print_testname("recursive read-lock #2") | 
| 2014 | dotest(rlock_AA1B, SUCCESS, LOCKTYPE_RWLOCK) | 
| 2016 | dotest(rsem_AA1B, FAILURE, LOCKTYPE_RWSEM) | 
| 2019 | print_testname("mixed read-write-lock") | 
| 2023 | dotest(rsem_AA2, FAILURE, LOCKTYPE_RWSEM) | 
| 2026 | print_testname("mixed write-read-lock") | 
| 2028 | dotest(rlock_AA3, FAILURE, LOCKTYPE_RWLOCK) | 
| 2030 | dotest(rsem_AA3, FAILURE, LOCKTYPE_RWSEM) | 
| 2033 | print_testname("mixed read-lock/lock-write ABBA") | 
| 2045 | dotest(rwsem_ABBA1, FAILURE, LOCKTYPE_RWSEM) | 
| 2047 | print_testname("mixed read-lock/lock-read ABBA") | 
| 2051 | dotest(rwsem_ABBA2, FAILURE, LOCKTYPE_RWSEM) | 
| 2053 | print_testname("mixed write-lock/lock-write ABBA") | 
| 2057 | dotest(rwsem_ABBA3, FAILURE, LOCKTYPE_RWSEM) | 
| 2059 | printk(" --------------------------------------------------------------------------\n") | 
| 2074 | ww_tests() | 
| 2076 | If unexpected_testcase_failures Then | 
| 2077 | printk("-----------------------------------------------------------------\n") | 
| 2079 | printk("BUG: %3d unexpected failures (out of %3d) - debugging disabled! |\n", unexpected_testcase_failures, testcase_total) | 
| 2081 | printk("-----------------------------------------------------------------\n") | 
| 2082 | Else if expected_testcase_failures && testcase_successes Then | 
| 2083 | printk("--------------------------------------------------------\n") | 
| 2084 | printk("%3d out of %3d testcases failed, as expected. |\n", expected_testcase_failures, testcase_total) | 
| 2086 | printk("----------------------------------------------------\n") | 
| 2088 | Else if expected_testcase_failures && Not testcase_successes Then | 
| 2089 | printk("--------------------------------------------------------\n") | 
| 2090 | printk("All %3d testcases failed, as expected. |\n", expected_testcase_failures) | 
| 2092 | printk("----------------------------------------\n") | 
| 2094 | Else | 
| 2095 | printk("-------------------------------------------------------\n") | 
| 2096 | printk("Good, all %3d testcases passed! |\n", testcase_successes) | 
| 2098 | printk("---------------------------------\n") | 
| 2101 | lockdep_set_selftest_task(NULL) | 
| Source code conversion tool public plug-in interface  | X | 
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion  |