Skip to content

Commit

Permalink
QUIC MULTISTREAM TEST: Make error tests non-mutating and restore erro…
Browse files Browse the repository at this point in the history
…r code test

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from #22674)
  • Loading branch information
hlandau committed Dec 21, 2023
1 parent 499aacd commit f12ea1f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions test/quic_multistream_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -1858,14 +1858,14 @@ static int run_script_worker(struct helper *h, const struct script_op *script,

case OPK_EXPECT_ERR_REASON:
{
if (!TEST_size_t_eq((size_t)ERR_GET_REASON(ERR_get_error()), op->arg1))
if (!TEST_size_t_eq((size_t)ERR_GET_REASON(ERR_peek_last_error()), op->arg1))
goto out;
}
break;

case OPK_EXPECT_ERR_LIB:
{
if (!TEST_size_t_eq((size_t)ERR_GET_LIB(ERR_get_error()), op->arg1))
if (!TEST_size_t_eq((size_t)ERR_GET_LIB(ERR_peek_last_error()), op->arg1))
goto out;
}
break;
Expand Down Expand Up @@ -2723,8 +2723,14 @@ static const struct script_op script_20_child[] = {

OP_C_READ_FAIL_WAIT (a)
OP_C_EXPECT_SSL_ERR (a, SSL_ERROR_SYSCALL)
OP_EXPECT_ERR_LIB (ERR_LIB_SYS)

OP_EXPECT_ERR_LIB (ERR_LIB_SSL)
OP_EXPECT_ERR_REASON (SSL_R_PROTOCOL_IS_SHUTDOWN)

OP_POP_ERR ()
OP_EXPECT_ERR_LIB (ERR_LIB_SSL)
OP_EXPECT_ERR_REASON (SSL_R_QUIC_NETWORK_ERROR)

OP_C_FREE_STREAM (a)

OP_END
Expand Down

0 comments on commit f12ea1f

Please sign in to comment.