From: Florian Weimer <fw@deneb.enyo.de>
To: Adhemerval Zanella via Libc-alpha <libc-alpha@sourceware.org>
Subject: Re: [PATCH 1/3] login/tst-grantpt: Convert to support framework, more error checking
Date: Thu, 13 Aug 2020 20:31:05 +0200 [thread overview]
Message-ID: <87r1sapfdi.fsf@mid.deneb.enyo.de> (raw)
In-Reply-To: <1298148d-c5f3-7fa8-c9f6-d681105936bf@linaro.org> (Adhemerval Zanella via Libc-alpha's message of "Thu, 13 Aug 2020 15:21:26 -0300")
* Adhemerval Zanella via Libc-alpha:
> > + xclose (fd);
> > ret = grantpt (fd);
> > err = errno;
> > if (ret != -1 || err != EBADF)
> > {
> > + support_record_failure ();
> > printf ("grantpt(): expected: return = %d, errno = %d\n", -1, EBADF);
> > printf (" got: return = %d, errno = %d\n", ret, err);
> > - return 1;
> > }
> > - return 0;
> > }
>
> Ok (although maybe use CHECK_VERIFY?).
Do you mean TEST_VERIFY? That can't produce a log message. We
probably should have something that logs a failure unconditionally.
>> - unlink (file);
>> + fd = create_temp_file ("tst-grantpt-", NULL);
>> + TEST_VERIFY_EXIT (fd >= 0);
>>
>
> Ok. As a side note, maybe we should add a xcreate_temp_file.
I think we should change the semantics of the existing function
instead.
next prev parent reply other threads:[~2020-08-13 18:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-05 7:14 [PATCH 1/3] login/tst-grantpt: Convert to support framework, more error checking Florian Weimer via Libc-alpha
2020-08-05 7:14 ` [PATCH 2/3] Linux: unlockpt needs to fail with EINVAL, not ENOTTY (bug 26053) Florian Weimer via Libc-alpha
2020-08-13 18:30 ` Adhemerval Zanella via Libc-alpha
2020-08-05 7:14 ` [PATCH 3/3] Linux: Require properly configured /dev/pts for PTYs Florian Weimer via Libc-alpha
2020-08-13 18:53 ` Adhemerval Zanella via Libc-alpha
2020-08-13 18:21 ` [PATCH 1/3] login/tst-grantpt: Convert to support framework, more error checking Adhemerval Zanella via Libc-alpha
2020-08-13 18:31 ` Florian Weimer [this message]
2020-08-13 18:58 ` Adhemerval Zanella via Libc-alpha
-- strict thread matches above, loose matches on Subject: below --
2020-05-27 10:14 [PATCH 0/3] Linux: Rework Linux PTY support Florian Weimer via Libc-alpha
2020-05-27 10:14 ` [PATCH 1/3] login/tst-grantpt: Convert to support framework, more error checking Florian Weimer via Libc-alpha
2020-10-02 17:08 ` Adhemerval Zanella via Libc-alpha
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://www.gnu.org/software/libc/involved.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r1sapfdi.fsf@mid.deneb.enyo.de \
--to=fw@deneb.enyo.de \
--cc=libc-alpha@sourceware.org \
/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).