bug-gnulib
[Top][All Lists]
Advanced

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

ptsname_r on Cygwin


From: Bruno Haible
Subject: ptsname_r on Cygwin
Date: Wed, 20 Jan 2021 07:31:48 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-197-generic; KDE/5.18.0; x86_64; ; )

Hi Ken,

On Cygwin 2.9 (64-bit) I see a test failure in test-ptsname_r.c, here:

  {
    char buffer[256];
    int result;

    result = ptsname_r (-1, buffer, sizeof buffer);
    ASSERT (result != 0);  // <======================== HERE
    ASSERT (result == EBADF || result == ENOTTY);
  }

While https://www.kernel.org/doc/man-pages/online/pages/man3/ptsname_r.3.html
says that ptsname_r, upon failure, should return an error code, on Cygwin,
it returns 0 and stores the empty string in 'buffer'.

This causes 2 test failures of Gnulib tests:


FAIL: test-ptsname
==================

../../gltests/test-ptsname.c:76: assertion 'result == NULL' failed
FAIL test-ptsname.exe (exit status: 134)

FAIL: test-ptsname_r
====================

../../gltests/test-ptsname_r.c:126: assertion 'result != 0' failed
FAIL test-ptsname_r.exe (exit status: 134)


Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]