From: Florian Weimer via Libc-alpha <libc-alpha@sourceware.org>
To: vincent via Libc-alpha <libc-alpha@sourceware.org>
Cc: vmihalko@redhat.com
Subject: Re: [PATCH v5] ld.so: add an --argv0 option
Date: Thu, 24 Sep 2020 11:53:13 +0200 [thread overview]
Message-ID: <87ft77mrg6.fsf@oldenburg2.str.redhat.com> (raw)
In-Reply-To: <20200923060646.172273-1-vmihalko@redhat.com> (vincent via Libc-alpha's message of "Wed, 23 Sep 2020 08:06:46 +0200")
* vincent via Libc-alpha:
> is there any problem with this patch?
I think adding a NEWS entry would make sense.
> +ARGV0 = test-argv0
> +$(objpfx)argv0test.out: tst-rtld-argv0.sh $(objpfx)ld.so \
> + $(objpfx)argv0test
> + $(SHELL) $< $(objpfx)ld.so $(objpfx)argv0test \
> + '$(test-wrapper-env)' '$(run_program_env)' \
> + '$(rpath-link)' '$(ARGV0)' > $@; \
> + $(evaluate-test)
Here I do not think the ARGV0 variable adds much clarity.
> +#include <string.h>
> +#include <support/check.h>
> +
> +static int
> +do_test (int argc, char **argv)
> +{
> + TEST_COMPARE_BLOB (argv[0], strlen (argv[0]),
> + "test-argv0", strlen ("test-argv0"));
> + return 0;
> +}
You can use TEST_COMPARE_STRING, which will do the strlen for you.
The patch itself looks okay to me.
Thanks,
Florian
--
Red Hat GmbH, https://de.redhat.com/ , Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Charles Cachera, Brian Klemm, Laurie Krebs, Michael O'Neill
next prev parent reply other threads:[~2020-09-24 9:53 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-12 11:06 [PATCH] ld.so: add an --argv0 option Vincent Mihalkovic via Libc-alpha
2020-08-25 15:10 ` Adhemerval Zanella via Libc-alpha
2020-08-26 11:53 ` [PATCH v2] " vmihalko--- via Libc-alpha
2020-08-26 13:55 ` Adhemerval Zanella via Libc-alpha
2020-08-31 13:22 ` [PATCH v3] " vincent via Libc-alpha
2020-09-01 15:09 ` Adhemerval Zanella via Libc-alpha
2020-09-14 14:17 ` [PATCH v4] " vincent via Libc-alpha
2020-09-14 15:03 ` Andreas Schwab
2020-09-14 21:32 ` [PATCH v5] " vincent via Libc-alpha
2020-09-23 6:06 ` vincent via Libc-alpha
2020-09-24 9:53 ` Florian Weimer via Libc-alpha [this message]
2020-09-24 12:43 ` [PATCH v6] " vincent via Libc-alpha
2020-09-29 8:21 ` vincent via Libc-alpha
2020-09-29 10:37 ` Florian Weimer via Libc-alpha
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
List information: https://www.gnu.org/software/libc/involved.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ft77mrg6.fsf@oldenburg2.str.redhat.com \
--to=libc-alpha@sourceware.org \
--cc=fweimer@redhat.com \
--cc=vmihalko@redhat.com \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).