]> git.ipfire.org Git - thirdparty/openssl.git/blob - test/recipes/70-test_quic_multistream.t
Raise an error on syscall failure in tls_retry_write_records
[thirdparty/openssl.git] / test / recipes / 70-test_quic_multistream.t
1 #! /usr/bin/env perl
2 # Copyright 2022-2024 The OpenSSL Project Authors. All Rights Reserved.
3 #
4 # Licensed under the Apache License 2.0 (the "License"). You may not use
5 # this file except in compliance with the License. You can obtain a copy
6 # in the file LICENSE in the source distribution or at
7 # https://www.openssl.org/source/license.html
8
9 use OpenSSL::Test qw/:DEFAULT srctop_file result_dir data_file/;
10 use OpenSSL::Test::Utils;
11 use File::Temp qw(tempfile);
12 use File::Path 2.00 qw(rmtree mkpath);
13
14 setup("test_quic_multistream");
15
16 plan skip_all => "QUIC protocol is not supported by this OpenSSL build"
17 if disabled('quic');
18
19 plan tests => 2;
20
21 my $qlog_output;
22 if (!disabled('qlog')) {
23 $qlog_output = result_dir("qlog-output");
24 print "# Writing qlog output to $qlog_output\n";
25 rmtree($qlog_output, { safe => 1 });
26 mkdir($qlog_output);
27 $ENV{QLOGDIR} = $qlog_output;
28 }
29
30 $ENV{OSSL_QFILTER} = "* -quic:unknown_event quic:another_unknown_event";
31
32 ok(run(test(["quic_multistream_test",
33 srctop_file("test", "certs", "servercert.pem"),
34 srctop_file("test", "certs", "serverkey.pem")])));
35
36 SKIP: {
37 skip "no qlog", 1 if disabled('qlog');
38 skip "not running CI tests", 1 unless $ENV{OSSL_RUN_CI_TESTS};
39
40 subtest "check qlog output" => sub {
41 plan tests => 1;
42
43 ok(run(cmd(["python3", data_file("verify-qlog.py")])),
44 "running qlog verification script");
45 };
46 }