pty: Test data transmission with SLIP line discipline
PATCH v2 1/1 pty: Test data transmission with SLIP line discipline
Basic transmission test and try to trigger a possible race between receiving and hangup (it appears there is none from my testing).
This only includes SLIP for now, but more disciplines can be added. Probably at least CAN. However the packet generation will be different for each.
---
V2:
* Validate received data
* Remove TTY ldisc and rename SLIP to match kernel def
runtest/pty | 1 + testcases/kernel/pty/.gitignore | 1 + testcases/kernel/pty/pty04.c | 278 ++++++++++++++++++++++++++++++++ 3 files changed, 280 insertions(+) create mode 100644 testcases/kernel/pty/pty04.c
runtest/pty +1 -0
@@ -2,6 +2,7 @@ pty01 pty01 pty02 pty02 pty03 pty03 +pty04 pty04 ptem01 ptem01 hangup01 hangup01
testcases/kernel/pty/.gitignore +1 -0
@@ -3,3 +3,4 @@ /pty01 /pty02 /pty03 +/pty04
testcases/kernel/pty/pty04.c new file +278 -0
278 lines not on this page · raw message
Signature · 1 line
2.24.0
PATCH v2 1/1 pty: Test data transmission with SLIP line discipline
Quoted 7 lines · Richard Palethorpe
Basic transmission test and try to trigger a possible race between receiving and hangup (it appears there is none from my testing).
This only includes SLIP for now, but more disciplines can be added. Probably at least CAN. However the packet generation will be different for each.
Signed-off-by Richard Palethorpe <[email protected]>
...
Quoted 3 lines
testcases/kernel/pty/pty04.c new file +0
-0@@ -0,0 +1,278 @@
...
testcases/kernel/pty/pty04.c line 56
Quoted 8 lines
testcases/kernel/pty/pty04.c new file +8
-0+struct ldisc_info { +int n; +char *name; +int max_mtu; +}; + +static struct ldisc_info ldiscs[] = { + {1 ,"N_SLIP" ,8192 },
I meant using N_SLIP instead of magic "1", not in the string :).
thanks,
Signature · 2 lines
js suse labs