70-test_quic_multistream.t 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. use OpenSSL::Test qw/:DEFAULT srctop_file result_dir data_file/;
  9. use OpenSSL::Test::Utils;
  10. use File::Temp qw(tempfile);
  11. use File::Path 2.00 qw(rmtree mkpath);
  12. setup("test_quic_multistream");
  13. plan skip_all => "QUIC protocol is not supported by this OpenSSL build"
  14. if disabled('quic');
  15. plan tests => 2;
  16. my $qlog_output;
  17. if (!disabled('qlog')) {
  18. $qlog_output = result_dir("qlog-output");
  19. print "# Writing qlog output to $qlog_output\n";
  20. rmtree($qlog_output, { safe => 1 });
  21. mkdir($qlog_output);
  22. $ENV{QLOGDIR} = $qlog_output;
  23. }
  24. $ENV{OSSL_QFILTER} = "* -quic:unknown_event quic:another_unknown_event";
  25. ok(run(test(["quic_multistream_test",
  26. srctop_file("test", "certs", "servercert.pem"),
  27. srctop_file("test", "certs", "serverkey.pem")])));
  28. SKIP: {
  29. skip "no qlog", 1 if disabled('qlog');
  30. skip "not running CI tests", 1 unless $ENV{OSSL_RUN_CI_TESTS};
  31. subtest "check qlog output" => sub {
  32. plan tests => 1;
  33. ok(run(cmd(["python3", data_file("verify-qlog.py")])),
  34. "running qlog verification script");
  35. };
  36. }