aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/sys/kern/ssl_sendfile.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/tests/sys/kern/ssl_sendfile.c b/tests/sys/kern/ssl_sendfile.c
index ad938b65ef19..d44296c90750 100644
--- a/tests/sys/kern/ssl_sendfile.c
+++ b/tests/sys/kern/ssl_sendfile.c
@@ -350,7 +350,7 @@ ATF_TC_BODY(random, tc)
require_sbytes(&c, (ssize_t)expect);
}
- common_cleanup(&c);
+ common_cleanup(&c);
}
/* Truncate the file while sendfile(2) is working on it. */
@@ -470,11 +470,12 @@ ATF_TC_BODY(eagain_vs_eof, tc)
/*
* Exercise short write due to no buffer space on non-blocking
- * socket. Internall sendfile(2) returns -1 and errno == EAGAIN.
+ * socket. Internal sendfile(2) returns -1 and errno == EAGAIN.
*/
ATF_REQUIRE(pthread_mutex_lock(&c.mtx) == 0);
sendme_locked_wait(&c, 0, FSIZE, true);
- ATF_REQUIRE(c.sbytes > 0);
+ ATF_REQUIRE_MSG(c.sbytes > 0, "c.sbytes <= 0: %jd",
+ (ossl_ssize_t)c.sbytes);
ATF_REQUIRE(SSL_get_error(c.srv, c.sbytes) == 0);
#if 0 /* see https://github.com/openssl/openssl/issues/29742 */
ATF_REQUIRE(BIO_should_retry(SSL_get_wbio(c.srv)));
@@ -484,7 +485,8 @@ ATF_TC_BODY(eagain_vs_eof, tc)
* Exercise second attempt on already full buffer.
*/
sendme_locked_wait(&c, 0, FSIZE, true);
- ATF_REQUIRE(c.sbytes == -1);
+ ATF_REQUIRE_MSG(c.sbytes == -1, "c.sbytes != -1: %jd",
+ (ossl_ssize_t)c.sbytes);
ATF_REQUIRE(SSL_get_error(c.srv, c.sbytes) == SSL_ERROR_WANT_WRITE);
ATF_REQUIRE(BIO_should_retry(SSL_get_wbio(c.srv)));
@@ -505,7 +507,8 @@ ATF_TC_BODY(eagain_vs_eof, tc)
* rather than asserts that this is a correct behavior.
*/
sendme_locked_wait(&c, FSIZE, 0, true);
- ATF_REQUIRE(c.sbytes == 0);
+ ATF_REQUIRE_MSG(c.sbytes == 0, "c.sbytes != 0: %jd",
+ (ossl_ssize_t)c.sbytes);
ATF_REQUIRE(SSL_get_error(c.srv, c.sbytes) == SSL_ERROR_SYSCALL);
#if 0 /* see https://github.com/openssl/openssl/issues/29742 */
ATF_REQUIRE(!BIO_should_retry(SSL_get_wbio(c.srv)));
@@ -515,7 +518,8 @@ ATF_TC_BODY(eagain_vs_eof, tc)
* Exercise short write due to end of file.
*/
sendme_locked_wait(&c, FSIZE - 100, 0, true);
- ATF_REQUIRE(c.sbytes == 100);
+ ATF_REQUIRE_MSG(c.sbytes == 100, "c.sbytes != 100: %jd",
+ (ossl_ssize_t)c.sbytes);
ATF_REQUIRE(SSL_get_error(c.srv, c.sbytes) == 0);
#if 0 /* see https://github.com/openssl/openssl/issues/29742 */
ATF_REQUIRE(!BIO_should_retry(SSL_get_wbio(c.srv)));