QUIC MULTISTREAM TEST: add OP_POP_ERR
authorHugo Landau <hlandau@openssl.org>
Thu, 9 Nov 2023 10:27:14 +0000 (10:27 +0000)
committerHugo Landau <hlandau@openssl.org>
Thu, 21 Dec 2023 08:12:06 +0000 (08:12 +0000)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

test/quic_multistream_test.c

index 604c2f986b813751929f2d242af1e810d0f12856..3782e65286b695e4fa49409452de4b807cd19222 100644 (file)
@@ -182,6 +182,7 @@ struct script_op {
 #define OPK_C_SKIP_IF_UNBOUND                       48
 #define OPK_S_SET_INJECT_DATAGRAM                   49
 #define OPK_S_SHUTDOWN                              50
+#define OPK_POP_ERR                                 51
 
 #define EXPECT_CONN_CLOSE_APP       (1U << 0)
 #define EXPECT_CONN_CLOSE_REMOTE    (1U << 1)
@@ -320,6 +321,8 @@ struct script_op {
     {OPK_S_SET_INJECT_DATAGRAM, NULL, 0, NULL, NULL, 0, NULL, NULL, (f)},
 #define OP_S_SHUTDOWN(error_code) \
     {OPK_S_SHUTDOWN, NULL, (error_code)},
+#define OP_POP_ERR() \
+    {OPK_POP_ERR},
 
 static OSSL_TIME get_time(void *arg)
 {
@@ -1110,6 +1113,7 @@ static int run_script_worker(struct helper *h, const struct script_op *script,
                 case OPK_C_EXPECT_SSL_ERR:
                 case OPK_EXPECT_ERR_REASON:
                 case OPK_EXPECT_ERR_LIB:
+                case OPK_POP_ERR:
                 case OPK_SLEEP:
                     break;
 
@@ -1866,6 +1870,10 @@ static int run_script_worker(struct helper *h, const struct script_op *script,
             }
             break;
 
+        case OPK_POP_ERR:
+            ERR_pop();
+            break;
+
         case OPK_SLEEP:
             {
                 OSSL_sleep(op->arg2);