2023-04-19 02:30:56 +08:00
|
|
|
#! /usr/bin/env perl
|
2023-09-07 16:59:15 +08:00
|
|
|
# Copyright 2022-2023 The OpenSSL Project Authors. All Rights Reserved.
|
2023-04-19 02:30:56 +08:00
|
|
|
#
|
|
|
|
# Licensed under the Apache License 2.0 (the "License"). You may not use
|
|
|
|
# this file except in compliance with the License. You can obtain a copy
|
|
|
|
# in the file LICENSE in the source distribution or at
|
|
|
|
# https://www.openssl.org/source/license.html
|
|
|
|
|
2024-01-29 21:09:49 +08:00
|
|
|
use OpenSSL::Test qw/:DEFAULT srctop_file result_dir data_file/;
|
2023-04-19 02:30:56 +08:00
|
|
|
use OpenSSL::Test::Utils;
|
2024-01-29 21:09:49 +08:00
|
|
|
use File::Temp qw(tempfile);
|
|
|
|
use File::Path 2.00 qw(rmtree);
|
2023-04-19 02:30:56 +08:00
|
|
|
|
|
|
|
setup("test_quic_multistream");
|
|
|
|
|
|
|
|
plan skip_all => "QUIC protocol is not supported by this OpenSSL build"
|
|
|
|
if disabled('quic');
|
|
|
|
|
2024-01-29 21:09:49 +08:00
|
|
|
plan tests => 2;
|
|
|
|
|
2024-02-01 19:01:44 +08:00
|
|
|
if (!disabled('qlog') && $ENV{OSSL_RUN_CI_TESTS} == "1") {
|
2024-01-29 21:09:49 +08:00
|
|
|
my $qlog_output = result_dir("qlog-output");
|
|
|
|
print "# Writing qlog output to $qlog_output\n";
|
|
|
|
rmtree($qlog_output, { safe => 1 });
|
|
|
|
mkdir($qlog_output);
|
|
|
|
$ENV{QLOGDIR} = $qlog_output;
|
|
|
|
}
|
|
|
|
|
|
|
|
$ENV{OSSL_QFILTER} = "* -quic:unknown_event quic:another_unknown_event";
|
2023-04-19 02:30:56 +08:00
|
|
|
|
|
|
|
ok(run(test(["quic_multistream_test",
|
|
|
|
srctop_file("test", "certs", "servercert.pem"),
|
|
|
|
srctop_file("test", "certs", "serverkey.pem")])));
|
2024-01-29 21:09:49 +08:00
|
|
|
|
|
|
|
SKIP: {
|
|
|
|
skip "no qlog", 1 if disabled('qlog');
|
2024-02-06 20:07:59 +08:00
|
|
|
skip "not running CI tests", 1 if ($ENV{OSSL_RUN_CI_TESTS} // "") ne "1";
|
2024-01-29 21:09:49 +08:00
|
|
|
|
|
|
|
subtest "check qlog output" => sub {
|
|
|
|
plan tests => 1;
|
|
|
|
|
|
|
|
ok(run(cmd(["python3", data_file("verify-qlog.py")])),
|
|
|
|
"running qlog verification script");
|
|
|
|
};
|
|
|
|
}
|