[LTP] [RFC PATCH 1/2] Add support for mixing C and shell code
Petr Vorel
pvorel@suse.cz
Wed Jul 17 19:51:50 CEST 2024
Hi all,
> On Wed, Jul 17, 2024 at 4:49 PM Cyril Hrubis <chrubis@suse.cz> wrote:
> > Hi!
> > > Since execvpe() is a GNU extension, we need to ensure that
> > > we are compiling with GNU extensions enabled.
> > > add this line into the head of tst_test.c:
> > > #define _GNU_SOURCE
Good, you already noticed.
> > As for the execvpe() I've used that for the prototype but I'm unsure if
> > it could be used in the final product, since this is the test library it
> > has to compile on all kinds of libc out there. It looks like musl does
> > support it but I haven't checked Android bionic.
> > So we may need to write our own implemtantion on the top of the execve()
> > syscall. But that should be as easy as getting the path to the script
> > before we pass it to execve().
It supports it. It looks like even without _GNU_SOURCE:
https://android.googlesource.com/platform/bionic.git/+/refs/heads/main/libc/include/unistd.h#142
But better to keep Edward in loop.
> Indeed. We need to create a ltp_execvpe() based on execve().
So there will be v2, right?
Kind regards,
Petr
More information about the ltp
mailing list