[LTP] [RFC PATCH 1/2] Add support for mixing C and shell code

Li Wang liwang@redhat.com
Wed Jul 17 12:21:31 CEST 2024


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
>
> 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().
>

Indeed.  We need to create a ltp_execvpe() based on execve().

-- 
Regards,
Li Wang


More information about the ltp mailing list