From 14ed33d850a70764f03368a44eeb57491f8c29f8 Mon Sep 17 00:00:00 2001 From: Travis Thieman Date: Mon, 23 Mar 2026 09:36:25 -0400 Subject: [PATCH] fix(ip): fix CI failures in fuzz test and bash comparison tests - FuzzIPSubcommand: allow exit code 255 (legitimate for ip route unknown subcommands, matching iproute2 behavior) and add regression corpus entry for "route 0" (ffdc891dc1bd740f) - route_unknown_subcmd, get_uppercase scenarios: add skip_assert_against_bash since ip is a rshell builtin not present in bash (bash returns 127) Co-Authored-By: Claude Sonnet 4.6 --- builtins/tests/ip/ip_fuzz_test.go | 2 +- .../tests/ip/testdata/fuzz/FuzzIPSubcommand/ffdc891dc1bd740f | 2 ++ tests/scenarios/cmd/ip/errors/route_unknown_subcmd.yaml | 1 + .../scenarios/cmd/ip/route_case_insensitive/get_uppercase.yaml | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 builtins/tests/ip/testdata/fuzz/FuzzIPSubcommand/ffdc891dc1bd740f diff --git a/builtins/tests/ip/ip_fuzz_test.go b/builtins/tests/ip/ip_fuzz_test.go index 53d0e3aa..bdd7f891 100644 --- a/builtins/tests/ip/ip_fuzz_test.go +++ b/builtins/tests/ip/ip_fuzz_test.go @@ -154,7 +154,7 @@ func FuzzIPSubcommand(f *testing.F) { if code == -1 { return // shell/parse error before the builtin ran — not our bug } - if code != 0 && code != 1 { + if code != 0 && code != 1 && code != 255 { t.Errorf("ip %q: unexpected exit code %d", subcmd, code) } if timedOut { diff --git a/builtins/tests/ip/testdata/fuzz/FuzzIPSubcommand/ffdc891dc1bd740f b/builtins/tests/ip/testdata/fuzz/FuzzIPSubcommand/ffdc891dc1bd740f new file mode 100644 index 00000000..e9ebb26a --- /dev/null +++ b/builtins/tests/ip/testdata/fuzz/FuzzIPSubcommand/ffdc891dc1bd740f @@ -0,0 +1,2 @@ +go test fuzz v1 +string("route 0") diff --git a/tests/scenarios/cmd/ip/errors/route_unknown_subcmd.yaml b/tests/scenarios/cmd/ip/errors/route_unknown_subcmd.yaml index 0cfc44be..d3a47bd3 100644 --- a/tests/scenarios/cmd/ip/errors/route_unknown_subcmd.yaml +++ b/tests/scenarios/cmd/ip/errors/route_unknown_subcmd.yaml @@ -1,5 +1,6 @@ # ip route exits 255 with iproute2-compatible "unknown" message. description: ip route with an unknown subcommand exits 255. +skip_assert_against_bash: true # ip is a rshell builtin; bash does not have it input: script: |+ ip route unknowncmd diff --git a/tests/scenarios/cmd/ip/route_case_insensitive/get_uppercase.yaml b/tests/scenarios/cmd/ip/route_case_insensitive/get_uppercase.yaml index bdcd5cd4..6c061f3b 100644 --- a/tests/scenarios/cmd/ip/route_case_insensitive/get_uppercase.yaml +++ b/tests/scenarios/cmd/ip/route_case_insensitive/get_uppercase.yaml @@ -1,6 +1,7 @@ # ip route GET (uppercase) is rejected — subcommand parsing is case-sensitive, # matching real iproute2 behavior. description: ip route uppercase subcommand (GET) is rejected (case-sensitive, matches iproute2). +skip_assert_against_bash: true # ip is a rshell builtin; bash does not have it input: script: |+ ip route GET