[PATCH] Tests: fixed stop_SSL() usage in ssl.t

Maxim Dounin mdounin at mdounin.ru
Sun Jan 11 03:11:11 UTC 2026


# HG changeset patch
# User Maxim Dounin <mdounin at mdounin.ru>
# Date 1768100931 -10800
#      Sun Jan 11 06:08:51 2026 +0300
# Node ID b51387cf0ef442b073a9cb93dc4c604001bdcd26
# Parent  b79ae9f9b554a2a8e1bdc9fde7f5730914b363ee
Tests: fixed stop_SSL() usage in ssl.t.

IO::Socket::SSL's stop_SSL() is documented to return true on success,
and not 1, so testing for 1 is wrong.  This was missed during conversion
from Net::SSLeay to IO::Socket::SSL in 1866:a797d7428fa5.  Further,
IO::Socket::SSL started to actually return an object on success in recently
released version 2.096, breaking the test.

Fix is to use ok() test instead of is(), properly testing for a true value
being returned.

diff --git a/ssl.t b/ssl.t
--- a/ssl.t
+++ b/ssl.t
@@ -268,7 +268,7 @@ ok(get_ssl_socket(8085), 'ssl unexpected
 
 # close_notify is sent before lingering close
 
-is(get_ssl_shutdown(8085), 1, 'ssl shutdown on lingering close');
+ok(get_ssl_shutdown(8085), 'ssl shutdown on lingering close');
 
 $t->stop();
 



More information about the nginx-devel mailing list