Lines Matching defs:tests
38 /* Redefine REGs to make tests less verbose */
82 int stack_depth; /* for eBPF only, since tests don't call verifier */
464 static struct bpf_test tests[] = {
5503 * this tests that the JIT/interpreter correctly resets X
6539 if (tests[which].fill_helper)
6540 return tests[which].u.ptr.len;
6542 fp = tests[which].u.insns;
6552 if (tests[which].fill_helper)
6553 return tests[which].u.ptr.insns;
6555 return tests[which].u.insns;
6560 __u8 test_type = tests[which].aux & TEST_TYPE_MASK;
6572 if (tests[which].aux & FLAG_EXPECTED_FAIL) {
6573 if (*err == tests[which].expected_errcode) {
6606 fp->aux->stack_depth = tests[which].stack_depth;
6625 __u8 test_type = tests[which].aux & TEST_TYPE_MASK;
6668 * NOTE: Several sub-tests may be present, in which case
6705 static int test_range[2] = { 0, ARRAY_SIZE(tests) - 1 };
6712 for (i = 0; i < ARRAY_SIZE(tests); i++) {
6713 if (!strcmp(tests[i].descr, test_name))
6728 if (test_id >= ARRAY_SIZE(tests)) {
6753 if (test_range[0] >= ARRAY_SIZE(tests) ||
6754 test_range[1] >= ARRAY_SIZE(tests) ||
6766 for (i = 0; i < ARRAY_SIZE(tests); i++) {
6767 if (tests[i].fill_helper &&
6768 tests[i].fill_helper(&tests[i]) < 0)
6779 for (i = 0; i < ARRAY_SIZE(tests); i++) {
6780 if (tests[i].fill_helper)
6781 kfree(tests[i].u.ptr.insns);
6976 for (i = 0; i < ARRAY_SIZE(tests); i++) {
6984 pr_info("#%d %s ", i, tests[i].descr);
7002 err = run_one(fp, &tests[i]);