函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Same as previous test, but now with negative numbers.

函数原型:static void sysctl_test_dointvec_write_happy_single_negative(struct kunit *test)

返回类型:void

参数:

类型参数名称
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 = 读sysctl整数向量, extra1 = & i_zero, extra2 = & i_one_hundred, }
287  input[]等于"-9"
288  len等于input的长度减1
289  pos等于0
290  buffer等于kunit_kzalloc() - Just like kunit_kmalloc(), but zeroes the allocation.*@test: The test context object.*@size: The size in bytes of the desired memory.*@gfp: flags passed to underlying kmalloc().* See kzalloc() and kunit_kmalloc() for more information.
291  __useruser_buffer等于buffer
293  内存复制(buffer, input, len)
295  KUNIT_EXPECT_EQ() - Sets an expectation that @left and @right are equal(test, 0, 读sysctl整数向量)
297  KUNIT_EXPECT_EQ() - Sets an expectation that @left and @right are equal(test, input的长度 - 1, len)
298  KUNIT_EXPECT_EQ() - Sets an expectation that @left and @right are equal(test, input的长度 - 1, (size_t)pos)
299  KUNIT_EXPECT_EQ() - Sets an expectation that @left and @right are equal(test, - 9, * ((int * )data))