Skip to content

Commit 51e2b8d

Browse files
Martin KaFai Lauborkmann
authored andcommitted
selftests/bpf: Adjust btf_dump test to reflect recent change in file_operations
The btf_dump test fails: test_btf_dump_struct_data:FAIL:file_operations unexpected file_operations: actual '(struct file_operations){ .owner = (struct module *)0xffffffffffffffff, .fop_flags = (fop_flags_t)4294967295, .llseek = (loff_t (*)(struct f' != expected '(struct file_operations){ .owner = (struct module *)0xffffffffffffffff, .llseek = (loff_t (*)(struct file *, loff_t, int))0xffffffffffffffff,' The "fop_flags" is a recent addition to the struct file_operations in commit 210a03c ("fs: claw back a few FMODE_* bits") This patch changes the test_btf_dump_struct_data() to reflect this change. Signed-off-by: Martin KaFai Lau <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Reviewed-by: Alan Maguire <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
1 parent 5405807 commit 51e2b8d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ static void test_btf_dump_struct_data(struct btf *btf, struct btf_dump *d,
653653
cmpstr =
654654
"(struct file_operations){\n"
655655
" .owner = (struct module *)0xffffffffffffffff,\n"
656-
" .llseek = (loff_t (*)(struct file *, loff_t, int))0xffffffffffffffff,";
656+
" .fop_flags = (fop_flags_t)4294967295,";
657657

658658
ASSERT_STRNEQ(str, cmpstr, strlen(cmpstr), "file_operations");
659659
}

0 commit comments

Comments
 (0)