<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Nov 8, 2021 at 3:37 PM Zhao Gongyi <<a href="mailto:zhaogongyi@huawei.com" target="_blank">zhaogongyi@huawei.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">If the main process exit without *cleanup() and when the lib process<br>
has exit, the test environment would not be reset when the testcase<br>
needs resource of device or tmpfs.<br>
<br>
Signed-off-by: Zhao Gongyi <<a href="mailto:zhaogongyi@huawei.com" target="_blank">zhaogongyi@huawei.com</a>><br></blockquote><div> </div><div><span class="gmail_default" style="font-size:small"></span>Reviewed-by: Li Wang <<a href="mailto:liwang@redhat.com" target="_blank">liwang@redhat.com</a>></div><div><span class="gmail_default"></span> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
---<br>
lib/tst_test.c | 2 ++<br>
1 file changed, 2 insertions(+)<br>
<br>
diff --git a/lib/tst_test.c b/lib/tst_test.c<br>
index 02ae28335..4c7e3a97b 100644<br>
--- a/lib/tst_test.c<br>
+++ b/lib/tst_test.c<br>
@@ -1226,6 +1226,8 @@ static void heartbeat(void)<br>
* We need kill the task group immediately since the<br>
* main process has exit.<br>
*/<br>
+ do_test_cleanup();<br>
+ do_cleanup();<br>
kill(0, SIGKILL);<br>
exit(TBROK);<br>
}<br>
--<br>
2.17.1<br>
<br>
<br>
-- <br>
Mailing list info: <a href="https://lists.linux.it/listinfo/ltp" rel="noreferrer" target="_blank">https://lists.linux.it/listinfo/ltp</a><br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div>Regards,<br></div><div>Li Wang<br></div></div></div></div>