From: Petr Vorel <pvorel@suse.cz>
To: Andrea Cervesato <andrea.cervesato@suse.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2 1/7] Add more safe macros for mqueue API
Date: Tue, 26 Jul 2022 08:48:18 +0200 [thread overview]
Message-ID: <Yt+OMvGzUh//+0vk@pevik> (raw)
In-Reply-To: <aeddb36f-69db-0fae-cec4-df3956e2e6db@suse.com>
Hi Andrea,
> Hi!
> On 6/16/22 23:57, Petr Vorel wrote:
> > Hi Andrea,
> > ...
> > > > +static inline int safe_mq_close(const char *file, const int lineno,
> > > > + mqd_t __mqdes)
> > > > +{
> > > > + int rval;
> > > > +
> > > > + rval = mq_close(__mqdes);
> > > > +
> > > > + if (rval == -1) {
> > > > + tst_brk_(file, lineno, TBROK | TERRNO,
> > > > + "mq_close(%d) failed", __mqdes);
> > > > + }
> > > How about check for invalid return value?
> > > } else if (rval < 0) {
> > > tst_brk_(file, lineno, TBROK | TERRNO,
> > > "Invalid mq_close(%d) return value %d", __mqdes, rval);
> > > }
> > Also safe_mq_open() could have check for invalid return value.
> It's already like that, Isn't it?
No it's not. But looking for v3 of this patchset (v3) you have added it.
Thanks!
Kind regards,
Petr
> > Kind regards,
> > Petr
> Andrea
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2022-07-26 6:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-16 14:07 [LTP] [PATCH v2 0/7] Refactor mqns testing suite Andrea Cervesato via ltp
2022-06-16 14:07 ` [LTP] [PATCH v2 1/7] Add more safe macros for mqueue API Andrea Cervesato via ltp
2022-06-16 21:52 ` Petr Vorel
2022-06-16 21:57 ` Petr Vorel
2022-07-22 9:31 ` Andrea Cervesato via ltp
2022-07-26 6:48 ` Petr Vorel [this message]
2022-06-16 14:07 ` [LTP] [PATCH v2 2/7] Refactor mqns_01 using new LTP API Andrea Cervesato via ltp
2022-06-16 21:56 ` Petr Vorel
2022-06-16 14:07 ` [LTP] [PATCH v2 3/7] Refactor mqns_02 " Andrea Cervesato via ltp
2022-06-16 14:07 ` [LTP] [PATCH v2 4/7] Refactor mqns_03 " Andrea Cervesato via ltp
2022-06-16 14:07 ` [LTP] [PATCH v2 5/7] Refactor mqns_04 " Andrea Cervesato via ltp
2022-06-16 14:07 ` [LTP] [PATCH v2 6/7] Delete deprecated mqns header files Andrea Cervesato via ltp
2022-06-16 14:07 ` [LTP] [PATCH v2 7/7] Rename common.h into mqns.h for mqns suite Andrea Cervesato via ltp
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Yt+OMvGzUh//+0vk@pevik \
--to=pvorel@suse.cz \
--cc=andrea.cervesato@suse.com \
--cc=ltp@lists.linux.it \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.