From: Jan Stancek <jstancek@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 5/6] creat07: no need to pass tst_ipc_envp anymore
Date: Thu, 12 Oct 2017 04:50:32 -0400 (EDT) [thread overview]
Message-ID: <223626151.28570387.1507798232961.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20171012080802.GA10492@rei>
----- Original Message -----
> Hi!
> > Signed-off-by: Jan Stancek <jstancek@redhat.com>
> > ---
> > testcases/kernel/syscalls/creat/creat07.c | 4 +---
> > 1 file changed, 1 insertion(+), 3 deletions(-)
> >
> > diff --git a/testcases/kernel/syscalls/creat/creat07.c
> > b/testcases/kernel/syscalls/creat/creat07.c
> > index e1b267661c39..236f4edf843f 100644
> > --- a/testcases/kernel/syscalls/creat/creat07.c
> > +++ b/testcases/kernel/syscalls/creat/creat07.c
> > @@ -38,9 +38,7 @@ static void verify_creat(void)
> >
> > pid = SAFE_FORK();
> > if (pid == 0) {
> > - char *av[] = {TEST_APP, NULL};
> > - (void)execve(TEST_APP, av, tst_ipc_envp);
> > - perror("execve failed");
> > + SAFE_EXECLP(TEST_APP, TEST_APP, NULL);
>
> And it looks like this broke the test when executed from installed LTP,
> that is because the execlp() picks up the TEST_APP from
> /opt/ltp/testcasese/bin/ instead of the local copy. I guess that we have
> to use exec() variant without the p at the end here.
Or we can switch order so that "." is searched as first:
SAFE_ASPRINTF(&new_path, ":%s:%s", start_dir, old_path);
What do you think?
Regards,
Jan
next prev parent reply other threads:[~2017-10-12 8:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-10 15:05 [LTP] [PATCH 1/6] lib: add LTP_IPC_PATH to env. variables by default Jan Stancek
2017-10-10 15:05 ` [LTP] [PATCH 2/6] lib: move tst_get_startwd() to old_tmpdir header Jan Stancek
2017-10-10 15:05 ` [LTP] [PATCH 3/6] safe_macros: add SAFE_SETENV() Jan Stancek
2017-10-10 15:05 ` [LTP] [PATCH 4/6] lib: extend PATH as part of test setup Jan Stancek
2017-10-10 15:18 ` Cyril Hrubis
2017-10-11 7:45 ` Jan Stancek
2017-10-11 8:00 ` Cyril Hrubis
2017-10-10 15:05 ` [LTP] [PATCH 5/6] creat07: no need to pass tst_ipc_envp anymore Jan Stancek
2017-10-12 8:08 ` Cyril Hrubis
2017-10-12 8:47 ` Li Wang
2017-10-12 8:50 ` Jan Stancek [this message]
2017-10-12 9:34 ` Jan Stancek
2017-10-10 15:05 ` [LTP] [PATCH 6/6] lib: drop tst_ipc_envp Jan Stancek
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=223626151.28570387.1507798232961.JavaMail.zimbra@redhat.com \
--to=jstancek@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox