All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Vineet Gupta" <vineet.gupta@linux.dev>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH bpf-next] selftests/bpf: Sanitize traffic monitor log file names
Date: Thu, 06 Aug 2026 21:17:40 +0000	[thread overview]
Message-ID: <20260806211740.E9F851F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260806211105.3307932-1-vineet.gupta@linux.dev>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] The backslash character `\` is missing from the sanitization string, leaving artifact names vulnerable to rejection by GitHub Actions.
- [Low] The newly introduced multi-line comment violates the BPF subsystem's strict comment style guidelines.
--

--- Patch [1]: [PATCH bpf-next] selftests/bpf: Sanitize traffic monitor log file names ---
commit 4eb40c6024aab5f28e7a52af3fba116cbdeff427
Author: Vineet Gupta <vineet.gupta@linux.dev>

selftests/bpf: Sanitize traffic monitor log file names

The traffic monitor names its capture logs after the test and subtest
being run, replacing '/' and ' ' so the result is usable as a file name.
This patch replaces the whole set of awkward characters in one pass to
fix artifact upload failures in CI systems like GitHub Actions.

Link: https://github.com/kernel-patches/vmtest/actions/runs/30710914503/job/91399011388 [1]

> diff --git a/tools/testing/selftests/bpf/network_helpers.c b/tools/testing/selftests/bpf/network_helpers.c
> index db935a9d9fc1a..3818cec354a0d 100644
> --- a/tools/testing/selftests/bpf/network_helpers.c
> +++ b/tools/testing/selftests/bpf/network_helpers.c
> @@ -1142,10 +1142,13 @@ static void encode_test_name(char *buf, size_t len, const char *test_name, const
>  		snprintf(buf, len, "%s__%s", test_name, subtest_name);
>  	else
>  		snprintf(buf, len, "%s", test_name);
> -	while ((p = strchr(buf, '/')))
> -		*p = '_';
> -	while ((p = strchr(buf, ' ')))
> -		*p = '_';
> +	/* Test names are free form, so replace anything that is awkward in a
> +	 * file name. Besides the path separator, this covers the characters
> +	 * rejected by CI systems collecting these logs as artifacts.
> +	 */

[Severity: Low]
This isn't a bug, but does this multi-line comment in encode_test_name()
conflict with the BPF subsystem's comment style guidelines? The opening /*
is typically expected to be placed on its own line.

> +	for (p = buf; *p; p++)
> +		if (strchr("/ \":<>|*?\r\n", *p))

[Severity: Medium]
Since this is meant to cover characters rejected by CI systems like GitHub
Actions, should the backslash character '\\' also be included in this
sanitization string?

If a test or subtest name contains a backslash, it appears the artifact
upload could still fail.

> +			*p = '_';
>  }

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260806211105.3307932-1-vineet.gupta@linux.dev?part=1

  reply	other threads:[~2026-08-06 21:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-06 21:11 [PATCH bpf-next] selftests/bpf: Sanitize traffic monitor log file names Vineet Gupta
2026-08-06 21:17 ` sashiko-bot [this message]
2026-08-06 21:37   ` Vineet Gupta
2026-08-06 21:53 ` Ihor Solodrai
2026-08-06 21:57   ` Vineet Gupta

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=20260806211740.E9F851F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=vineet.gupta@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 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.