Lines Matching defs:test

21 /* General test specific settings */
28 /* Few constants used to init test 'skb' */
51 /* Flags that can be passed to test cases */
78 } test[MAX_SUBTESTS];
85 /* Large test cases need separate allocation and fill handler. */
921 "JGE (jt 0), test 1",
934 "JGE (jt 0), test 2",
1173 /* Have to test all register combinations, since
5076 "JMP_JGE_X: ldimm64 test 1",
5091 "JMP_JGE_X: ldimm64 test 2",
5105 "JMP_JGE_X: ldimm64 test 3",
5120 "JMP_JLE_X: ldimm64 test 1",
5135 "JMP_JLE_X: ldimm64 test 2",
5149 "JMP_JLE_X: ldimm64 test 3",
5295 "BPF_MAXINSNS: Jump heavy test",
6093 "LDX_MSH standalone, test result 1",
6105 "LDX_MSH standalone, test result 2",
6342 "JNE signed compare, test 1",
6358 "JNE signed compare, test 2",
6374 "JNE signed compare, test 3",
6391 "JNE signed compare, test 4",
6404 "JNE signed compare, test 5",
6417 "JNE signed compare, test 6",
6430 "JNE signed compare, test 7",
6461 /* Initialize a fake skb with test pattern. */
6480 static void *generate_test_data(struct bpf_test *test, int sub)
6485 if (test->aux & FLAG_NO_DATA)
6492 skb = populate_skb(test->data, test->test[sub].data_size);
6496 if (test->aux & FLAG_SKB_FRAG) {
6498 * when the test requires a fragmented skb, add a
6500 * test->frag_data.
6512 memcpy(ptr, test->frag_data, MAX_DATA);
6526 static void release_test_data(const struct bpf_test *test, void *data)
6528 if (test->aux & FLAG_NO_DATA)
6580 /* Verifier didn't reject the test that's
6658 static int run_one(const struct bpf_prog *fp, struct bpf_test *test)
6670 * the sub-test array. The first test is always run,
6674 test->test[i].data_size == 0 &&
6675 test->test[i].result == 0)
6678 data = generate_test_data(test, i);
6679 if (!data && !(test->aux & FLAG_NO_DATA)) {
6685 release_test_data(test, data);
6687 if (ret == test->test[i].result) {
6691 test->test[i].result);
6726 * cover only that test.
6738 * test_range to cover only that test.
6743 pr_err("test_bpf: no test named '%s' found.\n",
6927 static __init int test_skb_segment_single(const struct skb_segment_test *test)
6932 skb = test->build_skb();
6938 segs = skb_segment(skb, test->features);
6953 const struct skb_segment_test *test = &skb_segment_tests[i];
6955 pr_info("#%d %s ", i, test->descr);
6957 if (test_skb_segment_single(test)) {