[LTP] [PATCH] max_map_count: tst_fork() instead of fork()

Stanislav Kholmanskikh
2015-04-15T09:27:22Z

In order to put output messages in order and remove "duplicates",
we need a fflush() before forking and tst_fork() does it.

Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
---
testcases/kernel/mem/tunable/max_map_count.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/testcases/kernel/mem/tunable/max_map_count.c b/testcases/kernel/mem/tunable/max_map_count.c
index 96ec2b8..2c0599e 100644
--- a/testcases/kernel/mem/tunable/max_map_count.c
+++ b/testcases/kernel/mem/tunable/max_map_count.c
@@ -200,7 +200,7 @@ static void max_map_count_test(void)
while (max_maps <= max_iters) {
set_sys_tune("max_map_count", max_maps, 1);

- switch (pid = fork()) {
+ switch (pid = tst_fork()) {
case -1:
tst_brkm(TBROK | TERRNO, cleanup, "fork");
case 0:
--
1.7.1