mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-28 20:03:22 +00:00
Rename regression to test
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
5eefd600cc
commit
f675552c5a
18
test/apps/execve/execve.c
Normal file
18
test/apps/execve/execve.c
Normal file
@ -0,0 +1,18 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
char *argv[] = { "argv1", "argv2", NULL };
|
||||
char *envp[] = { "home=/", "version=1.1", NULL };
|
||||
// The hello will be put at /execve/hello in InitRamfs
|
||||
printf("Execve a new file /execve/hello:\n");
|
||||
// flush the stdout content to ensure the content print to console
|
||||
fflush(stdout);
|
||||
execve("/test/execve/hello", argv, envp);
|
||||
printf("Should not print\n");
|
||||
fflush(stdout);
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user