Function report |
Source Code:kernel\sysctl-test.c |
Create Date:2022-07-28 13:51:13 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Same as previous test, but now with negative numbers.
Proto:static void sysctl_test_dointvec_write_happy_single_negative(struct kunit *test)
Type:void
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct kunit * | test |
| 277 | data = 0 |
| 278 | struct ctl_table table = { Text ID for /proc/sys, or zero = "foo", data = & data, maxlen = sizeof(int), mode = 0644, Callback for text formatting = read a vector of integers, extra1 = & i_zero, extra2 = & i_one_hundred, } |
| 287 | input[] = "-9" |
| 289 | pos = 0 |
| 291 | __user * user_buffer = buffer |
| 293 | No 3D Now!(buffer, input, len) |
| 295 | KUNIT_EXPECT_EQ() - Sets an expectation that @left and @right are equal(test, 0, read a vector of integers) |
| 297 | KUNIT_EXPECT_EQ() - Sets an expectation that @left and @right are equal(test, size of input - 1, len) |
| 298 | KUNIT_EXPECT_EQ() - Sets an expectation that @left and @right are equal(test, size of input - 1, (size_t)pos) |
| 299 | KUNIT_EXPECT_EQ() - Sets an expectation that @left and @right are equal(test, - 9, * ((int * )data)) |
| 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 |