Skip to content

Commit

Permalink
selftests: bpf: fix backported ASSERT_FALSE
Browse files Browse the repository at this point in the history
BugLink: https://bugs.launchpad.net/bugs/1949019

Commit 183d9eb ("selftests/bpf: Fix core_reloc test runner") causes
builds of selftests/bpf to fail on 5.10.y since the branch doesn't have the
ASSERT_FALSE macro yet. Replace ASSERT_FALSE with ASSERT_EQ.

Fixes: 183d9eb ("selftests/bpf: Fix core_reloc test runner")
Signed-off-by: Lorenz Bauer <lmb@cloudflare.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Chia-Lin Kao (AceLan) <acelan.kao@canonical.com>
  • Loading branch information
Lorenz Bauer authored and Chia-Lin Kao (AceLan) committed Oct 28, 2021
1 parent c013e49 commit 4e427b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/testing/selftests/bpf/prog_tests/core_reloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@ void test_core_reloc(void)
goto cleanup;
}

if (!ASSERT_FALSE(test_case->fails, "obj_load_should_fail"))
if (!ASSERT_EQ(test_case->fails, false, "obj_load_should_fail"))
goto cleanup;

equal = memcmp(data->out, test_case->output,
Expand Down

0 comments on commit 4e427b1

Please sign in to comment.