[LTP] [RFC] [PATCH] lib: Fix result propagation after exec() + tst_reinit()

Li Wang liwang@redhat.com
Wed Aug 1 13:09:05 CEST 2018


On Tue, Jul 31, 2018 at 9:08 PM, Cyril Hrubis <chrubis@suse.cz> wrote:

> The result pointer wasn't initialized in tst_reinit(), which haven't
> allowed for test result propagation to the main test process and there
> is actually no reason not to do that. So this commit initializes the
> results pointer in tst_reinit() and also adds a needs_ipc_path flag to
> tst_test structure, which causes the library not to unlink the IPC file
> after it has been mapped and also inserts LTP_IPC_PATH to the
> environment.
>
> This commit also adds a test that also shows the usage of the API.
> ...
>
>         ptr = SAFE_MMAP(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED,
> fd, 0);
> +       results = ptr;
>

The ptr seems redundant here, I suggest to remove it from tst_reinit().

Others looks good to me.

-- 
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20180801/187c7173/attachment.html>


More information about the ltp mailing list