<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small"><br></div></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Li Wang <<a href="mailto:liwang@redhat.com">liwang@redhat.com</a>> wrote:<br></div><div dir="ltr" class="gmail_attr"><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div style="font-size:small">Hi Xinpeng,</div><div style="font-size:small"><br></div><div>I sent to you the case swapping01 solving this(via FILE_LINES_SCANF) already, feel free to take an reference:</div><div><a href="https://github.com/linux-test-project/ltp/blob/master/testcases/kernel/mem/swapping/swapping01.c#L85" style="font-size:small" target="_blank">https://github.com/linux-test-project/ltp/blob/master/testcases/kernel/mem/swapping/swapping01.c#L85</a></div></div></blockquote><div><br></div><div><div class="gmail_default" style="font-size:small">Or, maybe we can extract this process into a function and put it in tst_memutils.h, to convinently reuse by other testcases too?</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">void tst_get_MemAvailable(void);</div></div></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Regards,<br></div><div>Li Wang<br></div></div></div></div>