selftests/bpf: Adjust btf_dump test to reflect recent change in file_operations
Subsystems (3)
Martin KaFai Lau
reviewerPATCH 1/1 selftests/bpf: Adjust btf_dump test to reflect recent change in file_operations
From: Martin KaFai Lau <[email protected]>
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.
--- tools/testing/selftests/bpf/prog_tests/btf_dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/bpf/prog_tests/btf_dump.c +1 -1
@@ -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" ); }
Signature · 1 line
2.43.0
Quoted 11 lines · Martin KaFai Lau
From: Martin KaFai Lau <[email protected]>
The
btf_dumptest 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,'
Quoted 7 lines
The "
fop_flags" is a recent addition to the structfile_operationsin commit210a03c9d51a("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]>
Thanks for updating this!
Quoted 17 lines
--- tools/testing/selftests/bpf/prog_tests/btf_dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/testing/selftests/bpf/prog_tests/btf_dump.c +1
-1@@ -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" ); }
This patch was applied to bpf/bpf.git (master) by Daniel Borkmann <[email protected]>:
Hello:
This patch was applied to bpf/bpf.git (master)
by Daniel Borkmann <[email protected]>:
Quoted 4 lines · On Thu, 16 May 2024 09:43:10 -0700 you wrote:
From: Martin KaFai Lau <[email protected]>
The
btf_dumptest fails:
Quoted 8 lines
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,'[...]
Here is the summary with links:
- [bpf] selftests/bpf: Adjust btf_dump test to reflect recent change in file_operations
https://git.kernel.org/bpf/bpf/c/51e2b8d33199
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html