wan: remove sbni/granch driver
[linux-2.6-microblaze.git] / lib / test_bpf.c
index d500320..f6d5d30 100644 (file)
@@ -4286,8 +4286,8 @@ static struct bpf_test tests[] = {
                .u.insns_int = {
                        BPF_LD_IMM64(R0, 0),
                        BPF_LD_IMM64(R1, 0xffffffffffffffffLL),
-                       BPF_STX_MEM(BPF_W, R10, R1, -40),
-                       BPF_LDX_MEM(BPF_W, R0, R10, -40),
+                       BPF_STX_MEM(BPF_DW, R10, R1, -40),
+                       BPF_LDX_MEM(BPF_DW, R0, R10, -40),
                        BPF_EXIT_INSN(),
                },
                INTERNAL,
@@ -6659,7 +6659,14 @@ static int run_one(const struct bpf_prog *fp, struct bpf_test *test)
                u64 duration;
                u32 ret;
 
-               if (test->test[i].data_size == 0 &&
+               /*
+                * NOTE: Several sub-tests may be present, in which case
+                * a zero {data_size, result} tuple indicates the end of
+                * the sub-test array. The first test is always run,
+                * even if both data_size and result happen to be zero.
+                */
+               if (i > 0 &&
+                   test->test[i].data_size == 0 &&
                    test->test[i].result == 0)
                        break;