fixed typos on selftests/bpf
Subsystems (6)
PATCH 1/1 fixed typos on selftests/bpf
I run spell checker and found typos in selftest/bpf/ files. Fixed all of the detected typos.
This patch is an extra credit for kselftest task in the Linux kernel bug fixing spring unpaid 2023.
Best regards,
Taichi Nishimura
--- tools/testing/selftests/bpf/prog_tests/migrate_reuseport.c | 2 +- tools/testing/selftests/bpf/prog_tests/trampoline_count.c | 2 +- tools/testing/selftests/bpf/progs/btf_dump_test_case_syntax.c | 2 +- tools/testing/selftests/bpf/progs/dynptr_fail.c | 2 +- tools/testing/selftests/bpf/progs/strobemeta.h | 2 +- tools/testing/selftests/bpf/progs/test_cls_redirect.c | 4 ++-- tools/testing/selftests/bpf/progs/test_subprogs.c | 2 +- tools/testing/selftests/bpf/progs/test_xdp_vlan.c | 2 +- tools/testing/selftests/bpf/test_cpp.cpp | 2 +- tools/testing/selftests/bpf/veristat.c | 4 ++-- 10 files changed, 12 insertions(+), 12 deletions(-)
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, goto close_servers; } -/* Tie requests to the first four listners */ +/* Tie requests to the first four listeners */ err =start_clients (test_case);if (!ASSERT_OK (err,"start_clients" )) goto close_clients;
tools/testing/selftests/bpf/prog_tests/trampoline_count.c +1 -1
@@ -74,7 +74,7 @@ void serial_test_trampoline_count(void)if (!ASSERT_EQ (link,NULL ,"ptr_is_null" )) goto cleanup; -/* and finaly execute the probe */ +/* and finally execute the probe */ prog_fd =bpf_program__fd (prog);if (!ASSERT_GE (prog_fd,0 ,"bpf_program__fd" )) goto cleanup;
tools/testing/selftests/bpf/progs/btf_dump_test_case_syntax.c +1 -1
@@ -51,7 +51,7 @@ typedef void (*printf_fn_t)(const char *, ...);* typedef int (*fn_t)(int); * typedef char * const * (*fn_ptr2_t)(s_t, fn_t); * -* - `fn_complext_t`: pointer to a function returning struct and accepting +* - `fn_complex_t`: pointer to a function returning struct and accepting * union and struct. All structs and enum are anonymous and defined inline. * * - `signal_t: pointer to a function accepting a pointer to a function as an
tools/testing/selftests/bpf/progs/dynptr_fail.c +1 -1
@@ -623,7 +623,7 @@ static int release_twice_callback_fn(__u32 index, void *data) }/* Test that releasing a dynptr twice, where one of the releases happens -* within a calback function, fails +* within a callback function, fails */ SEC("?raw_tp") __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 {* tpidr_el0 for aarch64). * TLS_IMM_EXEC: absolute address of GOT entry containing offset * from thread pointer; -* TLS_GENERAL_DYN: absolute addres of double GOT entry +* TLS_GENERAL_DYN: absolute address of double GOT entry * containing tls_index_t struct; */ int64_t offset;
tools/testing/selftests/bpf/progs/test_cls_redirect.c +2 -2
@@ -600,7 +600,7 @@ static INLINING ret_t get_next_hop(buf_t *pkt, encap_headers_t *encap,return TC_ACT_SHOT ; } -/* Skip the remainig next hops (may be zero). */ +/* Skip the remaining next hops (may be zero). */ return skip_next_hops (pkt, encap->unigue.hop_count - encap->unigue.next_hop -1 ); }
@@ -610,7 +610,7 @@ static INLINING ret_t get_next_hop(buf_t *pkt, encap_headers_t *encap,* * fill_tuple(&t, foo, sizeof(struct iphdr), 123, 321) * -* clang will substitue a costant for sizeof, which allows the verifier +* clang will substitute a costant for sizeof, which allows the verifier * to track it's value. Based on this, it can figure out the constant * return value, and calling code works while still being "generic" to * IPv4 and IPv6.
tools/testing/selftests/bpf/progs/test_subprogs.c +1 -1
@@ -47,7 +47,7 @@ static __noinline int sub5(int v)return sub1 (v) -1 ;/* compensates sub1()'s + 1 */ } -/* unfortunately verifier rejects `struct task_struct *t` as an unkown pointer +/* unfortunately verifier rejects `struct task_struct *t` as an unknown pointer * type, so we need to accept pointer as integer and then cast it inside the * function */
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)return true; } -/* Hint, VLANs are choosen to hit network-byte-order issues */ +/* Hint, VLANs are chosen to hit network-byte-order issues */ #define TESTVLAN 4011/* 0xFAB */ // #define TO_VLAN 4000 /* 0xFA0 (hint 0xOA0 = 160) */
tools/testing/selftests/bpf/test_cpp.cpp +1 -1
@@ -91,7 +91,7 @@ static void try_skeleton_template() skel.detach(); - /* destructor will destory underlying skeleton */ + /* destructor will destroy underlying skeleton */ } int main(int argc, char *argv[])
tools/testing/selftests/bpf/veristat.c +2 -2
@@ -144,7 +144,7 @@ static struct env {struct verif_stats *prog_stats;int prog_stat_cnt; -/* baseline_stats is allocated and used only in comparsion mode */ +/* baseline_stats is allocated and used only in comparison mode */ struct verif_stats *baseline_stats;int baseline_stat_cnt;
@@ -882,7 +882,7 @@ static int process_obj(const char *filename)* that BPF object file is incomplete and has to be statically * linked into a final BPF object file; instead of bailing * out, report it into stderr, mark it as skipped, and -* proceeed +* proceed */ fprintf (stderr,"Failed to open '%s': %d\n" , filename, -errno); env.files_skipped++;
Signature · 1 line
2.25.1
Hi--
Quoted 10 lines · Taichi Nishimura
I run spell checker and found typos in selftest/bpf/ files. Fixed all of the detected typos.
This patch is an extra credit for kselftest task in the Linux kernel bug fixing spring unpaid 2023.
Best regards,
Taichi NishimuraSigned-off-by Taichi Nishimura <[email protected]>
Quoted 13 lines
--- tools/testing/selftests/bpf/prog_tests/migrate_reuseport.c | 2 +- tools/testing/selftests/bpf/prog_tests/trampoline_count.c | 2 +- tools/testing/selftests/bpf/progs/btf_dump_test_case_syntax.c | 2 +- tools/testing/selftests/bpf/progs/dynptr_fail.c | 2 +- tools/testing/selftests/bpf/progs/strobemeta.h | 2 +- tools/testing/selftests/bpf/progs/test_cls_redirect.c | 4 ++-- tools/testing/selftests/bpf/progs/test_subprogs.c | 2 +- tools/testing/selftests/bpf/progs/test_xdp_vlan.c | 2 +- tools/testing/selftests/bpf/test_cpp.cpp | 2 +- tools/testing/selftests/bpf/veristat.c | 4 ++-- 10 files changed, 12 insertions(+), 12 deletions(-)
Issues here:
tools/testing/selftests/bpf/progs/test_cls_redirect.c static INLINING ret_t get_next_hop(buf_t *pkt, encap_headers_t *encap, · line 613
Quoted 6 lines
tools/testing/selftests/bpf/progs/test_cls_redirect.c +1
-1@@ -610,7 +610,7 @@ static INLINING ret_t get_next_hop(buf_t *pkt, encap_headers_t *encap,* * fill_tuple(&t, foo, sizeof(struct iphdr), 123, 321) * -* clang will substitue a costant for sizeof, which allows the verifier +* clang will substitute a costant for sizeof, which allows the verifier
constant
tools/testing/selftests/bpf/progs/test_cls_redirect.c static INLINING ret_t get_next_hop(buf_t *pkt, encap_headers_t *encap, · line 614
Quoted 1 line
tools/testing/selftests/bpf/progs/test_cls_redirect.c +0
-0* to track it's value. Based on this, it can figure out the constant
its value.
tools/testing/selftests/bpf/progs/test_cls_redirect.c static INLINING ret_t get_next_hop(buf_t *pkt, encap_headers_t *encap, · line 616
Quoted 2 lines
tools/testing/selftests/bpf/progs/test_cls_redirect.c +0
-0* return value, and calling code works while still being "generic" to * IPv4 and IPv6.
The other changes look good. Thanks.
After fixing the issues above:
Signature · 1 line
~Randy
PATCH v2 1/1 fixed typos on selftests/bpf
Hi Randy,
Thank you for your reviewing.
I fixed costant and it's to constant and its, respectively.
Best regards,
Taichi Nishimura
--- tools/testing/selftests/bpf/progs/test_cls_redirect.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tools/testing/selftests/bpf/progs/test_cls_redirect.c +2 -2
@@ -610,8 +610,8 @@ static INLINING ret_t get_next_hop(buf_t *pkt, encap_headers_t *encap,* * fill_tuple(&t, foo, sizeof(struct iphdr), 123, 321) * -* clang will substitute a costant for sizeof, which allows the verifier -* to track it's value. Based on this, it can figure out the constant +* clang will substitute a constant for sizeof, which allows the verifier +* to track its value. Based on this, it can figure out the constant * return value, and calling code works while still being "generic" to * IPv4 and IPv6. */
Signature · 1 line
2.25.1
Quoted 9 lines · Taichi Nishimura
Hi Randy,
Thank you for your reviewing.
I fixed costant and it's to constant and its, respectively.Best regards,
Taichi NishimuraSigned-off-by Taichi Nishimura <[email protected]>
Looks good. Thanks.
Quoted 19 lines
--- tools/testing/selftests/bpf/progs/test_cls_redirect.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)tools/testing/selftests/bpf/progs/test_cls_redirect.c +2
-2@@ -610,8 +610,8 @@ static INLINING ret_t get_next_hop(buf_t *pkt, encap_headers_t *encap,* * fill_tuple(&t, foo, sizeof(struct iphdr), 123, 321) * -* clang will substitute a costant for sizeof, which allows the verifier -* to track it's value. Based on this, it can figure out the constant +* clang will substitute a constant for sizeof, which allows the verifier +* to track its value. Based on this, it can figure out the constant * return value, and calling code works while still being "generic" to * IPv4 and IPv6. */
Signature · 1 line
~Randy
Martin KaFai Lau
reviewerQuoted 18 lines · Taichi Nishimura
Hi Randy,
Thank you for your reviewing.
I fixed costant and it's to constant and its, respectively.Best regards,
Taichi NishimuraSigned-off-by Taichi Nishimura <[email protected]>--- tools/testing/selftests/bpf/progs/test_cls_redirect.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)tools/testing/selftests/bpf/progs/test_cls_redirect.c +0
-0
tools/testing/selftests/bpf/progs/test_cls_redirect.c static INLINING ret_t get_next_hop(buf_t *pkt, encap_headers_t *encap, · line 614
Quoted 7 lines
tools/testing/selftests/bpf/progs/test_cls_redirect.c +2
-2@@ -610,8 +610,8 @@ static INLINING ret_t get_next_hop(buf_t *pkt, encap_headers_t *encap,* * fill_tuple(&t, foo, sizeof(struct iphdr), 123, 321) * -* clang will substitute a costant for sizeof, which allows the verifier -* to track it's value. Based on this, it can figure out the constant +* clang will substitute a constant for sizeof, which allows the verifier +* to track its value. Based on this, it can figure out the constant
This does not apply. Ensure the diff is generated by git, and against the bpf-next tree. Please include everything in v1 also, resubmit and tag for bpf-next in the subject.