History

Fix typos in selftest/bpf files

Run spell checker on files in selftest/bpf and fixed typos.

Taichi Nishimura committed 3 years ago

Commit df71a421 parent c5a237a10 files · +13 −13Browse files

Unified · Split

10 files
  1. tools/testing/selftests/bpf/prog_tests/migrate_reuseport.c +1 −1
  2. tools/testing/selftests/bpf/prog_tests/trampoline_count.c +1 −1
  3. tools/testing/selftests/bpf/progs/btf_dump_test_case_syntax.c +1 −1
  4. tools/testing/selftests/bpf/progs/dynptr_fail.c +1 −1
  5. tools/testing/selftests/bpf/progs/strobemeta.h +1 −1
  6. tools/testing/selftests/bpf/progs/test_cls_redirect.c +3 −3
  7. tools/testing/selftests/bpf/progs/test_subprogs.c +1 −1
  8. tools/testing/selftests/bpf/progs/test_xdp_vlan.c +1 −1
  9. tools/testing/selftests/bpf/test_cpp.cpp +1 −1
  10. tools/testing/selftests/bpf/veristat.c +2 −2
tools/testing/selftests/bpf/prog_tests/migrate_reuseport.c+1−1
@@ -488,7 +488,7 @@ static void run_test(struct migrate_reuseport_test_case *test_case, · 487 unmodified lines
488 goto close_servers;488 goto close_servers;
489 }489 }
490 490
491 /* Tie requests to the first four listners */491 /* Tie requests to the first four listeners */
492 err = start_clients(test_case);492 err = start_clients(test_case);
493 if (!ASSERT_OK(err, "start_clients"))493 if (!ASSERT_OK(err, "start_clients"))
494 goto close_clients;494 goto close_clients;
tools/testing/selftests/bpf/prog_tests/trampoline_count.c+1−1
@@ -79,7 +79,7 @@ void serial_test_trampoline_count(void) · 78 unmodified lines
79 if (!ASSERT_EQ(link, NULL, "ptr_is_null"))79 if (!ASSERT_EQ(link, NULL, "ptr_is_null"))
80 goto cleanup;80 goto cleanup;
81 81
82 /* and finaly execute the probe */82 /* and finally execute the probe */
83 prog_fd = bpf_program__fd(prog);83 prog_fd = bpf_program__fd(prog);
84 if (!ASSERT_GE(prog_fd, 0, "bpf_program__fd"))84 if (!ASSERT_GE(prog_fd, 0, "bpf_program__fd"))
85 goto cleanup;85 goto cleanup;
tools/testing/selftests/bpf/progs/btf_dump_test_case_syntax.c+1−1
@@ -84,7 +84,7 @@ typedef void (*printf_fn_t)(const char *, ...); · 83 unmodified lines
84 * typedef int (*fn_t)(int);84 * typedef int (*fn_t)(int);
85 * typedef char * const * (*fn_ptr2_t)(s_t, fn_t);85 * typedef char * const * (*fn_ptr2_t)(s_t, fn_t);
86 *86 *
87 * - `fn_complext_t`: pointer to a function returning struct and accepting87 * - `fn_complex_t`: pointer to a function returning struct and accepting
88 * union and struct. All structs and enum are anonymous and defined inline.88 * union and struct. All structs and enum are anonymous and defined inline.
89 *89 *
90 * - `signal_t: pointer to a function accepting a pointer to a function as an90 * - `signal_t: pointer to a function accepting a pointer to a function as an
tools/testing/selftests/bpf/progs/dynptr_fail.c+1−1
@@ -630,7 +630,7 @@ static int release_twice_callback_fn(__u32 index, void *data) · 629 unmodified lines
630}630}
631 631
632/* Test that releasing a dynptr twice, where one of the releases happens632/* Test that releasing a dynptr twice, where one of the releases happens
633 * within a calback function, fails633 * within a callback function, fails
634 */634 */
635SEC("?raw_tp")635SEC("?raw_tp")
636__failure __msg("arg 1 is an unacquired reference")636__failure __msg("arg 1 is an unacquired reference")
tools/testing/selftests/bpf/progs/strobemeta.h+1−1
@@ -135,7 +135,7 @@ struct strobe_value_loc { · 134 unmodified lines
135 * tpidr_el0 for aarch64).135 * tpidr_el0 for aarch64).
136 * TLS_IMM_EXEC: absolute address of GOT entry containing offset136 * TLS_IMM_EXEC: absolute address of GOT entry containing offset
137 * from thread pointer;137 * from thread pointer;
138 * TLS_GENERAL_DYN: absolute addres of double GOT entry138 * TLS_GENERAL_DYN: absolute address of double GOT entry
139 * containing tls_index_t struct;139 * containing tls_index_t struct;
140 */140 */
141 int64_t offset;141 int64_t offset;
tools/testing/selftests/bpf/progs/test_cls_redirect.c+3−3
@@ -600,7 +600,7 @@ static INLINING ret_t get_next_hop(buf_t *pkt, encap_headers_t *encap, · 599 unmodified lines
600 return TC_ACT_SHOT;600 return TC_ACT_SHOT;
601 }601 }
602 602
603 /* Skip the remainig next hops (may be zero). */603 /* Skip the remaining next hops (may be zero). */
604 return skip_next_hops(pkt, encap->unigue.hop_count -604 return skip_next_hops(pkt, encap->unigue.hop_count -
605 encap->unigue.next_hop - 1);605 encap->unigue.next_hop - 1);
606}606}
@@ -610,8 +610,8 @@ static INLINING ret_t get_next_hop(buf_t *pkt, encap_headers_t *encap, · 3 unmodified lines
610 *610 *
611 * fill_tuple(&t, foo, sizeof(struct iphdr), 123, 321)611 * fill_tuple(&t, foo, sizeof(struct iphdr), 123, 321)
612 *612 *
613 * clang will substitue a costant for sizeof, which allows the verifier613 * clang will substitute a constant for sizeof, which allows the verifier
614 * to track it's value. Based on this, it can figure out the constant614 * to track its value. Based on this, it can figure out the constant
615 * return value, and calling code works while still being "generic" to615 * return value, and calling code works while still being "generic" to
616 * IPv4 and IPv6.616 * IPv4 and IPv6.
617 */617 */
tools/testing/selftests/bpf/progs/test_subprogs.c+1−1
@@ -47,7 +47,7 @@ static __noinline int sub5(int v) · 46 unmodified lines
47 return sub1(v) - 1; /* compensates sub1()'s + 1 */47 return sub1(v) - 1; /* compensates sub1()'s + 1 */
48}48}
49 49
50/* unfortunately verifier rejects `struct task_struct *t` as an unkown pointer50/* unfortunately verifier rejects `struct task_struct *t` as an unknown pointer
51 * type, so we need to accept pointer as integer and then cast it inside the51 * type, so we need to accept pointer as integer and then cast it inside the
52 * function52 * function
53 */53 */
tools/testing/selftests/bpf/progs/test_xdp_vlan.c+1−1
@@ -98,7 +98,7 @@ bool parse_eth_frame(struct ethhdr *eth, void *data_end, struct parse_pkt *pkt) · 97 unmodified lines
98 return true;98 return true;
99}99}
100 100
101/* Hint, VLANs are choosen to hit network-byte-order issues */101/* Hint, VLANs are chosen to hit network-byte-order issues */
102#define TESTVLAN 4011 /* 0xFAB */102#define TESTVLAN 4011 /* 0xFAB */
103// #define TO_VLAN 4000 /* 0xFA0 (hint 0xOA0 = 160) */103// #define TO_VLAN 4000 /* 0xFA0 (hint 0xOA0 = 160) */
104 104
tools/testing/selftests/bpf/test_cpp.cpp+1−1
@@ -91,7 +91,7 @@ static void try_skeleton_template() · 90 unmodified lines
91 91
92 skel.detach();92 skel.detach();
93 93
94 /* destructor will destory underlying skeleton */94 /* destructor will destroy underlying skeleton */
95}95}
96 96
97int main(int argc, char *argv[])97int main(int argc, char *argv[])
tools/testing/selftests/bpf/veristat.c+2−2
@@ -144,7 +144,7 @@ static struct env { · 143 unmodified lines
144 struct verif_stats *prog_stats;144 struct verif_stats *prog_stats;
145 int prog_stat_cnt;145 int prog_stat_cnt;
146 146
147 /* baseline_stats is allocated and used only in comparsion mode */147 /* baseline_stats is allocated and used only in comparison mode */
148 struct verif_stats *baseline_stats;148 struct verif_stats *baseline_stats;
149 int baseline_stat_cnt;149 int baseline_stat_cnt;
150 150
@@ -882,7 +882,7 @@ static int process_obj(const char *filename) · 731 unmodified lines
882 * that BPF object file is incomplete and has to be statically882 * that BPF object file is incomplete and has to be statically
883 * linked into a final BPF object file; instead of bailing883 * linked into a final BPF object file; instead of bailing
884 * out, report it into stderr, mark it as skipped, and884 * out, report it into stderr, mark it as skipped, and
885 * proceeed885 * proceed
886 */886 */
887 fprintf(stderr, "Failed to open '%s': %d\n", filename, -errno);887 fprintf(stderr, "Failed to open '%s': %d\n", filename, -errno);
888 env.files_skipped++;888 env.files_skipped++;