Skip to content

Commit bace9c0

Browse files
Alexander Kiselevclaude
andcommitted
feat: Add error scenario for invalid PID attach
Tests that the debugger returns a clear error when attempting to attach to a non-existent PID (INT32_MAX, which exceeds OS limits). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 9a98ee9 commit bace9c0

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Attach Invalid PID Error Test
2+
# Tests error handling when attaching to non-existent PID
3+
4+
name: "C Attach Invalid PID Test"
5+
description: "Verifies clear error when attaching to invalid PID"
6+
7+
setup:
8+
# Compile target but do NOT run it - no process to attach to
9+
- shell: "gcc -g tests/fixtures/attach_target.c -o tests/fixtures/test_attach_c"
10+
11+
target:
12+
program: "tests/fixtures/test_attach_c"
13+
mode: "attach"
14+
# INT32_MAX exceeds OS PID limits on all platforms - guaranteed invalid
15+
pid: 2147483647
16+
adapter: "lldb"
17+
18+
steps:
19+
# This step should fail during session startup with clear error message
20+
- action: command
21+
command: "continue"
22+
expect:
23+
success: false

0 commit comments

Comments
 (0)