Fork out a new function set_global_mempolicy() from the previous testoom() func, which will be useful for other func.
Signed-off-by: Zhouping Liu <[email protected]> --- testcases/kernel/mem/lib/mem.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/testcases/kernel/mem/lib/mem.c b/testcases/kernel/mem/lib/mem.c index 84b36bc..509bb59 100644 --- a/testcases/kernel/mem/lib/mem.c +++ b/testcases/kernel/mem/lib/mem.c @@ -91,7 +91,7 @@ void oom(int testcase, int lite) } } -void testoom(int mempolicy, int lite) +static void set_global_mempolicy(int mempolicy) { #if HAVE_NUMA_H && HAVE_LINUX_MEMPOLICY_H && HAVE_NUMAIF_H \ && HAVE_MPOL_CONSTANTS @@ -133,6 +133,11 @@ void testoom(int mempolicy, int lite) tst_brkm(TBROK|TERRNO, cleanup, "set_mempolicy"); } #endif +} + +void testoom(int mempolicy, int lite) +{ + set_global_mempolicy(mempolicy); tst_resm(TINFO, "start normal OOM testing."); oom(NORMAL, lite); -- 1.7.11.7 ------------------------------------------------------------------------------ Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
