Summary
The net_timestamping BPF selftest has subtests with colons in their names (INET4: bpf timestamping, etc.). When the traffic monitor is enabled in CI, these colons end up in pcap log filenames, which GitHub Actions' upload-artifact@v4 rejects. This causes every test_progs_parallel and test_progs_no_alu32_parallel job to fail at the artifact upload step, even when all tests pass.
Failure Details
- Test / Component: Traffic monitor pcap filename generation (
encode_test_name() in network_helpers.c) triggered by net_timestamping subtests
- Frequency: Every run — affects all
test_progs_parallel and test_progs_no_alu32_parallel jobs on x86_64 gcc-15 since the net_timestamping test was merged
- Failure mode: Artifact upload timeout/rejection — the test itself passes, but CI job is marked as failed
- Affected architectures: x86_64 (parallel jobs only run on x86_64)
- CI runs observed:
Root Cause Analysis
The encode_test_name() function at tools/testing/selftests/bpf/network_helpers.c:1137 constructs filenames for traffic monitor pcap logs. It sanitizes / and (space) characters by replacing them with underscores, but does not sanitize colons (:).
The net_timestamping test (tools/testing/selftests/bpf/prog_tests/net_timestamping.c:231-238), introduced in commit f4924aec58dd ("selftests/bpf: Add simple bpf tests in the tx path for timestamping feature"), has four subtests with colons in their names:
test__start_subtest("INET4: bpf timestamping")
test__start_subtest("INET4: bpf and socket timestamping")
test__start_subtest("INET6: bpf timestamping")
test__start_subtest("INET6: bpf and socket timestamping")
When traffic monitoring is enabled in CI (TEST_PROGS_TRAFFIC_MONITOR=true in the CI environment, which passes -m '*' to test_progs), traffic_monitor_start() calls encode_test_name() which produces filenames like:
packets-133-0-net_timestamping__INET4:_bpf_timestamping-net_timestamping_ns.log
The colon in INET4: passes through encode_test_name() unsanitized. GitHub Actions' upload-artifact@v4 rejects files with colons (and other special characters: ", <, >, |, *, ?), producing this error:
The path for one of the files in artifact is not valid:
/packets-133-0-net_timestamping__INET4:_bpf_timestamping-net_timestamping_ns.log.
Contains the following character: Colon :
The upload then times out, and the entire job is marked as failed.
Proposed Fix
Replace the two separate strchr() loops in encode_test_name() with a single strpbrk() call that sanitizes all problematic characters (/, , :, ") at once. This is both a fix and a simplification.
See patch: 0001-selftests-bpf-Sanitize-colons-in-traffic-monitor-pca.patch
- while ((p = strchr(buf, '/')))
- *p = '_';
- while ((p = strchr(buf, ' ')))
+ while ((p = strpbrk(buf, " /:\"")))
*p = '_';
Impact
Without the fix, every CI run's parallel test jobs (test_progs_parallel and test_progs_no_alu32_parallel) fail at the artifact upload step. While these parallel jobs use continue_on_error: true so they don't block the overall CI run, they still produce a "failure" status that:
- Degrades CI signal quality (2 false failures per run)
- Makes it harder to notice genuine regressions in parallel test results
- Wastes developer time investigating false failures
References
tools/testing/selftests/bpf/network_helpers.c:1137 — encode_test_name() function
tools/testing/selftests/bpf/prog_tests/net_timestamping.c:231 — subtests with colons
- Commit
f4924aec58dd — introduced net_timestamping test with colon-containing subtest names
- Commit
f52403b6bfea — introduced encode_test_name() and traffic monitor filename generation
- GitHub Actions artifact upload character restrictions:
", :, <, >, |, *, ?
Summary
The
net_timestampingBPF selftest has subtests with colons in their names (INET4: bpf timestamping, etc.). When the traffic monitor is enabled in CI, these colons end up in pcap log filenames, which GitHub Actions'upload-artifact@v4rejects. This causes everytest_progs_parallelandtest_progs_no_alu32_paralleljob to fail at the artifact upload step, even when all tests pass.Failure Details
encode_test_name()innetwork_helpers.c) triggered bynet_timestampingsubteststest_progs_parallelandtest_progs_no_alu32_paralleljobs on x86_64 gcc-15 since thenet_timestampingtest was mergedRoot Cause Analysis
The
encode_test_name()function attools/testing/selftests/bpf/network_helpers.c:1137constructs filenames for traffic monitor pcap logs. It sanitizes/and(space) characters by replacing them with underscores, but does not sanitize colons (:).The
net_timestampingtest (tools/testing/selftests/bpf/prog_tests/net_timestamping.c:231-238), introduced in commitf4924aec58dd("selftests/bpf: Add simple bpf tests in the tx path for timestamping feature"), has four subtests with colons in their names:When traffic monitoring is enabled in CI (
TEST_PROGS_TRAFFIC_MONITOR=truein the CI environment, which passes-m '*'to test_progs),traffic_monitor_start()callsencode_test_name()which produces filenames like:The colon in
INET4:passes throughencode_test_name()unsanitized. GitHub Actions'upload-artifact@v4rejects files with colons (and other special characters:",<,>,|,*,?), producing this error:The upload then times out, and the entire job is marked as failed.
Proposed Fix
Replace the two separate
strchr()loops inencode_test_name()with a singlestrpbrk()call that sanitizes all problematic characters (/,,:,") at once. This is both a fix and a simplification.See patch:
0001-selftests-bpf-Sanitize-colons-in-traffic-monitor-pca.patchImpact
Without the fix, every CI run's parallel test jobs (
test_progs_parallelandtest_progs_no_alu32_parallel) fail at the artifact upload step. While these parallel jobs usecontinue_on_error: trueso they don't block the overall CI run, they still produce a "failure" status that:References
tools/testing/selftests/bpf/network_helpers.c:1137—encode_test_name()functiontools/testing/selftests/bpf/prog_tests/net_timestamping.c:231— subtests with colonsf4924aec58dd— introducednet_timestampingtest with colon-containing subtest namesf52403b6bfea— introducedencode_test_name()and traffic monitor filename generation",:,<,>,|,*,?