summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjorn Munch <Bjorn.Munch@sun.com>2009-08-06 09:30:53 +0200
committerBjorn Munch <Bjorn.Munch@sun.com>2009-08-06 09:30:53 +0200
commit6ddeb379fe3b5dec58de5372666a640b1622659f (patch)
treee0d32e60f73da0dd374e65e397a12204b71f8168
parent47227d7f6a064a91034e2571135e76e2ce9b6dd8 (diff)
downloadmariadb-git-6ddeb379fe3b5dec58de5372666a640b1622659f.tar.gz
Bug #45771 AIX and i5/OS Perl bug: check_socket_path_length in MTR fails
Bug in Perl Scrap attempt to do this smartly on AIX, just drop the test and assume it's OK This commit undoes the previous push and adds a line to ignore on AIX
-rw-r--r--mysql-test/lib/My/Platform.pm23
1 files changed, 7 insertions, 16 deletions
diff --git a/mysql-test/lib/My/Platform.pm b/mysql-test/lib/My/Platform.pm
index 7c7741a5c9e..371120ab644 100644
--- a/mysql-test/lib/My/Platform.pm
+++ b/mysql-test/lib/My/Platform.pm
@@ -106,10 +106,13 @@ sub check_socket_path_length {
my ($path)= @_;
return 0 if IS_WINDOWS;
+ # This may not be true, but we can't test for it on AIX due to Perl bug
+ # See Bug #45771
+ return 0 if ($^O eq 'aix');
require IO::Socket::UNIX;
- my $truncated= 1; # Be negative
+ my $truncated= undef;
# Create a tempfile name with same length as "path"
my $tmpdir = tempdir( CLEANUP => 0);
@@ -122,32 +125,20 @@ sub check_socket_path_length {
Local => $testfile,
Listen => 1,
);
+ $truncated= 1; # Be negatvie
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 $hostpath);
+ unless ($testfile eq $sock->hostpath());
$truncated= 0; # Yes, it worked!
};
die "Unexpected failure when checking socket path length: $@"
- if $@ and $@ !~ /^UNIX domain socket path was truncated/;
+ if $@ and not defined $truncated;
$sock= undef; # Close socket
rmtree($tmpdir); # Remove the tempdir and any socket file created