Package: libredis-perl
Version: 2:1.9820-1
Severity: important
Tags: upstream patch
Forwarded: https://github.com/PerlRedis/perl-redis/issues/111
User: reproducible-builds@lists.alioth.debian.org
Usertags: ftbfs locale
X-Debbugs-Cc: reproducible-builds@lists.alioth.debian.org

This package fails to build in non-English locales.

>From 
>https://tests.reproducible-builds.org/rb-pkg/unstable/amd64/libredis-perl.html

    
    #   Failed test 'the code died as expected'
    #   at t/11-timeout.t line 41.
    #                   'Error while reading from Redis server: Resource 
temporarily unavailable at t/11-timeout.t line 40.
    # '
    #     doesn't match '(?^u:Error while reading from Redis server: Connexion 
termin�e par expiration du d�lai d'attente|Error while reading from Redis 
server: Ressource temporairement non disponible)'
    # Looks like you failed 1 test of 2.

The test script is calling POSIX::strerror() for two errno values, getting
locale dependent strings, and comparing them to the non-locale-dependent
return value of Redis->get().

This is https://github.com/PerlRedis/perl-redis/issues/111 and the
attached patch is from https://github.com/PerlRedis/perl-redis/pull/112
(not yet merged upstream).
-- 
Niko Tyni   nt...@debian.org
>From 155f19bd998cb1350dd067ec7b8c06738f9484e3 Mon Sep 17 00:00:00 2001
From: Syohei YOSHIDA <syo...@gmail.com>
Date: Tue, 9 Jun 2015 12:26:49 +0900
Subject: [PATCH] Compare error number instead of error message for locale

This test may be failed if test platform is not English locale.
So we should compare error number rather than error message.
---
 t/11-timeout.t | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/t/11-timeout.t b/t/11-timeout.t
index bc0268b..166bbfa 100644
--- a/t/11-timeout.t
+++ b/t/11-timeout.t
@@ -25,13 +25,12 @@ subtest "server doesn't replies quickly enough" => sub {
     my $server = Test::SpawnRedisTimeoutServer::create_server_with_timeout(10);
     my $redis = Redis->new(server => '127.0.0.1:' . $server->port, read_timeout => 1);
     ok($redis);
-    my $msg1 = "Error while reading from Redis server: " . strerror(ETIMEDOUT);
-    my $msg2 = "Error while reading from Redis server: " . strerror(EWOULDBLOCK);
     like(
          exception { $redis->get('foo'); },
-         qr/$msg1|$msg2/,
+         qr/Error while reading from Redis server: /,
          "the code died as expected",
         );
+    ok($! == ETIMEDOUT || $! == EWOULDBLOCK);
 };
 
 subtest "server doesn't respond at connection (cnx_timeout)" => sub {
_______________________________________________
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds

Reply via email to