test_struct
struct test_struct *tst;
static struct test_struct plant_and_detach_test[] = {
static struct test_struct sw_breakpoint_test[] = {
static struct test_struct bad_read_test[] = {
static struct test_struct singlestep_break_test[] = {
static struct test_struct do_kernel_clone_test[] = {
static struct test_struct sys_open_test[] = {
static struct test_struct hw_breakpoint_test[] = {
static struct test_struct hw_write_break_test[] = {
static struct test_struct hw_access_break_test[] = {
static struct test_struct nmi_sleep_test[] = {
static struct fbnic_tlv_test test_struct;
get_random_once(&test_struct,
test_struct.test_false = false;
test_struct.test_true = true;
test_struct.test_string[i] = '\0';
if (test_struct.test_string[i] < 64 ||
test_struct.test_string[i] >= 96) {
test_struct.test_string[i] %= 32;
test_struct.test_string[i] += 64;
test_struct.test_u64);
test_struct.test_s64);
test_struct.test_u32);
test_struct.test_s32);
test_struct.test_u16);
test_struct.test_s16);
test_struct.test_mac, ETH_ALEN);
test_struct.test_mac_array[i],
test_struct.test_string);
if (memcmp(&test_struct, &result_struct, sizeof(test_struct))) {
fbnic_tlv_test_dump(&test_struct, "fbnic: expected - ");
if (memcmp(&test_struct, &result_struct, sizeof(test_struct))) {
fbnic_tlv_test_dump(&test_struct, "fbnic: expected - ");
test_struct.val[0] = 0; /* init unlocked */
test_struct.val[0] = 0; /* init unlocked */
test_struct.val[0] = 0; /* init unlocked */
test_struct.val[0] = 0; /* init unlocked */
} test_struct;
kcsan_check_write(&test_struct, sizeof(test_struct));
test_struct.val[3]++; /* induce value change */
test_struct.val[3] = 42;
kcsan_check_read(&test_struct.val[3], 0);
long *flag = &test_struct.val[0]; \
{ test_kernel_write_struct, &test_struct, sizeof(test_struct), KCSAN_ACCESS_WRITE },
{ test_kernel_write_struct, &test_struct, sizeof(test_struct), KCSAN_ACCESS_WRITE },
{ test_kernel_write_struct, &test_struct, sizeof(test_struct), KCSAN_ACCESS_WRITE },
{ test_kernel_write_struct_part, &test_struct.val[3], sizeof(test_struct.val[3]), KCSAN_ACCESS_WRITE },
{ test_kernel_write_struct, &test_struct, sizeof(test_struct), KCSAN_ACCESS_WRITE },
{ test_kernel_write_struct, &test_struct, sizeof(test_struct), KCSAN_ACCESS_WRITE },
{ test_kernel_write_struct, &test_struct, sizeof(test_struct), KCSAN_ACCESS_WRITE },
{ test_kernel_read_struct_zero_size, &test_struct.val[3], 0, 0 },
struct test_struct **in0, **in1, **out, **p;
struct hlist_test_struct test_struct;
KUNIT_EXPECT_PTR_EQ(test, &test_struct,
hlist_entry(&(test_struct.list),
struct hlist_test_struct test_struct;
KUNIT_EXPECT_PTR_EQ(test, &test_struct,
hlist_entry_safe(&(test_struct.list),
struct list_test_struct test_struct;
KUNIT_EXPECT_PTR_EQ(test, &test_struct, list_entry(&(test_struct.list),