diff options
author | Visa Hankala <visa@cvs.openbsd.org> | 2021-12-27 16:38:07 +0000 |
---|---|---|
committer | Visa Hankala <visa@cvs.openbsd.org> | 2021-12-27 16:38:07 +0000 |
commit | fa15a81e5ffd02afb61f0043eb272de46690595a (patch) | |
tree | 5f2851b0d9b767c7212aeaf7288271266c272993 /regress/sys/kern | |
parent | 17f2538eccf53fbdf9625336717545f02fe00950 (diff) |
Reduce sensitivity to TCP segmentation in urgent data test case
Use one-byte sequences before and after urgent data so that the
socket-tcp test would be less sensitive to TCP segmentation.
Diffstat (limited to 'regress/sys/kern')
-rw-r--r-- | regress/sys/kern/poll/poll_iocond.c | 14 | ||||
-rw-r--r-- | regress/sys/kern/select/select_iocond.c | 14 |
2 files changed, 14 insertions, 14 deletions
diff --git a/regress/sys/kern/poll/poll_iocond.c b/regress/sys/kern/poll/poll_iocond.c index a292bd9166c..8bffb95e376 100644 --- a/regress/sys/kern/poll/poll_iocond.c +++ b/regress/sys/kern/poll/poll_iocond.c @@ -1,4 +1,4 @@ -/* $OpenBSD: poll_iocond.c,v 1.2 2021/12/25 11:27:19 visa Exp $ */ +/* $OpenBSD: poll_iocond.c,v 1.3 2021/12/27 16:38:06 visa Exp $ */ /* * Copyright (c) 2021 Visa Hankala @@ -396,14 +396,14 @@ proc_child(int fd, int bfd) #endif /* __OpenBSD__ */ case FTYPE_SOCKET_TCP: - ret = send(fd, &b, 2, 0); - assert(ret == 2); + ret = send(fd, &b, 1, 0); + assert(ret == 1); ret = send(fd, &b, 1, MSG_OOB); assert(ret == 1); - ret = send(fd, &b, 3, 0); - assert(ret == 3); + ret = send(fd, &b, 1, 0); + assert(ret == 1); proc_barrier(bfd); @@ -672,7 +672,7 @@ proc_parent(int fd, int bfd) err(1, "parent: ioctl(SIOCATMARK)"); assert(atmark == 0); ret = recv(fd, buf, sizeof(buf), 0); - assert(ret == 2); + assert(ret == 1); ret = poll(pfd, 2, 1); assert(ret == 1); @@ -698,7 +698,7 @@ proc_parent(int fd, int bfd) err(1, "parent: ioctl(SIOCATMARK)"); assert(atmark == 0); ret = recv(fd, buf, sizeof(buf), 0); - assert(ret == 3); + assert(ret == 1); ret = poll(pfd, 2, 1); assert(ret == 1); diff --git a/regress/sys/kern/select/select_iocond.c b/regress/sys/kern/select/select_iocond.c index 7b3db95ef86..cfa380f6eb8 100644 --- a/regress/sys/kern/select/select_iocond.c +++ b/regress/sys/kern/select/select_iocond.c @@ -1,4 +1,4 @@ -/* $OpenBSD: select_iocond.c,v 1.2 2021/12/08 13:22:53 visa Exp $ */ +/* $OpenBSD: select_iocond.c,v 1.3 2021/12/27 16:38:06 visa Exp $ */ /* * Copyright (c) 2021 Visa Hankala @@ -411,14 +411,14 @@ proc_child(int fd, int bfd) #endif /* __OpenBSD__ */ case FTYPE_SOCKET_TCP: - ret = send(fd, &b, 2, 0); - assert(ret == 2); + ret = send(fd, &b, 1, 0); + assert(ret == 1); ret = send(fd, &b, 1, MSG_OOB); assert(ret == 1); - ret = send(fd, &b, 3, 0); - assert(ret == 3); + ret = send(fd, &b, 1, 0); + assert(ret == 1); proc_barrier(bfd); @@ -670,7 +670,7 @@ proc_parent(int fd, int bfd) err(1, "parent: ioctl(SIOCATMARK)"); assert(atmark == 0); ret = recv(fd, buf, sizeof(buf), 0); - assert(ret == 2); + assert(ret == 1); fdset_init(&rfd, &wfd, &efd, fd); ret = select(fd + 1, &rfd, &wfd, &efd, &tv); @@ -700,7 +700,7 @@ proc_parent(int fd, int bfd) err(1, "parent: ioctl(SIOCATMARK)"); assert(atmark == 0); ret = recv(fd, buf, sizeof(buf), 0); - assert(ret == 3); + assert(ret == 1); fdset_init(&rfd, &wfd, &efd, fd); ret = select(fd + 1, &rfd, &wfd, &efd, &tv); |