Function report |
Source Code:lib\test_strscpy.c |
Create Date:2022-07-28 06:32:56 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:() - Run a specific test case.*@src: Source string, argument to strscpy_pad()*@count: Size of destination buffer, argument to strscpy_pad()*@expected: Expected return value from call to strscpy_pad()
Proto:static int __init tc(char *src, int count, int expected, int chars, int terminator, int pad)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
char * | src | |
int | count | |
int | expected | |
int | chars | |
int | terminator | |
int | pad |
38 | POISON = 'z' |
42 | If Not src Then |
43 | pr_err("null source string not supported\n") |
44 | Return -1 |
50 | max_expected = count - 1 |
55 | If expected > max_expected Then |
56 | pr_warn("expected (%d) is bigger than can possibly be returned (%d)", expected, max_expected) |
84 | If terminator Then |
92 | index = chars + terminator + i |
99 | nr_bytes_poison = size of buf - chars - terminator - pad |
100 | When i < nr_bytes_poison cycle |
108 | Return 0 |
109 | fail : |
110 | failed_tests++ |
111 | Return -1 |
Name | Describe |
---|---|
selftest |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |