-
Notifications
You must be signed in to change notification settings - Fork 996
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pty04: Limit the number of packets sent to avoid timeout
At the end of the test we continuously write data to the PTY while closing the PTY to check for races in the kernel. However if the process which closes the PTY is delayed this can result in a very large number of packets being created from the data written to the PTY. It is easy to fill the PTY buffer with a large amount of data which the kernel is slow to then parse into packets. This can result in spurious softlockup warnings and test timeouts. Theoretically the performance might be a concern for a fast enough serial line, but this is not supposed to be a performance test. So this commit limits the amount of data transmitted on the PTY by waiting for the netdev to echo the data back. This has the added benefit of testing data transmission in the opposite direction. Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com> Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
- Loading branch information
Showing
1 changed file
with
107 additions
and
26 deletions.
There are no files selected for viewing
This file contains 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