Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\sysctl-test.c Create Date:2022-07-28 13:50:57
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Test that proc_dointvec will not try to use a NULL .data field even when the* length is non-zero.

Proto:static void sysctl_test_api_dointvec_null_tbl_data(struct kunit *test)

Type:void

Parameter:

TypeParameterName
struct kunit *test
21  struct ctl_table null_data_table = { Text ID for /proc/sys, or zero = "foo", data = NULL, maxlen = sizeof(int), mode = 0644, Callback for text formatting = read a vector of integers, extra1 = & i_zero, extra2 = & i_one_hundred, }
39  __user * 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.
48  len = 1234
49  KUNIT_EXPECT_EQ() - Sets an expectation that @left and @right are equal(test, 0, read a vector of integers)
52  KUNIT_EXPECT_EQ() - Sets an expectation that @left and @right are equal(test, (size_t)0, len)
57  len = 1234
58  KUNIT_EXPECT_EQ() - Sets an expectation that @left and @right are equal(test, 0, read a vector of integers)
61  KUNIT_EXPECT_EQ() - Sets an expectation that @left and @right are equal(test, (size_t)0, len)