On 05/19/2011 02:12 PM, Bruno Haible wrote: > Hi Eric, > >> Without this, recent test improvements were exposing failures >> of gnulib's replacement on cygwin. > > Which failures were this? If I understand it correctly, a gnulib strerror_r > replacement that does not use __xpg_strerror_r on Cygwin 1.7.9 should be > identical to the one built on Cygwin <= 1.7.8. But a testdir created with > > $ ./gnulib-tool --create-testdir --dir=/tmp/testdir --with-tests strerror > perror > > and built on Cygwin 1.7.5 passes all tests.
Cygwin 1.7.8 tried (but failed) to introduce __xpg_strerror_r; it
actually got added in 1.7.9. But in the process of adding
__xpg_sterror_r, the original strerror_r was fixed to align more closely
to glibc behavior. Thus, it was changed so that strerror_r(EACCES, buf,
2) no longer overwrites buf with a (truncated) message to buf, so the
caller instead has to manually copy the static string result over to buf.
When testing at commit d118714, I got:
../../gltests/test-strerror_r.c:82: assertion failed
/bin/sh: line 5: 2060 Aborted (core dumped)
EXEEXT='.exe' srcdir='../../gltests' MAKE='make' ${dir}$tst
FAIL: test-strerror_r.exe
at that point, line 82 was:
82 ASSERT ((strcmp (buf, "BADFACE") == 0) == (i == 0));
with i at 1.
--
Eric Blake [email protected] +1-801-349-2682
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
