From: Petr Vorel <pvorel@suse.cz>
To: Avinesh Kumar <avinesh.kumar@suse.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] bpf_map01: Fix inverted condition for array map lookup pass
Date: Tue, 22 Sep 2026 19:17:59 +0200 [thread overview]
Message-ID: <20260922171759.GA2287170@pevik> (raw)
In-Reply-To: <20260922153803.257734-1-avinesh.kumar@suse.com>
Hi Avinesh,
> The check "if (i < VAL_SZ)" after the zero-value scan loop is
> backwards: it fires TPASS only when the loop broke early (i.e.
> a non-zero byte was found and TFAIL already reported), and stays
> silent when the loop completes normally with all zeros as expected.
> Report TPASS when i == VAL_SZ instead.
Thanks for an obvious fix, merged!
Kind regards,
Petr
> Fixes: b51732825077 ("BPF: Sanity check creating and updating maps")
> Signed-off-by: Avinesh Kumar <avinesh.kumar@suse.com>
> ---
> testcases/kernel/syscalls/bpf/bpf_map01.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> diff --git a/testcases/kernel/syscalls/bpf/bpf_map01.c b/testcases/kernel/syscalls/bpf/bpf_map01.c
> index 7fcf8e00fe4e..97cebf6bf6f3 100644
> --- a/testcases/kernel/syscalls/bpf/bpf_map01.c
> +++ b/testcases/kernel/syscalls/bpf/bpf_map01.c
> @@ -82,7 +82,7 @@ void run(unsigned int n)
> break;
> }
> }
> - if (i < VAL_SZ)
> + if (i == VAL_SZ)
> tst_res(TPASS, "Preallocated array map lookup");
> } else {
> tst_res(TFAIL | TTERRNO, "Prellocated array map lookup");
--
Mailing list info: https://lists.linux.it/listinfo/ltp
prev parent reply other threads:[~2026-09-22 17:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-22 15:37 [LTP] [PATCH] bpf_map01: Fix inverted condition for array map lookup pass Avinesh Kumar via ltp
2026-09-22 17:17 ` Petr Vorel [this message]
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=20260922171759.GA2287170@pevik \
--to=pvorel@suse.cz \
--cc=avinesh.kumar@suse.com \
--cc=ltp@lists.linux.it \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.