[action] [PR:24561] [tests/console]: expand custom-escape-char param set for reverse-SSH test#1190
Merged
Conversation
…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>
Collaborator
Author
|
Original PR: sonic-net/sonic-mgmt#24561 |
Collaborator
Author
|
/azp run |
|
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of PR
Expand
CUSTOM_ESCAPE_CHARSintests/console/test_console_reversessh.pyfrom["b", "g", "n", "p", "y"]to["b", "e", "f", "g", "k", "n", "p", "y"]to broaden coverage of thedefault_escape_charconfigurability with three additional readline editing actions:Ctrl-<char>efkSame selection rule as the existing entries: pure readline editing actions that are not intercepted by the SSH-client PTY line discipline, so
picocomon 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:hICRNL/ECHOon the SSH client sideijmvVLNEXT— swallows the next byte, turningCtrl-V Ctrl-Xinto a literal insertType of change
Back port request
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 /-kfilter.How did you do it?
e,f,ktoCUSTOM_ESCAPE_CHARS.h/i/j/m/vso future contributors know why those letters are off-limits.How did you verify it?
flake8 --max-line-length=120clean.CONSOLE_SWITCH|console_mgmt.default_escape_char.Documentation
N/A.
Signed-off-by: Sonic Build Admin sonicbld@microsoft.com