bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Bruno Haible <bruno@clisp.org>
To: Ken Brown <kbrown@cornell.edu>, bug-gnulib@gnu.org
Subject: ptsname_r on Cygwin
Date: Wed, 20 Jan 2021 07:31:48 +0100	[thread overview]
Message-ID: <3482750.exAXJ2mfqj@omega> (raw)

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	other threads:[~2021-01-20  6:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-20  6:31 Bruno Haible [this message]
2021-01-20  8:11 ` ptsname_r on Cygwin Bruno Haible
2021-01-21 18:21 ` Ken Brown
2021-01-21 20:26   ` Bruno Haible
2021-01-21 22:45     ` Ken Brown
2021-01-22 15:48       ` Ken Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3482750.exAXJ2mfqj@omega \
    --to=bruno@clisp.org \
    --cc=bug-gnulib@gnu.org \
    --cc=kbrown@cornell.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).