• Home
  • Raw
  • Download

Lines Matching refs:buffer

36 	void __user *buffer = (void __user *)kunit_kzalloc(test, sizeof(int),  in sysctl_test_api_dointvec_null_tbl_data()  local
47 KUNIT_PROC_READ, buffer, &len, in sysctl_test_api_dointvec_null_tbl_data()
56 KUNIT_PROC_WRITE, buffer, &len, in sysctl_test_api_dointvec_null_tbl_data()
82 void __user *buffer = (void __user *)kunit_kzalloc(test, sizeof(int), in sysctl_test_api_dointvec_table_maxlen_unset() local
93 KUNIT_PROC_READ, buffer, &len, in sysctl_test_api_dointvec_table_maxlen_unset()
102 KUNIT_PROC_WRITE, buffer, &len, in sysctl_test_api_dointvec_table_maxlen_unset()
125 void __user *buffer = (void __user *)kunit_kzalloc(test, sizeof(int), in sysctl_test_api_dointvec_table_len_is_zero() local
133 KUNIT_EXPECT_EQ(test, 0, proc_dointvec(&table, KUNIT_PROC_READ, buffer, in sysctl_test_api_dointvec_table_len_is_zero()
137 KUNIT_EXPECT_EQ(test, 0, proc_dointvec(&table, KUNIT_PROC_WRITE, buffer, in sysctl_test_api_dointvec_table_len_is_zero()
159 void __user *buffer = (void __user *)kunit_kzalloc(test, sizeof(int), in sysctl_test_api_dointvec_table_read_but_position_set() local
172 KUNIT_EXPECT_EQ(test, 0, proc_dointvec(&table, KUNIT_PROC_READ, buffer, in sysctl_test_api_dointvec_table_read_but_position_set()
196 char *buffer = kunit_kzalloc(test, len, GFP_USER); in sysctl_test_dointvec_read_happy_single_positive() local
197 char __user *user_buffer = (char __user *)buffer; in sysctl_test_dointvec_read_happy_single_positive()
204 buffer[len] = '\0'; in sysctl_test_dointvec_read_happy_single_positive()
206 KUNIT_EXPECT_STREQ(test, "13\n", buffer); in sysctl_test_dointvec_read_happy_single_positive()
227 char *buffer = kunit_kzalloc(test, len, GFP_USER); in sysctl_test_dointvec_read_happy_single_negative() local
228 char __user *user_buffer = (char __user *)buffer; in sysctl_test_dointvec_read_happy_single_negative()
234 buffer[len] = '\0'; in sysctl_test_dointvec_read_happy_single_negative()
235 KUNIT_EXPECT_STREQ(test, "-16\n", buffer); in sysctl_test_dointvec_read_happy_single_negative()
257 char *buffer = kunit_kzalloc(test, len, GFP_USER); in sysctl_test_dointvec_write_happy_single_positive() local
258 char __user *user_buffer = (char __user *)buffer; in sysctl_test_dointvec_write_happy_single_positive()
260 memcpy(buffer, input, len); in sysctl_test_dointvec_write_happy_single_positive()
287 char *buffer = kunit_kzalloc(test, len, GFP_USER); in sysctl_test_dointvec_write_happy_single_negative() local
288 char __user *user_buffer = (char __user *)buffer; in sysctl_test_dointvec_write_happy_single_negative()
290 memcpy(buffer, input, len); in sysctl_test_dointvec_write_happy_single_negative()
318 char *buffer = kunit_kzalloc(test, max_len, GFP_USER); in sysctl_test_api_dointvec_write_single_less_int_min() local
319 char __user *user_buffer = (char __user *)buffer; in sysctl_test_api_dointvec_write_single_less_int_min()
328 (size_t)snprintf(buffer, max_len, "-%lu", in sysctl_test_api_dointvec_write_single_less_int_min()
356 char *buffer = kunit_kzalloc(test, max_len, GFP_USER); in sysctl_test_api_dointvec_write_single_greater_int_max() local
357 char __user *user_buffer = (char __user *)buffer; in sysctl_test_api_dointvec_write_single_greater_int_max()
361 KUNIT_ASSERT_LT(test, (size_t)snprintf(buffer, max_len, "%lu", in sysctl_test_api_dointvec_write_single_greater_int_max()