Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion builtins/tests/ip/ip_fuzz_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
go test fuzz v1
string("route 0")
1 change: 1 addition & 0 deletions tests/scenarios/cmd/ip/errors/route_unknown_subcmd.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# ip route <unknown> 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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Loading