selftests/bpf: fix test_loader check message
authorAndrii Nakryiko <andrii@kernel.org>
Fri, 5 Jan 2024 00:09:02 +0000 (16:09 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 23 Jan 2024 22:40:21 +0000 (14:40 -0800)
Seeing:

  process_subtest:PASS:Can't alloc specs array 0 nsec

... in verbose successful test log is very confusing. Use smaller
identifier-like test tag to denote that we are asserting specs array
allocation success.

Now it's much less distracting:

  process_subtest:PASS:specs_alloc 0 nsec

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/r/20240105000909.2818934-2-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/test_loader.c

index f01391021218db0b921fbec531a0d2679617fdf1..72906d27babff2ba9b0e676b302f94aeaa66c36f 100644 (file)
@@ -688,7 +688,7 @@ static void process_subtest(struct test_loader *tester,
                ++nr_progs;
 
        specs = calloc(nr_progs, sizeof(struct test_spec));
-       if (!ASSERT_OK_PTR(specs, "Can't alloc specs array"))
+       if (!ASSERT_OK_PTR(specs, "specs_alloc"))
                return;
 
        i = 0;