函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:test_hexdump_overflow

函数原型:static void __init test_hexdump_overflow(size_t buflen, size_t len, int rowsize, int groupsize, bool ascii)

返回类型:void

参数:

类型参数名称
size_tbuflen
size_tlen
introwsize
intgroupsize
boolascii
166  rs等于rowsize, gs等于groupsize
170  total_tests自加
172  memset(buf, FILL_CHAR, buf的长度)
174  r等于hex_dump_to_buffer - convert a blob of data to "hex ASCII" in memory*@buf: data blob to dump*@len: number of bytes in the @buf*@rowsize: number of bytes to print per line; must be 16 or 32*@groupsize: number of bytes to print at a time (1, 2, 4, 8;
180  ae等于rs乘2加rsgs加1加len
181  he等于gs乘2加1的和乘lengs减1
183  如果asciie等于ae
185  否则e等于he
188  f等于min_t - return minimum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(int, e + 1, buflen)
189  如果buflen
190  test_hexdump_prepare_test(len, rs, gs, test, test的长度, ascii)
191  test[f - 1]等于'\0'
193  memset(test + f, FILL_CHAR, test的长度 - f)
195  a等于r恒等于e且非memcmp(test, buf, TEST_HEXDUMP_BUF_SIZE)
197  buf[buf的长度 - 1]等于'\0'
199  如果非a
200  打印错误信息("Len: %zu buflen: %zu strlen: %zu\n", len, buflen, strnlen(buf, buf的长度))
202  打印错误信息("Result: %d '%s'\n", r, buf)
203  打印错误信息("Expect: %d '%s'\n", e, test)
204  failed_tests自加
调用者
名称描述
test_hexdump_overflow_set