Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/kernel Fix random failures for pty_queue test.
details: https://anonhg.NetBSD.org/src/rev/d22abe2de148
branches: trunk
changeset: 973205:d22abe2de148
user: rin <rin%NetBSD.org@localhost>
date: Wed Jun 24 06:15:40 2020 +0000
description:
Fix random failures for pty_queue test.
Setting queue size by TIOCSQSIZE ioctl does not guarantee that data of
that size can be read by single shot of read(2).
Remove assertion based on this assertion, while total amount of data
read from child process is still checked appropriately.
diffstat:
tests/kernel/t_pty.c | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
diffs (30 lines):
diff -r 93d61d6dad35 -r d22abe2de148 tests/kernel/t_pty.c
--- a/tests/kernel/t_pty.c Wed Jun 24 05:59:18 2020 +0000
+++ b/tests/kernel/t_pty.c Wed Jun 24 06:15:40 2020 +0000
@@ -1,4 +1,4 @@
-/* $Id: t_pty.c,v 1.3 2020/06/24 05:59:18 rin Exp $ */
+/* $Id: t_pty.c,v 1.4 2020/06/24 06:15:40 rin Exp $ */
/*
* Allocates a pty(4) device, and sends the specified number of packets of the
@@ -9,7 +9,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_pty.c,v 1.3 2020/06/24 05:59:18 rin Exp $");
+__RCSID("$NetBSD: t_pty.c,v 1.4 2020/06/24 06:15:40 rin Exp $");
#include <errno.h>
#include <err.h>
@@ -231,11 +231,6 @@
break;
err(EXIT_FAILURE, "child: read()");
}
- if (qsize && size < qsize &&
- (size_t)size < buffer_size)
- errx(EXIT_FAILURE, "read returned %zd "
- "less than the queue size %d",
- size, qsize);
if (verbose)
(void)printf(
"child: read %zd bytes from TTY\n",
Home |
Main Index |
Thread Index |
Old Index