Created
September 22, 2025 04:41
-
-
Save kazuho/4a4e425128cde9624c9ab6aba24a0089 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/t/50connect-eyeballs.t b/t/50connect-eyeballs.t | |
index 832c1b051..717ac0729 100644 | |
--- a/t/50connect-eyeballs.t | |
+++ b/t/50connect-eyeballs.t | |
@@ -1,5 +1,6 @@ | |
use strict; | |
use warnings; | |
+use File::Temp qw(tempdir); | |
use IO::Socket::IP; | |
use Test::More; | |
use Time::HiRes qw(time); | |
@@ -39,8 +40,10 @@ my $quic_port = empty_port({ | |
proto => "udp", | |
}); | |
+my $tempdir = tempdir(CLEANUP => 1); | |
+ | |
my $server = $injectaddr->(sub { | |
- spawn_h2o(<< "EOT"); | |
+ my $server = spawn_h2o(<< "EOT"); | |
listen: | |
type: quic | |
port: $quic_port | |
@@ -56,7 +59,23 @@ hosts: | |
proxy.timeout.connect: 10000 | |
proxy.happy-eyeballs.name-resolution-delay: 500 | |
proxy.happy-eyeballs.connection-attempt-delay: 1000 | |
+ h2olog: | |
+ listen: | |
+ type: unix | |
+ port: $tempdir/h2olog.sock | |
+ h2olog: appdata | |
+ paths: {} | |
EOT | |
+ | |
+ my $h2olog_pid = fork; | |
+ die "fork failed:$!" | |
+ unless defined $h2olog_pid; | |
+ if ($h2olog_pid == 0) { | |
+ exec "exec misc/h2olog -u $tempdir/h2olog.sock > /tmp/h2olog.out"; | |
+ die "exec failed:$!"; | |
+ } | |
+ | |
+ $server; | |
}); | |
sleep 1; # inject some delay, as the following tests are a bit time-sensitive | |
@@ -96,6 +115,7 @@ foreach_http(sub { | |
cmp_ok $elapsed, ">=", $expected_time->[0]; | |
cmp_ok $elapsed, "<=", $expected_time->[1]; | |
}; | |
+ if (0) { | |
subtest "one v4" => sub { | |
$check_access->("p$v4_port.4127-0-0-1", "127.0.0.1", [0, 0.5]); | |
}; | |
@@ -111,6 +131,7 @@ foreach_http(sub { | |
subtest "v4 -> name-resolution-delay -> v6" => sub { | |
$check_access->("p$v4_port.4127-0-0-1.d600.p$v6_port.6--1", "127.0.0.1", [0.5, 1]); | |
}; | |
+ } | |
my $blackhole_ipv4_dash = $blackhole_ip_v4; | |
$blackhole_ipv4_dash =~ tr/./-/; | |
subtest "v4-blackhole -> v4" => sub { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment