Commit a049871a8d for openssl.org
commit a049871a8dd8895c1051dc9fe7762ba3e5314f10
Author: Andrew Dinh <andrewd@openssl.org>
Date: Wed Jul 8 22:11:21 2026 +0700
Port script_22
Assisted-by: Codex:gpt-5.5
Reviewed-by: Saša NedvÄ›dický <sashan@openssl.org>
Reviewed-by: Bob Beck <beck@openssl.org>
MergeDate: Thu Jul 30 06:12:42 2026
(Merged from https://github.com/openssl/openssl/pull/32003)
diff --git a/test/quic_multistream_test.c b/test/quic_multistream_test.c
index ed124a5e46..87107803b9 100644
--- a/test/quic_multistream_test.c
+++ b/test/quic_multistream_test.c
@@ -2201,31 +2201,8 @@ static const struct script_op script_21[] = {
};
/* 22. Fault injection - non-zero packet header reserved bits */
-static int script_22_inject_plain(struct helper *h, QUIC_PKT_HDR *hdr,
- unsigned char *buf, size_t len)
-{
- if (h->inject_word0 == 0)
- return 1;
-
- hdr->reserved = 1;
- return 1;
-}
-
static const struct script_op script_22[] = {
- OP_S_SET_INJECT_PLAIN(script_22_inject_plain),
- OP_C_SET_ALPN("ossltest"),
- OP_C_CONNECT_WAIT(),
-
- OP_C_WRITE(DEFAULT, "apple", 5),
- OP_S_BIND_STREAM_ID(a, C_BIDI_ID(0)),
- OP_S_READ_EXPECT(a, "apple", 5),
-
- OP_SET_INJECT_WORD(1, 0),
-
- OP_S_WRITE(a, "orange", 6),
-
- OP_C_EXPECT_CONN_CLOSE_INFO(OSSL_QUIC_ERR_PROTOCOL_VIOLATION, 0, 0),
-
+ /* test moved to test/radix/quic_tests.c */
OP_END
};
diff --git a/test/radix/quic_tests.c b/test/radix/quic_tests.c
index e213bfcad9..95d6f1b5e3 100644
--- a/test/radix/quic_tests.c
+++ b/test/radix/quic_tests.c
@@ -1847,8 +1847,33 @@ DEF_SCRIPT(script_21, "Fault injection - unknown frame in 1-RTT packet")
OP_EXPECT_CONN_CLOSE_INFO(C, OSSL_QUIC_ERR_FRAME_ENCODING_ERROR, 0, 0);
}
-DEF_SCRIPT(script_22, "place holder for multistrem script_22")
+/* 22. Fault injection - non-zero packet header reserved bits */
+static int script_22_inject_plain(RADIX_FAULT *fault, QUIC_PKT_HDR *hdr,
+ unsigned char *buf, size_t len)
{
+ if (fault->word0 == 0)
+ return 1;
+
+ hdr->reserved = 1;
+ return 1;
+}
+
+DEF_SCRIPT(script_22, "Fault injection - non-zero packet header reserved bits")
+{
+ OP_SIMPLE_PAIR_CONN();
+ OP_ACCEPT_CONN_WAIT(L, S, 0);
+
+ OP_SET_INJECT_PLAIN(S, script_22_inject_plain);
+
+ OP_WRITE(C, "apple", 5);
+ OP_ACCEPT_STREAM_WAIT(S, Sa, 0);
+ OP_READ_EXPECT(Sa, "apple", 5);
+
+ OP_SET_INJECT_WORD(1, 0);
+
+ OP_WRITE(Sa, "orange", 6);
+
+ OP_EXPECT_CONN_CLOSE_INFO(C, OSSL_QUIC_ERR_PROTOCOL_VIOLATION, 0, 0);
}
DEF_SCRIPT(script_23, "place holder for multistrem script_23")