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

Cyril Hrubis chrubis@suse.cz
Wed Jul 17 10:52:22 CEST 2024


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

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list