Skip to contentSkip to conversation

pty03: Regression test for slip/slcan data race

PATCH New Richard Palethorpe 3 participants 3 messages Jan 27, 2020 – Jan 28, 2020

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 pty03: Regression test for slip/slcan data race

---

V2:
+ Added kernel git commit (it appears my patch was accepted into stable)
+ Added more line disciplines
+ Require root (atleast required for TIOCVHANGUP)

The other line disciplines appear to be safe from this issue, but it can't hurt to test them IMO, as they all appear to support the basic operations required for the test.

FYI, there are one or two more pty tests to follow. I think there is a similar data race between close/hangup and the receive callback. These bugs are probably not that important, but it probably merits a bit more attention just incase something more nasty is lurking in there.

 runtest/pty                   |   1 +
 testcases/kernel/pty/Makefile |   2 +
 testcases/kernel/pty/pty03.c  | 153 ++++++++++++++++++++++++++++++++++
 3 files changed, 156 insertions(+)
 create mode 100644 testcases/kernel/pty/pty03.c
runtest/pty +1 -0
index 52e2c07f1..e484da0ff 100644
@@ -1,6 +1,7 @@
 #DESCRIPTION:Terminal type stress
 pty01 pty01
 pty02 pty02
+pty03 pty03
 ptem01 ptem01
 hangup01 hangup01
 
testcases/kernel/pty/Makefile +2 -0
index f9fc4f57e..88101a6b8 100644
@@ -26,4 +26,6 @@ include $(top_srcdir)/include/mk/testcases.mk
 
 CPPFLAGS		+= -D_GNU_SOURCE
 
+pty03: CFLAGS += -pthread
+
 include $(top_srcdir)/include/mk/generic_leaf_target.mk
testcases/kernel/pty/pty03.c new file +153 -0

153 lines not on this page · raw message

Signature · 1 line
2.24.0
#1 lore raw

PATCH v2 1/1 pty03: Regression test for slip/slcan data race

Hi!
I've added missing .gitignore entry for the test binary and pushed, thanks.

Signature · 2 lines
Cyril Hrubis
[email protected]
#2 lore raw

PATCH v2 1/1 pty03: Regression test for slip/slcan data race

Hello,

Quoted 2 lines · Cyril Hrubis

Hi!
I've added missing .gitignore entry for the test binary and pushed,

Ah, sorry about that :-)

Quoted 1 line

thanks.

Signature · 2 lines
Thank you,
Richard.