Update test_fork.c
This commit is contained in:
parent
468d99326c
commit
9acd74024b
|
@ -42,7 +42,7 @@ static void* xmalloc(size_t n)
|
||||||
void* tmp;
|
void* tmp;
|
||||||
tmp = malloc(n);
|
tmp = malloc(n);
|
||||||
if (tmp == NULL) {
|
if (tmp == NULL) {
|
||||||
fprintf(stderr, "You are about to die\n");
|
fprintf(stderr, "Failed to allocate memory for the testcase.\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
} else {
|
} else {
|
||||||
return tmp;
|
return tmp;
|
||||||
|
@ -104,7 +104,7 @@ exit(0);
|
||||||
|
|
||||||
fork_pid = fork();
|
fork_pid = fork();
|
||||||
if (fork_pid == -1) {
|
if (fork_pid == -1) {
|
||||||
perror(fork");
|
perror("fork");
|
||||||
CTEST_ERR("Failed to fork process.");
|
CTEST_ERR("Failed to fork process.");
|
||||||
} else if (fork_pid == 0) {
|
} else if (fork_pid == 0) {
|
||||||
// Compute a DGEMM product in the child process to check that the
|
// Compute a DGEMM product in the child process to check that the
|
||||||
|
|
Loading…
Reference in New Issue