函数逻辑报告 |
Source Code:lib\locking-selftest.c |
Create Date:2022-07-27 07:50:16 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:测试锁的API是否正常使用
函数原型:void locking_selftest(void)
返回类型:void
参数:无
1975 | printk("----------------------------------\n") |
1976 | printk("| Locking API testsuite disabled |\n") |
1977 | printk("----------------------------------\n") |
1978 | 返回 |
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") |
2006 | 打印标准信息(" |") |
2007 | dotest(Special-case for read-locking, they are* allowed to recurse on the same lock class:, SUCCESS, LOCKTYPE_RWLOCK) |
2008 | 打印标准信息(" |") |
2009 | dotest(rsem_AA1, FAILURE, LOCKTYPE_RWSEM) |
2010 | 打印标准信息("\n") |
2012 | print_testname("recursive read-lock #2") |
2013 | 打印标准信息(" |") |
2014 | dotest(rlock_AA1B, SUCCESS, LOCKTYPE_RWLOCK) |
2015 | 打印标准信息(" |") |
2016 | dotest(rsem_AA1B, FAILURE, LOCKTYPE_RWSEM) |
2017 | 打印标准信息("\n") |
2019 | print_testname("mixed read-write-lock") |
2020 | 打印标准信息(" |") |
2022 | 打印标准信息(" |") |
2023 | dotest(rsem_AA2, FAILURE, LOCKTYPE_RWSEM) |
2024 | 打印标准信息("\n") |
2026 | print_testname("mixed write-read-lock") |
2027 | 打印标准信息(" |") |
2028 | dotest(rlock_AA3, FAILURE, LOCKTYPE_RWLOCK) |
2029 | 打印标准信息(" |") |
2030 | dotest(rsem_AA3, FAILURE, LOCKTYPE_RWSEM) |
2031 | 打印标准信息("\n") |
2033 | print_testname("mixed read-lock/lock-write ABBA") |
2034 | 打印标准信息(" |") |
2044 | 打印标准信息(" |") |
2045 | dotest(rwsem_ABBA1, FAILURE, LOCKTYPE_RWSEM) |
2047 | print_testname("mixed read-lock/lock-read ABBA") |
2048 | 打印标准信息(" |") |
2050 | 打印标准信息(" |") |
2051 | dotest(rwsem_ABBA2, FAILURE, LOCKTYPE_RWSEM) |
2053 | print_testname("mixed write-lock/lock-write ABBA") |
2054 | 打印标准信息(" |") |
2056 | 打印标准信息(" |") |
2057 | dotest(rwsem_ABBA3, FAILURE, LOCKTYPE_RWSEM) |
2059 | printk(" --------------------------------------------------------------------------\n") |
2074 | ww_tests() |
2076 | 如果unexpected_testcase_failures则 |
2077 | printk("-----------------------------------------------------------------\n") |
2079 | printk("BUG: %3d unexpected failures (out of %3d) - debugging disabled! |\n", unexpected_testcase_failures, testcase_total) |
2081 | printk("-----------------------------------------------------------------\n") |
2082 | 否则如果expected_testcase_failures且testcase_successes则 |
2083 | printk("--------------------------------------------------------\n") |
2084 | printk("%3d out of %3d testcases failed, as expected. |\n", expected_testcase_failures, testcase_total) |
2086 | printk("----------------------------------------------------\n") |
2088 | 否则如果expected_testcase_failures且非testcase_successes则 |
2089 | printk("--------------------------------------------------------\n") |
2090 | printk("All %3d testcases failed, as expected. |\n", expected_testcase_failures) |
2092 | printk("----------------------------------------\n") |
2094 | 否则 |
2095 | printk("-------------------------------------------------------\n") |
2096 | printk("Good, all %3d testcases passed! |\n", testcase_successes) |
2098 | printk("---------------------------------\n") |
2101 | lockdep_set_selftest_task(NULL) |
名称 | 描述 |
---|---|
start_kernel | 启动内核 |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |