函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Test that writing a value smaller than the minimum possible value is not* allowed.

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

返回类型:void

参数:

类型参数名称
struct kunit *test
309  data等于0
310  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, }
319  max_len等于32, len等于max_len
320  pos等于0
321  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.
322  __useruser_buffer等于buffer
323  abs_of_less_than_min等于INT_MAXINT_MAXINT_MIN加1
330  KUNIT_ASSERT_LT() - An assertion that @left is less than @right(test, (size_t)snprintf - Format a string and place it in a buffer*@buf: The buffer to place the result into*@size: The size of the buffer, including the trailing null space*@fmt: The format string to use*@, max_len)
335  KUNIT_EXPECT_EQ() - Sets an expectation that @left and @right are equal(test, - EINVAL, 读sysctl整数向量)
337  KUNIT_EXPECT_EQ() - Sets an expectation that @left and @right are equal(test, max_len, len)
338  KUNIT_EXPECT_EQ() - Sets an expectation that @left and @right are equal(test, 0, * ((int * )data))