diff options
author | Bjorn Munch <Bjorn.Munch@sun.com> | 2009-08-05 09:41:40 +0200 |
---|---|---|
committer | Bjorn Munch <Bjorn.Munch@sun.com> | 2009-08-05 09:41:40 +0200 |
commit | 47227d7f6a064a91034e2571135e76e2ce9b6dd8 (patch) | |
tree | d5197ac5a99cd16f86b837f306cbf33026ccf3bc | |
parent | 252c37a6399355a05310f183645373c851a26a56 (diff) | |
download | mariadb-git-47227d7f6a064a91034e2571135e76e2ce9b6dd8.tar.gz |
Bug #45771 AIX and i5/OS Perl bug: check_socket_path_length in MTR fails
Bug is actually in Perl
Fixed by trapping and ignoring error from IO::Socket::UNIX
-rw-r--r-- | mysql-test/lib/My/Platform.pm | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/mysql-test/lib/My/Platform.pm b/mysql-test/lib/My/Platform.pm index 69ffdfbb4ce..7c7741a5c9e 100644 --- a/mysql-test/lib/My/Platform.pm +++ b/mysql-test/lib/My/Platform.pm @@ -126,13 +126,29 @@ sub check_socket_path_length { die "Could not create UNIX domain socket: $!" unless defined $sock; + my $hostpath = eval {$sock->hostpath()}; + if ($@) { + die unless $@ =~ /^Bad arg length for Socket::unpack_sockaddr_un/; + + # Bug on AIX and i5/OS Perl IO::Socket::UNIX which dies with something + # like: + # Bad arg length for Socket::unpack_sockaddr_un, length is 25, + # should be 106 at /path/to/perl/lib/5.8.0/aix/Socket.pm line 380. + # + # Just fake it that everything is fine + $hostpath = $testfile; + } + die "UNIX domain socket path was truncated" - unless ($testfile eq $sock->hostpath()); + unless ($testfile eq $hostpath); $truncated= 0; # Yes, it worked! }; + die "Unexpected failure when checking socket path length: $@" + if $@ and $@ !~ /^UNIX domain socket path was truncated/; + $sock= undef; # Close socket rmtree($tmpdir); # Remove the tempdir and any socket file created return $truncated; |