mirror of
https://github.com/Fennix-Project/Userspace.git
synced 2025-05-27 15:04:25 +00:00
Add test_stdin function
This commit is contained in:
parent
ae58ac9cae
commit
e90d69948c
@ -737,6 +737,20 @@ void reboot_linux()
|
|||||||
reboot(RB_AUTOBOOT);
|
reboot(RB_AUTOBOOT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void test_stdin()
|
||||||
|
{
|
||||||
|
printf("- Testing stdin\n");
|
||||||
|
|
||||||
|
while (1)
|
||||||
|
{
|
||||||
|
printf("Input: ");
|
||||||
|
fflush(stdout);
|
||||||
|
char input[256];
|
||||||
|
fgets(input, sizeof(input), stdin);
|
||||||
|
printf("%s", input);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void self_fork_exec()
|
void self_fork_exec()
|
||||||
{
|
{
|
||||||
while (1)
|
while (1)
|
||||||
@ -812,6 +826,8 @@ int main(int argc, char *argv[], char *envp[])
|
|||||||
// fork_bomb();
|
// fork_bomb();
|
||||||
// fork_bomb_syscall();
|
// fork_bomb_syscall();
|
||||||
|
|
||||||
|
// test_stdin();
|
||||||
|
// test_stdio();
|
||||||
test_unaligned();
|
test_unaligned();
|
||||||
test_passwd();
|
test_passwd();
|
||||||
test_brk();
|
test_brk();
|
||||||
@ -819,7 +835,6 @@ int main(int argc, char *argv[], char *envp[])
|
|||||||
test_signal();
|
test_signal();
|
||||||
test_ptmx();
|
test_ptmx();
|
||||||
test_args(argc, argv, envp);
|
test_args(argc, argv, envp);
|
||||||
// test_stdio();
|
|
||||||
test_system();
|
test_system();
|
||||||
test_file();
|
test_file();
|
||||||
test_dirent();
|
test_dirent();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user