All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] syscalls/execve06: Add test for argv[0] = NULL
Date: Tue, 14 Jun 2022 15:34:27 +0200	[thread overview]
Message-ID: <YqiOY2obFxbj//We@pevik> (raw)
In-Reply-To: <YqiHVJhvhf16s2kL@yuki>

Hi Cyril,

> > I wonder why this does not work:
> > 	.needs_cmds = (const char *[]) {
> > 		"execve06_child",
> > 		NULL
> > 	},

> > tst_test.c:1526: TINFO: Timeout per run is 0h 00m 30s
> > execve06.c:33: TFAIL: Failed to execute execl01_child: ENOENT (2)
> > tst_test.c:395: TBROK: Invalid child (23451) exit value 1

> The difference is because the test library adds current directory and
> test start directory into $PATH before a test is executed, see
> add_paths() in the tst_test.c.

> The .needs_cmds is for binaries installed on the system in /usr/bin/
> etc. so it does not make much sense to call the add_paths() before we
> process the array.
Thx!

...
> > Testing matches the description from kernel commit.
> > Maybe also test for argv[0] being empty string (to make sure behavior does not
> > change, although unlikely it'd change)?

> It should be safe either way but I decided to be less specific and only
> check that something have been added there.
Sure.

> > I tested it on various kernels, works as expected.

> > Reviewed-by: Petr Vorel <pvorel@suse.cz>
> > Tested-by: Petr Vorel <pvorel@suse.cz>

> I will push it with the added runtest entries and fixed copyright then.
Thx!

Kind regards,
Petr

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

      reply	other threads:[~2022-06-14 13:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-13 12:51 [LTP] [PATCH] syscalls/execve06: Add test for argv[0] = NULL Cyril Hrubis
2022-06-13 13:51 ` Petr Vorel
2022-06-14 12:17   ` Cyril Hrubis
2022-06-13 14:31 ` Petr Vorel
2022-06-14 13:04   ` Cyril Hrubis
2022-06-14 13:34     ` Petr Vorel [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=YqiOY2obFxbj//We@pevik \
    --to=pvorel@suse.cz \
    --cc=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.