All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: "chenhx.fnst@fujitsu.com" <chenhx.fnst@fujitsu.com>,
	"ltp@lists.linux.it" <ltp@lists.linux.it>
Subject: Re: [LTP] [PATCH] resource_files: inline resource file for readable doc
Date: Fri, 29 Jul 2022 16:52:15 +0200	[thread overview]
Message-ID: <YuP0H794ld8hhvqo@pevik> (raw)
In-Reply-To: <YuPyB1Vr3Yps37yX@pevik>

> Hi Chen, Cyril,

> > Currently from resource_files section of metadata doc, we usually get:

> > .resource_files  TEST_APP

> > or

> > .resource_files  resource_files

> > which do not help much.

> > This patch will inline reource file with its real name.

> > Signed-off-by: Chen Hanxiao <chenhx.fnst@fujitsu.com>
> Suggested-by: Petr Vorel <pvorel@suse.cz>

> :).

> > ---
> >  testcases/kernel/containers/userns/userns06.c     |  2 +-
> >  testcases/kernel/syscalls/creat/creat07.c         | 10 ++++------
> >  testcases/kernel/syscalls/execve/execve02.c       | 10 ++++------
> >  testcases/kernel/syscalls/execve/execve04.c       | 10 ++++------
> >  testcases/kernel/syscalls/execve/execve05.c       | 10 ++++------
> >  testcases/kernel/syscalls/execveat/execveat01.c   | 10 ++++------
> >  testcases/kernel/syscalls/execveat/execveat02.c   | 10 ++++------
> >  testcases/kernel/syscalls/execveat/execveat03.c   | 10 ++++------
> >  testcases/kernel/syscalls/fanotify/fanotify03.c   | 10 ++++------
> >  testcases/kernel/syscalls/fanotify/fanotify10.c   | 10 ++++------
> >  testcases/kernel/syscalls/fanotify/fanotify12.c   | 10 ++++------
> >  testcases/kernel/syscalls/getrusage/getrusage03.c | 10 ++++------
> >  testcases/kernel/syscalls/pipe2/pipe2_02.c        | 10 ++++------
> >  testcases/kernel/syscalls/prctl/prctl06.c         | 10 ++++------
> >  14 files changed, 53 insertions(+), 79 deletions(-)

> > diff --git a/testcases/kernel/containers/userns/userns06.c b/testcases/kernel/containers/userns/userns06.c
> > index 002c72907..9e900d94b 100644
> > --- a/testcases/kernel/containers/userns/userns06.c
> > +++ b/testcases/kernel/containers/userns/userns06.c
> > @@ -122,7 +122,7 @@ static struct tst_test test = {
> >  	.needs_root = 1,
> >  	.needs_checkpoints = 1,
> >  	.resource_files = (const char *[]) {
> > -		TEST_APP,
> > +		"userns06_capcheck",
> >  		NULL,
> Hardcode binary name when there is TESTBIN is no-go => I'd be for rejecting
> this.

> @metan: what bothers me is that even adding a test directory as include does not
> help (yes, path relative to src root is correct):

> $ ./metaparse -Iinclude -Itestcases/kernel/syscalls/utils/ -Itestcases/kernel/containers/userns/ ../testcases/kernel/containers/userns/userns06.c

OK, running with -v shows only "common.h" is included, because there is no
header in testcases/kernel/containers/userns/ and TEST_APP is defined in the
file.

Also TEST_APP is correctly detected via parse_macro(f):
...
INCLUDE ../testcases/kernel/containers/userns/common.h
 MACRO UID_MAP=0
 MACRO GID_MAP=1
INCLUDE END
 MACRO TEST_APP=userns06_capcheck
 MACRO CHILD1UID=0
 MACRO CHILD1GID=0
 MACRO CHILD2UID=200
 MACRO CHILD2GID=200

I'll have look why it's not replaced.

Kind regards,
Petr

> I'd expect 36d6d745c ("docparse: Implement #define and #include") would fix
> this. What am I missing?

> Kind regards,
> Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2022-07-29 14:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-22  8:35 [LTP] [PATCH] resource_files: inline resource file for readable doc chenhx.fnst
2022-07-29 14:43 ` Petr Vorel
2022-07-29 14:52   ` Petr Vorel [this message]
2022-07-29 15:37     ` Petr Vorel

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=YuP0H794ld8hhvqo@pevik \
    --to=pvorel@suse.cz \
    --cc=chenhx.fnst@fujitsu.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.