Skip to content

[action] [PR:24561] [tests/console]: expand custom-escape-char param set for reverse-SSH test#1190

Merged
mssonicbld merged 1 commit into
Azure:202603from
mssonicbld:cherry/msft-202603/24561
May 13, 2026
Merged

[action] [PR:24561] [tests/console]: expand custom-escape-char param set for reverse-SSH test#1190
mssonicbld merged 1 commit into
Azure:202603from
mssonicbld:cherry/msft-202603/24561

Conversation

@mssonicbld
Copy link
Copy Markdown
Collaborator

Description of PR

Expand CUSTOM_ESCAPE_CHARS in tests/console/test_console_reversessh.py from ["b", "g", "n", "p", "y"] to ["b", "e", "f", "g", "k", "n", "p", "y"] to broaden coverage of the default_escape_char configurability with three additional readline editing actions:

char Ctrl-<char> readline action
e ENQ (0x05) end-of-line
f ACK (0x06) forward-char
k VT (0x0B) kill-line

Same selection rule as the existing entries: pure readline editing actions that are not intercepted by the SSH-client PTY line discipline, so picocom on the DUT sees the raw control byte cleanly.

Char selection — additional exclusions documented

The existing comment block already calls out signal/TTY-eaten letters. This PR adds one more exclusion line covering letters that the SSH client's PTY line discipline rewrites or swallows before they ever reach picocom:

char reason
h BS — usually rewritten by ICRNL/ECHO on the SSH client side
i Tab — TTY processes regardless of picocom mode
j LF — TTY converts to CR/LF
m CR — same
v VLNEXT — swallows the next byte, turning Ctrl-V Ctrl-X into a literal insert

Type of change

  • Bug fix
  • Testbed and Framework (new/improvement)
  • Test case(new/improvement)

Back port request

  • 202012
  • 202205
  • 202305
  • 202311
  • 202405
  • 202411

Approach

What is the motivation?

The previous parametrize set (b, g, n, p, y) covered five chars. Three more readline-only chars (e, f, k) are equally safe and add ~3 min of wall time for non-trivially better feature coverage. Test IDs read [b], [e], [f], [g], [k], [n], [p], [y] — easy to grep / -k filter.

How did you do it?

  • Append e, f, k to CUSTOM_ESCAPE_CHARS.
  • Update the explanatory comment block above the constant: extend the "selected chars" list with the three new actions, and add a new exclusion bullet for h/i/j/m/v so future contributors know why those letters are off-limits.
  • No changes to the fixture, test body, or any other test in the file.

How did you verify it?

  • flake8 --max-line-length=120 clean.
  • Live verification on a physical c0-lo testbed: 8 passed, 0 errors in 7:25, no teardown drift on CONSOLE_SWITCH|console_mgmt.default_escape_char.

Documentation

N/A.

Signed-off-by: Sonic Build Admin sonicbld@microsoft.com

…test

### Description of PR

Expand `CUSTOM_ESCAPE_CHARS` in `tests/console/test_console_reversessh.py` from `["b", "g", "n", "p", "y"]` to `["b", "e", "f", "g", "k", "n", "p", "y"]` to broaden coverage of the `default_escape_char` configurability with three additional readline editing actions:

| char | `Ctrl-<char>` | readline action |
| --- | --- | --- |
| `e` | ENQ (0x05) | end-of-line |
| `f` | ACK (0x06) | forward-char |
| `k` | VT  (0x0B) | kill-line |

Same selection rule as the existing entries: pure readline editing actions that are *not* intercepted by the SSH-client PTY line discipline, so `picocom` on the DUT sees the raw control byte cleanly.

### Char selection — additional exclusions documented

The existing comment block already calls out signal/TTY-eaten letters. This PR adds one more exclusion line covering letters that the SSH client's PTY line discipline rewrites or swallows before they ever reach `picocom`:

| char | reason |
| --- | --- |
| `h` | BS — usually rewritten by `ICRNL`/`ECHO` on the SSH client side |
| `i` | Tab — TTY processes regardless of picocom mode |
| `j` | LF — TTY converts to CR/LF |
| `m` | CR — same |
| `v` | `VLNEXT` — swallows the *next* byte, turning `Ctrl-V Ctrl-X` into a literal insert |

### Type of change
- [ ] Bug fix
- [ ] Testbed and Framework (new/improvement)
- [x] Test case(new/improvement)

### Back port request
- [ ] 202012
- [ ] 202205
- [ ] 202305
- [ ] 202311
- [ ] 202405
- [ ] 202411

### Approach

#### What is the motivation?
The previous parametrize set (`b, g, n, p, y`) covered five chars. Three more readline-only chars (`e, f, k`) are equally safe and add ~3 min of wall time for non-trivially better feature coverage. Test IDs read `[b]`, `[e]`, `[f]`, `[g]`, `[k]`, `[n]`, `[p]`, `[y]` — easy to grep / `-k` filter.

#### How did you do it?
- Append `e`, `f`, `k` to `CUSTOM_ESCAPE_CHARS`.
- Update the explanatory comment block above the constant: extend the "selected chars" list with the three new actions, and add a new exclusion bullet for `h/i/j/m/v` so future contributors know why those letters are off-limits.
- No changes to the fixture, test body, or any other test in the file.

#### How did you verify it?
- `flake8 --max-line-length=120` clean.
- Live verification on a physical c0-lo testbed: **8 passed, 0 errors in 7:25**, no teardown drift on `CONSOLE_SWITCH|console_mgmt.default_escape_char`.

### Documentation
N/A.

Signed-off-by: Sonic Build Admin <sonicbld@microsoft.com>
@mssonicbld
Copy link
Copy Markdown
Collaborator Author

Original PR: sonic-net/sonic-mgmt#24561

@mssonicbld
Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

@mssonicbld mssonicbld merged commit a68bbb8 into Azure:202603 May 13, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant