Skip to content

Commit d3abefe

Browse files
Slo-Pixanakryiko
authored andcommitted
selftests/bpf: Fix typos and grammar in test sources
Fix spelling typos and grammar errors in BPF selftests source code. Signed-off-by: Shubham Sharma <slopixelz@gmail.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20250826125746.17983-1-slopixelz@gmail.com
1 parent 2660b9d commit d3abefe

28 files changed

+36
-36
lines changed

tools/testing/selftests/bpf/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ $(HOST_BPFOBJ): $(wildcard $(BPFDIR)/*.[ch] $(BPFDIR)/Makefile) \
398398
DESTDIR=$(HOST_SCRATCH_DIR)/ prefix= all install_headers
399399
endif
400400

401-
# vmlinux.h is first dumped to a temprorary file and then compared to
401+
# vmlinux.h is first dumped to a temporary file and then compared to
402402
# the previous version. This helps to avoid unnecessary re-builds of
403403
# $(TRUNNER_BPF_OBJS)
404404
$(INCLUDE_DIR)/vmlinux.h: $(VMLINUX_BTF) $(BPFTOOL) | $(INCLUDE_DIR)

tools/testing/selftests/bpf/bench.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ extern const struct bench bench_rename_rawtp;
499499
extern const struct bench bench_rename_fentry;
500500
extern const struct bench bench_rename_fexit;
501501

502-
/* pure counting benchmarks to establish theoretical lmits */
502+
/* pure counting benchmarks to establish theoretical limits */
503503
extern const struct bench bench_trig_usermode_count;
504504
extern const struct bench bench_trig_syscall_count;
505505
extern const struct bench bench_trig_kernel_count;

tools/testing/selftests/bpf/prog_tests/btf_dump.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ static int test_btf_dump_case(int n, struct btf_dump_test_case *t)
6363

6464
/* tests with t->known_ptr_sz have no "long" or "unsigned long" type,
6565
* so it's impossible to determine correct pointer size; but if they
66-
* do, it should be 8 regardless of host architecture, becaues BPF
66+
* do, it should be 8 regardless of host architecture, because BPF
6767
* target is always 64-bit
6868
*/
6969
if (!t->known_ptr_sz) {

tools/testing/selftests/bpf/prog_tests/fd_array.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ static int get_btf_id_by_fd(int btf_fd, __u32 *id)
293293
* 1) Create a new btf, it's referenced only by a file descriptor, so refcnt=1
294294
* 2) Load a BPF prog with fd_array[0] = btf_fd; now btf's refcnt=2
295295
* 3) Close the btf_fd, now refcnt=1
296-
* Wait and check that BTF stil exists.
296+
* Wait and check that BTF still exists.
297297
*/
298298
static void check_fd_array_cnt__referenced_btfs(void)
299299
{

tools/testing/selftests/bpf/prog_tests/kprobe_multi_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ static bool skip_entry(char *name)
463463
return false;
464464
}
465465

466-
/* Do comparision by ignoring '.llvm.<hash>' suffixes. */
466+
/* Do comparison by ignoring '.llvm.<hash>' suffixes. */
467467
static int compare_name(const char *name1, const char *name2)
468468
{
469469
const char *res1, *res2;

tools/testing/selftests/bpf/prog_tests/module_attach.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ void test_module_attach(void)
9090

9191
test_module_attach__detach(skel);
9292

93-
/* attach fentry/fexit and make sure it get's module reference */
93+
/* attach fentry/fexit and make sure it gets module reference */
9494
link = bpf_program__attach(skel->progs.handle_fentry);
9595
if (!ASSERT_OK_PTR(link, "attach_fentry"))
9696
goto cleanup;

tools/testing/selftests/bpf/prog_tests/reg_bounds.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -623,15 +623,15 @@ static void range_cond(enum num_t t, struct range x, struct range y,
623623
*newx = range(t, x.a, x.b);
624624
*newy = range(t, y.a + 1, y.b);
625625
} else if (x.a == x.b && x.b == y.b) {
626-
/* X is a constant matching rigth side of Y */
626+
/* X is a constant matching right side of Y */
627627
*newx = range(t, x.a, x.b);
628628
*newy = range(t, y.a, y.b - 1);
629629
} else if (y.a == y.b && x.a == y.a) {
630630
/* Y is a constant matching left side of X */
631631
*newx = range(t, x.a + 1, x.b);
632632
*newy = range(t, y.a, y.b);
633633
} else if (y.a == y.b && x.b == y.b) {
634-
/* Y is a constant matching rigth side of X */
634+
/* Y is a constant matching right side of X */
635635
*newx = range(t, x.a, x.b - 1);
636636
*newy = range(t, y.a, y.b);
637637
} else {

tools/testing/selftests/bpf/prog_tests/stacktrace_build_id.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ void test_stacktrace_build_id(void)
3939
bpf_map_update_elem(control_map_fd, &key, &val, 0);
4040

4141
/* for every element in stackid_hmap, we can find a corresponding one
42-
* in stackmap, and vise versa.
42+
* in stackmap, and vice versa.
4343
*/
4444
err = compare_map_keys(stackid_hmap_fd, stackmap_fd);
4545
if (CHECK(err, "compare_map_keys stackid_hmap vs. stackmap",

tools/testing/selftests/bpf/prog_tests/stacktrace_build_id_nmi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ void test_stacktrace_build_id_nmi(void)
6666
bpf_map_update_elem(control_map_fd, &key, &val, 0);
6767

6868
/* for every element in stackid_hmap, we can find a corresponding one
69-
* in stackmap, and vise versa.
69+
* in stackmap, and vice versa.
7070
*/
7171
err = compare_map_keys(stackid_hmap_fd, stackmap_fd);
7272
if (CHECK(err, "compare_map_keys stackid_hmap vs. stackmap",

tools/testing/selftests/bpf/prog_tests/stacktrace_map.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ void test_stacktrace_map(void)
5050
bpf_map_update_elem(control_map_fd, &key, &val, 0);
5151

5252
/* for every element in stackid_hmap, we can find a corresponding one
53-
* in stackmap, and vise versa.
53+
* in stackmap, and vice versa.
5454
*/
5555
err = compare_map_keys(stackid_hmap_fd, stackmap_fd);
5656
if (CHECK(err, "compare_map_keys stackid_hmap vs. stackmap",

0 commit comments

Comments
 (0)