Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__test

Proto:static void __printf(3, 4) __init __test(const char *expect, int elen, const char *fmt, ...)

Type:void

Parameter:

TypeParameterName
const char *expect
intelen
const char *fmt
100  If elen >= BUF_SIZE Then
101  pr_err("error in test suite: expected output length %d too long. Format was '%s'.\n", elen, fmt)
103  failed_tests++
104  Return
107  va_start(ap, fmt)
115  failed_tests += do_test(BUF_SIZE, expect, elen, fmt, ap)
116  rand = 1 + prandom_u32_max - returns a pseudo-random number in interval [0, ep_ro)*@ep_ro: right open interval endpoint* Returns a pseudo-random number that is in interval [0, ep_ro). Note* that the result depends on PRNG being well distributed in [0, ~0U]
118  failed_tests += do_test(rand, expect, elen, fmt, ap)
119  failed_tests += do_test(0, expect, elen, fmt, ap)
121  p = Simplified asprintf.
122  If p Then
123  total_tests++
124  If memcmp(p, expect, elen + 1) Then
125  pr_warn("kvasprintf(..., \"%s\", ...) returned '%s', expected '%s'\n", fmt, p, expect)
127  failed_tests++
129  kfree(p)
131  va_end(ap)
Caller
NameDescribe
test_basic