# # disabling test. looks like an issue in perl library: # # not ok ERROR host_known_ipv6_different_host_fails # /usr/perl5/site_perl/5.32/Net/Address/IP/Local.pm:132 - host_known_ipv6_different_host_fails(ProFTPD::Tests::Commands::HOST) # IPv6 not supported # changeset has not been submitted to upstream. Will revisit # it in future and attempt to fix it. # --- a/tests/t/lib/ProFTPD/Tests/Commands/HOST.pm +++ b/tests/t/lib/ProFTPD/Tests/Commands/HOST.pm @@ -71,11 +71,6 @@ my $TESTS = { test_class => [qw(forking)], }, - host_known_ipv6_different_host_fails => { - order => ++$order, - test_class => [qw(feature_ipv6 forking)], - }, - host_known_dns_ok => { order => ++$order, test_class => [qw(forking)], @@ -1012,116 +1007,6 @@ EOC test_cleanup($setup->{log_file}, $ex); } -sub host_known_ipv6_different_host_fails { - my $self = shift; - my $tmpdir = $self->{tmpdir}; - my $setup = test_setup($tmpdir, 'cmds'); - - my $vhost_addr = Net::Address::IP::Local->public_ipv6; - if (!defined($vhost_addr)) { - print STDERR "+ Unable to find additional IPv6 addresses, skipping test\n"; - return; - } - - my $config = { - PidFile => $setup->{pid_file}, - ScoreboardFile => $setup->{scoreboard_file}, - SystemLog => $setup->{log_file}, - - AuthUserFile => $setup->{auth_user_file}, - AuthGroupFile => $setup->{auth_group_file}, - AuthOrder => 'mod_auth_file.c', - - UseIPv6 => 'on', - DefaultAddress => '::1', - - IfModules => { - 'mod_delay.c' => { - DelayEngine => 'off', - }, - }, - }; - - my ($port, $config_user, $config_group) = config_write($setup->{config_file}, - $config); - - if (open(my $fh, ">> $setup->{config_file}")) { - print $fh < - Port $port - ServerName "Other Virtual Host" - -EOC - unless (close($fh)) { - die("Can't write $setup->{config_file}: $!"); - } - - } else { - die("Can't open $setup->{config_file}: $!"); - } - - # Open pipes, for use between the parent and child processes. Specifically, - # the child will indicate when it's done with its test by writing a message - # to the parent. - my ($rfh, $wfh); - unless (pipe($rfh, $wfh)) { - die("Can't open pipe: $!"); - } - - my $ex; - - # Fork child - $self->handle_sigchld(); - defined(my $pid = fork()) or die("Can't fork: $!"); - if ($pid) { - eval { - my $client = ProFTPD::TestSuite::FTP->new('localhost', $port); - my $host = ('[' . $vhost_addr . ']'); - - eval { $client->host($host) }; - unless ($@) { - die("HOST $host succeeded unexpectedly"); - } - - my $resp_code = $client->response_code(); - my $resp_msg = $client->response_msg(); - - my $expected; - - $expected = 504; - $self->assert($expected == $resp_code, - test_msg("Expected response code $expected, got $resp_code")); - - $expected = "$host: Unknown hostname provided"; - $self->assert($expected eq $resp_msg, - test_msg("Expected response message '$expected', got '$resp_msg'")); - }; - - if ($@) { - $ex = $@; - } - - $wfh->print("done\n"); - $wfh->flush(); - - } else { - eval { server_wait($setup->{config_file}, $rfh) }; - if ($@) { - warn($@); - exit 1; - } - - exit 0; - } - - # Stop server - server_stop($setup->{pid_file}); - - $self->assert_child_ok($pid); - - test_cleanup($setup->{log_file}, $ex); -} - sub host_known_dns_ok { my $self = shift; my $tmpdir = $self->{tmpdir};