netbsd-tests: Remove some pointless sleeps from message queue tests
- In the msgctl tests, there is no point in sleeping after a fork(). Just block immediately in wait(). - In non-blocking send/recv tests, just wait for the child to exit once it's reached a message limit. If a bug prevents the child from exiting promptly, the test will time out. MFC after: 1 week
This commit is contained in:
parent
3916fdd2f2
commit
478de7f8e2
@ -212,7 +212,6 @@ ATF_TC_BODY(msgctl_pid, tc)
|
||||
_exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
(void)sleep(1);
|
||||
(void)wait(&sta);
|
||||
(void)memset(&msgds, 0, sizeof(struct msqid_ds));
|
||||
|
||||
@ -232,7 +231,6 @@ ATF_TC_BODY(msgctl_pid, tc)
|
||||
_exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
(void)sleep(1);
|
||||
(void)wait(&sta);
|
||||
(void)memset(&msgds, 0, sizeof(struct msqid_ds));
|
||||
|
||||
|
@ -275,8 +275,6 @@ ATF_TC_BODY(msgrcv_nonblock, tc)
|
||||
_exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
(void)sleep(2);
|
||||
(void)kill(pid, SIGKILL);
|
||||
(void)wait(&sta);
|
||||
|
||||
if (WIFSIGNALED(sta) != 0 || WTERMSIG(sta) == SIGKILL)
|
||||
|
@ -265,8 +265,6 @@ ATF_TC_BODY(msgsnd_nonblock, tc)
|
||||
}
|
||||
}
|
||||
|
||||
(void)sleep(2);
|
||||
(void)kill(pid, SIGKILL);
|
||||
(void)wait(&sta);
|
||||
|
||||
if (WIFEXITED(sta) == 0 || WIFSIGNALED(sta) != 0)
|
||||
|
Loading…
Reference in New Issue
Block a user