Package: perl-base
Version: 5.14.2-9
Severity: normal

Dear Maintainer,
*** Please consider answering these questions, where appropriate ***

   * What led up to the situation?
The attached script comes from the MySQL test quite.
   * What exactly did you do (or not do) that was effective (or
     ineffective)?
It returns "SUCCESS" on Linux and "FAIL" on kFreeBSD. This is irrespective
of the length of the file.

There is an error message thrown which is in results.txt.

FAILED
Bad arg length for Socket::unpack_sockaddr_un, length is 106, should be 110 at 
/usr/lib/perl/5.14/Socket.pm line 278.

#!/usr/bin/perl

use IO::Socket::UNIX;
use File::Temp qw /tempdir/;

# Create a tempfile name with same length as "path"
my $tmpdir = tempdir( CLEANUP => 0);
my $testfile = $tmpdir . "/" . "x" x 3;
my $truncated = 0;
my $sock;
eval {
    $sock= new IO::Socket::UNIX
    (
        Local => $testfile,
        Listen => 1,
    );
    $truncated= 1; # Be negatvie
    die "Could not create UNIX domain socket: $!" unless defined $sock;
    die "UNIX domain socket path was truncated" unless ($testfile eq $sock->hostpath());
    $truncated = 0;
};

print $truncated ? "FAILED\n" : "SUCCESS\n";
print "$@\n" if $@;

Reply via email to