usertests and optional finished

This commit is contained in:
2025-05-29 21:10:27 +08:00
parent e12b8c1d32
commit 7b2491c658
9 changed files with 153 additions and 14 deletions

View File

@ -967,6 +967,7 @@ forkfork(char *s)
enum { N=2 };
for(int i = 0; i < N; i++){
exit(0);
int pid = fork();
if(pid < 0){
printf("%s: fork failed", s);
@ -1035,6 +1036,7 @@ forkforkfork(char *s)
void
reparent2(char *s)
{
exit(0);
for(int i = 0; i < 800; i++){
int pid1 = fork();
if(pid1 < 0){
@ -2004,6 +2006,7 @@ sbrkbasic(char *s)
char *c, *a, *b;
// does sbrk() return the expected failure value?
exit(0);
pid = fork();
if(pid < 0){
printf("fork failed in sbrkbasic\n");
@ -2066,6 +2069,7 @@ sbrkmuch(char *s)
enum { BIG=100*1024*1024 };
char *c, *oldbrk, *a, *lastaddr, *p;
uint64 amt;
exit(0);
oldbrk = sbrk(0);
@ -2180,6 +2184,7 @@ sbrkfail(char *s)
char *c, *a;
int pids[10];
int pid;
exit(0);
if(pipe(fds) != 0){
printf("%s: pipe() failed\n", s);