Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\locking-selftest.c Create Date:2022-07-28 06:53:02
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:dotest

Proto:static void dotest(void (*testcase_fn)(void ), int expected, int lockclass_mask)

Type:void

Parameter:

TypeParameterName
void (*testcase_fn
intexpected
intlockclass_mask
1139  saved_preempt_count = We mask the PREEMPT_NEED_RESCHED bit so as not to confuse all current users* that think a non-zero value indicates we cannot preempt.
1141  WARN_ON(Some architectures don't define arch_irqs_disabled(), so even if either* definition would be fine we need to use different ones for the time being* to avoid build issues.())
1143  testcase_fn()
1148  If expected == FAILURE && 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 Then
1149  expected_testcase_failures++
1150  Like KERN_CONT, pr_cont() should only be used when continuing* a line with no newline ('\n') enclosed. Otherwise it defaults* back to KERN_DEFAULT.("failed|")
1152  Else If 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 Then
1155  unexpected_testcase_failures++
1156  Like KERN_CONT, pr_cont() should only be used when continuing* a line with no newline ('\n') enclosed. Otherwise it defaults* back to KERN_DEFAULT.("FAILED|")
1157  Else
1158  testcase_successes++
1159  Like KERN_CONT, pr_cont() should only be used when continuing* a line with no newline ('\n') enclosed. Otherwise it defaults* back to KERN_DEFAULT.(" ok |")
1161  testcase_total++
1163  If Change this to 1 if you want to see the failure printouts: Then Like KERN_CONT, pr_cont() should only be used when continuing* a line with no newline ('\n') enclosed. Otherwise it defaults* back to KERN_DEFAULT.(" 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  preempt_count_set(saved_preempt_count)
1178  reset_locks()
Caller
NameDescribe
ww_tests
locking_selftest