BPF Archive mirror
 help / color / mirror / Atom feed
From: Alan Maguire <alan.maguire@oracle.com>
To: Martin KaFai Lau <martin.lau@linux.dev>, bpf@vger.kernel.org
Cc: Alexei Starovoitov <ast@kernel.org>,
	Andrii Nakryiko <andrii@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	kernel-team@meta.com
Subject: Re: [PATCH bpf] selftests/bpf: Adjust btf_dump test to reflect recent change in file_operations
Date: Thu, 16 May 2024 17:54:56 +0100	[thread overview]
Message-ID: <ff24d1c4-5255-4396-ad19-9da99864946d@oracle.com> (raw)
In-Reply-To: <20240516164310.2481460-1-martin.lau@linux.dev>

On 16/05/2024 17:43, Martin KaFai Lau wrote:
> From: Martin KaFai Lau <martin.lau@kernel.org>
> 
> 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@kernel.org>

Reviewed-by: Alan Maguire <alan.maguire@oracle.com>

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");
>  	}

  reply	other threads:[~2024-05-16 16:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-16 16:43 [PATCH bpf] selftests/bpf: Adjust btf_dump test to reflect recent change in file_operations Martin KaFai Lau
2024-05-16 16:54 ` Alan Maguire [this message]
2024-05-17  0:00 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ff24d1c4-5255-4396-ad19-9da99864946d@oracle.com \
    --to=alan.maguire@oracle.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kernel-team@meta.com \
    --cc=martin.lau@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).