On 16/05/2024 17:43, Martin KaFai Lau wrote: > From: Martin KaFai Lau <martin.lau@xxxxxxxxxx> > > 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 210a03c9d51a ("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 <martin.lau@xxxxxxxxxx> Reviewed-by: Alan Maguire <alan.maguire@xxxxxxxxxx> Thanks for updating this! > --- > tools/testing/selftests/bpf/prog_tests/btf_dump.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/testing/selftests/bpf/prog_tests/btf_dump.c b/tools/testing/selftests/bpf/prog_tests/btf_dump.c > index e9ea38aa8248..09a8e6f9b379 100644 > --- a/tools/testing/selftests/bpf/prog_tests/btf_dump.c > +++ b/tools/testing/selftests/bpf/prog_tests/btf_dump.c > @@ -653,7 +653,7 @@ static void test_btf_dump_struct_data(struct btf *btf, struct btf_dump *d, > cmpstr = > "(struct file_operations){\n" > " .owner = (struct module *)0xffffffffffffffff,\n" > -" .llseek = (loff_t (*)(struct file *, loff_t, int))0xffffffffffffffff,"; > +" .fop_flags = (fop_flags_t)4294967295,"; > > ASSERT_STRNEQ(str, cmpstr, strlen(cmpstr), "file_operations"); > }