[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#662083: Bug#766456: libzip: FTBFS on hurd-i386

On 2014-10-24 09:43, Svante Signell wrote:
Source: libzip
Version: 0.11.2-1.1
Severity: important
Tags: patch
User: debian-hurd@lists.debian.org
Usertags: hurd

Hi, as a follow-up and patch for #662083

Currently libzip FTBFS on GNU/Hurd due to one failing test:
open_nosuchfile.test. This test checks for a non-existing file and the
error codes for ENOENT: No such file or directory. On GNU/Linux and
GNU/kFreeBSD this number is 2 in errno.h but for GNU/Hurd it is
1073741826, resulting in a false negative.

The attached patch solves this problem by printing the string "No such
file or directory" in regress/tryopen.c and test for that string in
regress/open_nosuchfile.test instead of printing and testing the error

This is equally unportable, there is no fixed representation for the
errno strings. It works on Debian architectures just because they all
use GNU libc, so with the same implementation of errno strings.

Furthermore, it seems nothing in the tests deals with locale, so this
"fix" might break when running the tests under a non-English locale.

The right solution is properly mapping back errno numbers to their
"strings", so e.g. 2 would be "ENOENT", and so on.

Please do not accept this workaround, which is unreliable and not
suitable for upstream.

Pino Toscano

Reply to: