History log of /external/ltp/lib/tests/tst_record_childstatus.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
8c1e0b3afe4f1c4da32fe7d1b5fa9738aacacab4 28-Jul-2014 Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com> lib/tst_res.c: introduce tst_record_childstatus()

In case we need do real test work in child process parent process can
use tst_record_childstatus() to make child process's test results
propagated to parent process correctly.

The child can use tst_resm(), tst_brkm() followed by the tst_exit() or
plain old exit() (with TPASS, TFAIL and TBROK).

WARNING: Be wary that the child cleanup function passed to tst_brkm()
must clean only resources the child has allocated. E.g. the
child cleanup is different function from the parent cleanup.

This commit also changes tst_fork() to reset the stored result value
(T_exitval in the sources) which is not strictly needed but it's cleaner
and will ease debugging.

Signed-off-by: Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com>
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
/external/ltp/lib/tests/tst_record_childstatus.c