[LTP] [PATCH] lib: add tst_read_meminfo / tst_get_avail_mem

Li Wang liwang@redhat.com
Wed Jul 13 11:35:05 CEST 2016


Jan,

On Thu, Jun 16, 2016 at 03:08:18AM -0400, Jan Stancek wrote:
> 
> I'm now considering exposing just a parse function, I'd like to
> avoid having separate function for each proc file. And possibly
> more than one since those 2 proc files you mentioned don't have
> uniform format for all content.

How is the parse function going?

As there comes more and more places need get_mem_avaliable(), my opinion
is that we can apply your walk_file_lines() patch first, and let the
/proc/meminfo could be read by this lib. Then if we need more proc/files info
in future, adding new separate function is also accepted.

After all, we had discussed that one parse function for each proc file
is very hard to achive.

Regards,
Li Wang


More information about the ltp mailing list