Lines Matching refs:test
17 /* The code in this file serves the sole purpose of executing test cases
18 * specified in the test_cases array. Each test case specifies a program
23 * For each test case, up to three programs are created:
29 * specified in the test case.
757 static void run_one_testcase(struct btf *btf, struct test_case *test)
762 if (!test__start_subtest(test->name))
765 switch (test->field_sz) {
779 PRINT_FAIL("Unexpected field size: %d, want 8,4,2 or 1\n", test->field_sz);
783 pinfo.prog_type = test->prog_type;
784 pinfo.expected_attach_type = test->expected_attach_type;
786 if (test->read) {
788 BPF_LDX_MEM(bpf_sz, BPF_REG_2, BPF_REG_1, test->field_offset),
801 match_program(btf, &pinfo, test->read, reg_map, false);
804 if (test->write || test->write_st || test->write_stx) {
807 BPF_STX_MEM(bpf_sz, BPF_REG_1, BPF_REG_2, test->field_offset),
817 BPF_ST_MEM(bpf_sz, BPF_REG_1, test->field_offset,
818 test->st_value.use ? test->st_value.value : 42),
828 if (test->write || test->write_stx) {
829 char *pattern = test->write_stx ? test->write_stx : test->write;
837 if (test->write || test->write_st) {
838 char *pattern = test->write_st ? test->write_st : test->write;