strace/tests/execve.c
Dmitry V. Levin 4ff687bb31 execve: fix support of personalities with different word size
* execve.c (printargc): Do not assume that host and target pointers have
the same size.
* tests/execve.c: New file.
* tests/execve.expected: Likewise.
* tests/execve-v.expected: Likewise.
* tests/execve.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add execve.
(TESTS): Add execve.test.
(EXTRA_DIST): Add execve.expected and execve-v.expected.
* tests/.gitignore: Add execve.
2015-07-27 15:27:43 +00:00

15 lines
339 B
C

#include <unistd.h>
#define FILENAME "execve\nfilename"
static const char * const argv[] =
{ FILENAME, "first", "second", NULL, NULL, NULL };
static const char * const envp[] =
{ "foobar=1", "foo\nbar=2", NULL , "", NULL , "", NULL, NULL};
int
main(void)
{
execve(FILENAME, (char * const *) argv, (char * const *) envp);
return 0;
}