Skip to contentSkip to conversation

lib/tst_test.c: add *cleanup() before exit

PATCH zhaogongyi 3 participants 3 messages Nov 9, 2021

lore
Share & tools
lore

zhaogongyi

author
#0 lore raw

Hi Cyril,

If we run the LTP testcases Concurrently, this might trigger the oom killer to kill the library process before the main process exit, and it might fill up the tmpfs through a long time running.

Thanks so much!
Gongyi

Quoted 14 lines

Hi!

Quoted 3 lines

If the main process exit without *cleanup() and when the lib process has exit, the test environment would not be reset when the testcase needs resource of device or tmpfs.

This looks like working around the real problem. The test library process is supposed to outlive the child in all circumstances.

What exactly happens in your case that this code gets triggered?

--
Cyril Hrubis
[email protected]

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
#1 lore raw

Hi!

Quoted 3 lines

If we run the LTP testcases Concurrently, this might trigger the oom killer to kill the library process before the main process exit, and it might fill up the tmpfs through a long time running.

Then I guess we may as well adjust the oom_score for the test library process so that it's less likely to end up being killed.

Signature · 5 lines
Cyril Hrubis
[email protected]

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
#2 lore raw
Quoted 8 lines · Cyril Hrubis

Hi!

Quoted 3 lines

If we run the LTP testcases Concurrently, this might trigger the oom killer to kill the library process before the main process exit, and it might fill up the tmpfs through a long time running.

Then I guess we may as well adjust the oom_score for the test library process so that it's less likely to end up being killed.

+1

And we have to guarantee that oom_score doesn't be inherited by any test case. Otherwise, it will break our OOM tests.

Signature · 2 lines
Regards,
Li Wang
Signature · 2 lines
-- 
Mailing list info: https://lists.linux.it/listinfo/ltp