函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\locking-selftest.c Create Date:2022-07-27 07:49:57
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:dotest

函数原型:static void dotest(void (*testcase_fn)(void ), int expected, int lockclass_mask)

返回类型:void

参数:

类型参数名称
void (*testcase_fn
intexpected
intlockclass_mask
1139  saved_preempt_count等于抢占计数值
1141  WARN_ON(已禁止中断())
1143  testcase_fn()
1148  如果expected恒等于FAILUREWe want to turn all lock-debugging facilities on/off at once,* via a global flag. The reason is that once a single bug has been* detected and reported, there might be cascade of followup bugs* that would just muddy the log. So we report the first one and
1149  expected_testcase_failures自加
1150  打印标准信息("failed|")
1152  否则如果We want to turn all lock-debugging facilities on/off at once,* via a global flag. The reason is that once a single bug has been* detected and reported, there might be cascade of followup bugs* that would just muddy the log. So we report the first one and不等于expected
1155  unexpected_testcase_failures自加
1156  打印标准信息("FAILED|")
1157  否则
1158  testcase_successes自加
1159  打印标准信息(" ok |")
1161  testcase_total自加
1163  如果Change this to 1 if you want to see the failure printouts:打印标准信息(" lockclass mask: %x, debug_locks: %d, expected: %d\n", lockclass_mask, We want to turn all lock-debugging facilities on/off at once,* via a global flag. The reason is that once a single bug has been* detected and reported, there might be cascade of followup bugs* that would just muddy the log. So we report the first one and, expected)
1170  设置抢占计数
1178  reset_locks()
调用者
名称描述
ww_tests
locking_selftest测试锁的API是否正常使用