user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* Re: [PATCH] t/nntpd-tls: avoid test failure on OpenBSD 7.3
  2023-11-27  7:26  7% [PATCH] t/nntpd-tls: avoid test failure on OpenBSD 7.3 Eric Wong
@ 2023-11-27 10:50  7% ` Štěpán Němec
  0 siblings, 0 replies; 2+ results
From: Štěpán Němec @ 2023-11-27 10:50 UTC (permalink / raw)
  To: Eric Wong; +Cc: meta

On Mon, 27 Nov 2023 07:26:28 +0000
Eric Wong wrote:

> The LibreSSL 3.7.2 on my OpenBSD 7.3 VM seems return 7 bytes of
> junk data before EOF/ECONNRESET when a client attempts to write
> plain-text to a TLS socket.

I can confirm this patch fixes the failure on a month-old
-current with LibreSSL 3.8.2 as well.

I was going to report this at some point, but kept putting
it off (there had been some other intermittent test failures
during the recent refactorings, but not for some weeks now).

Thanks,

  Štěpán

^ permalink raw reply	[relevance 7%]

* [PATCH] t/nntpd-tls: avoid test failure on OpenBSD 7.3
@ 2023-11-27  7:26  7% Eric Wong
  2023-11-27 10:50  7% ` Štěpán Němec
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2023-11-27  7:26 UTC (permalink / raw)
  To: meta

The LibreSSL 3.7.2 on my OpenBSD 7.3 VM seems return 7 bytes of
junk data before EOF/ECONNRESET when a client attempts to write
plain-text to a TLS socket.
---
 t/nntpd-tls.t | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/t/nntpd-tls.t b/t/nntpd-tls.t
index a11a0dd9..a16cc015 100644
--- a/t/nntpd-tls.t
+++ b/t/nntpd-tls.t
@@ -187,8 +187,12 @@ for my $args (
 
 	my $s = tcp_connect($nntps);
 	syswrite($s, '->accept_SSL_ will fail on this!');
-	ok(!sysread($s, my $rbuf, 128), 'EOF or ECONNRESET on ->accept_SSL fail');
-
+	my @r;
+	do { # some platforms or OpenSSL versions need an extra read
+		push @r, sysread($s, my $rbuf, 128);
+	} while ($r[-1] && @r < 2);
+	ok(!$r[-1], 'EOF or ECONNRESET on ->accept_SSL fail') or
+		diag explain(\@r);
 	$c = undef;
 	$td->kill;
 	$td->join;

^ permalink raw reply related	[relevance 7%]

Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2023-11-27  7:26  7% [PATCH] t/nntpd-tls: avoid test failure on OpenBSD 7.3 Eric Wong
2023-11-27 10:50  7% ` Štěpán Němec

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).