Lines Matching refs:child
114 * desired outcome (e.g. child killed, operation failed with ENOMEM)
115 * @testcase: selects how child allocates memory
117 * @lite: if non-zero, child makes only single TESTMEM+MB allocation
118 * if zero, child keeps allocating memory until it gets killed
120 * @retcode: expected return code of child process
121 * if matches child ret code, this function reports PASS,
123 * @allow_sigkill: if zero and child is killed, this function reports FAIL
124 * if non-zero, then if child is killed by SIGKILL
295 tst_res(TINFO, "child %d verifies memory content.", proc);
302 tst_res(TFAIL, "child %d has %c at "
333 tst_res(TINFO, "child %d continues...", child_num);
336 tst_res(TINFO, "child %d allocates %d MB filled with '%c'",
340 tst_res(TINFO, "child %d allocates %d MB filled with '%c'"
377 tst_res(TINFO, "child %d stops.", child_num);
389 tst_res(TINFO, "child %d stops.", child_num);
404 tst_res(TINFO, "child %d finished.", child_num);
407 static void stop_ksm_children(int *child, int num)
413 SAFE_WAITPID(child[k], &status, WUNTRACED);
415 tst_brk(TBROK, "child %d was not stopped", k);
419 static void resume_ksm_children(int *child, int num)
425 SAFE_KILL(child[k], SIGCONT);
432 int i, j, status, *child;
450 /* Since from third child, the data is same with the first child's */
460 child = SAFE_MALLOC(num * sizeof(int));
464 switch (child[i] = SAFE_FORK()) {
482 stop_ksm_children(child, num);
491 resume_ksm_children(child, num);
492 stop_ksm_children(child, num);
495 resume_ksm_children(child, num);
496 stop_ksm_children(child, num);
499 resume_ksm_children(child, num);
500 stop_ksm_children(child, num);
503 resume_ksm_children(child, num);
504 stop_ksm_children(child, num);
510 resume_ksm_children(child, num);
519 tst_res(TFAIL, "child exit status is %d",
764 /* Warning: *DO NOT* use this function in child */