From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2 5/6] syscalls: added memfd_create dir and memfd_create/memfd_create01.c
Date: Tue, 7 Mar 2017 14:21:48 +0100 [thread overview]
Message-ID: <20170307132148.GA7908@rei.lan> (raw)
In-Reply-To: <4c535df1-1244-4d8b-ecb0-cfbe8b771e1b@redhat.com>
Hi!
> SAFE_MFD_NEW and others should go to "include/tst_safe_macros.h", right?
That one is too big at this point. And I guess that this call would not
be usefull anywhere else than this testsuite, so having it in local
header should be fine.
> If I undestand this correctly, negative testcases will have to stay in
> memfd_create_common.h. That means I can't use
> SAFE_ macros in those functions/macros, as that would obscure line
> numbers. And putting those elsewhere would duplicate a lot of code.
Hmm, we can always use the functions SAFE_MACROS call and pass filename
and line number explicitly.
#define FAIL_MFD_FOO(foo, bar) \
fail_mfd_foo(__FILE__, __LINE__, foo, bar)
void fail_mfd_foo(const char *file, const int lineno, int foo, int bar)
{
int ret;
ret = safe_foo(file, lineno, foo);
...
}
--
Cyril Hrubis
chrubis@suse.cz
next prev parent reply other threads:[~2017-03-07 13:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-06 17:45 [LTP] [PATCH v2 0/6] Added memfd_create() testsuite Jakub Racek
2017-03-06 17:45 ` [LTP] [PATCH v2 1/6] Added syscall numbers for memfd_create Jakub Racek
2017-03-06 17:45 ` [LTP] [PATCH v2 2/6] Added memfd_create() lapi flags Jakub Racek
2017-03-06 17:45 ` [LTP] [PATCH v2 3/6] Added fcntl() " Jakub Racek
2017-03-06 17:45 ` [LTP] [PATCH v2 4/6] Added fallocate() flags and wrapper to lapi Jakub Racek
2017-03-07 11:44 ` Cyril Hrubis
2017-03-06 17:45 ` [LTP] [PATCH v2 5/6] syscalls: added memfd_create dir and memfd_create/memfd_create01.c Jakub Racek
2017-03-07 12:17 ` Cyril Hrubis
2017-03-07 13:08 ` Jakub =?unknown-8bit?q?Ra=C4=8Dek?=
2017-03-07 13:21 ` Cyril Hrubis [this message]
2017-03-06 17:45 ` [LTP] [PATCH v2 6/6] syscalls/memfd_create02.c: added new test Jakub Racek
2017-03-07 12:21 ` Cyril Hrubis
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=20170307132148.GA7908@rei.lan \
--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 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.