Format code automatically for regression tests

This commit is contained in:
Ruihan Li
2024-03-16 00:15:19 +08:00
committed by Tate, Hongliang Tian
parent 60cd65d837
commit 82de200d03
22 changed files with 1344 additions and 1123 deletions

View File

@ -3,15 +3,16 @@
#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("/regression/execve/hello", argv, envp);
printf("Should not print\n");
fflush(stdout);
return 0;
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("/regression/execve/hello", argv, envp);
printf("Should not print\n");
fflush(stdout);
return 0;
}