All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 5/6] creat07: no need to pass tst_ipc_envp anymore
Date: Thu, 12 Oct 2017 10:08:02 +0200	[thread overview]
Message-ID: <20171012080802.GA10492@rei> (raw)
In-Reply-To: <70f47d3c63fb849eeba0a6bb4f2760d4815db3cb.1507647255.git.jstancek@redhat.com>

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.

-- 
Cyril Hrubis
chrubis@suse.cz

  reply	other threads:[~2017-10-12  8:08 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 [this message]
2017-10-12  8:47     ` Li Wang
2017-10-12  8:50     ` Jan Stancek
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=20171012080802.GA10492@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 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.