From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 1/5] open_posix: add SAFE_PFUNC macro
Date: Mon, 22 Feb 2016 14:35:14 +0100 [thread overview]
Message-ID: <20160222133513.GB6434@rei> (raw)
In-Reply-To: <eb9862205b7122243cfba5ecae0a9293f7d95c21.1455875648.git.jstancek@redhat.com>
Hi!
> +#ifndef __SAFE_MACROS_H__
> +#define __SAFE_MACROS_H__
The file lacks GNU header and the guards should be SAFE_HELPERS rather
than SAFE_MACROS.
> +#include <string.h>
Technically we should incude stdio.h for fflush() and printf() as well.
> +#define SAFE_PFUNC(op) \
> +do {\
> + int ret = (op); \
> + if (ret != 0) { \
> + printf("Test %s unresolved: got %i (%s) on line %i\n %s\n", \
> + __FILE__, ret, strerror(ret), __LINE__, #op); \
> + fflush(stdout); \
> + exit(PTS_UNRESOLVED); \
> + } \
> +} while (0)
> +
> +#endif
Otherwise it looks good.
--
Cyril Hrubis
chrubis@suse.cz
prev parent reply other threads:[~2016-02-22 13:35 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-19 10:03 [LTP] [PATCH 1/5] open_posix: add SAFE_PFUNC macro Jan Stancek
2016-02-19 10:03 ` [LTP] [PATCH 2/5] open_posix: condvar/schedule: use SAFE_PFUNC Jan Stancek
2016-02-22 13:42 ` Cyril Hrubis
2016-02-19 10:03 ` [LTP] [PATCH 3/5] open_posix: condvar/schedule: remove useless waiting Jan Stancek
2016-02-22 14:57 ` Cyril Hrubis
2016-02-19 10:03 ` [LTP] [PATCH 4/5] open_posix: condvar/schedule: remove duplicit setsched calls Jan Stancek
2016-02-22 15:38 ` Cyril Hrubis
2016-02-19 10:03 ` [LTP] [PATCH 5/5] open_posix: condvar/schedule: mask SIGALRM in SCHED_OTHER threads Jan Stancek
2016-02-22 16:09 ` Cyril Hrubis
2016-02-23 7:34 ` Jan Stancek
2016-02-23 10:00 ` Cyril Hrubis
2016-02-23 12:44 ` Jan Stancek
2016-02-22 13:35 ` Cyril Hrubis [this message]
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=20160222133513.GB6434@rei \
--to=chrubis@suse.cz \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox