test: call timer subsystem finalize at exit

Message ID 1557176631-21416-1-git-send-email-erik.g.carrillo@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series test: call timer subsystem finalize at exit |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/mellanox-Performance-Testing success Performance Testing PASS
ci/intel-Performance-Testing success Performance Testing PASS

Commit Message

Carrillo, Erik G May 6, 2019, 9:03 p.m. UTC
  The eal_flags_autotest checks that no hugepage map files are left behind
after a process exits, which can only be the case if all allocations made
from DPDK heaps were freed back to the freelist, resulting in the
hugepage map files being unlinked automatically.  Add a call to
rte_timer_subsystem_finalize() at application exit time to release
allocations now made by the timer library.

Fixes: c0749f7096c7 ("timer: allow management in shared memory")

Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
---
 app/test/test.c | 3 +++
 1 file changed, 3 insertions(+)
  

Comments

Thomas Monjalon May 9, 2019, 4:59 p.m. UTC | #1
06/05/2019 23:03, Erik Gabriel Carrillo:
> The eal_flags_autotest checks that no hugepage map files are left behind
> after a process exits, which can only be the case if all allocations made
> from DPDK heaps were freed back to the freelist, resulting in the
> hugepage map files being unlinked automatically.  Add a call to
> rte_timer_subsystem_finalize() at application exit time to release
> allocations now made by the timer library.
> 
> Fixes: c0749f7096c7 ("timer: allow management in shared memory")
> 
> Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>

Applied, thanks
  

Patch

diff --git a/app/test/test.c b/app/test/test.c
index fbe4464..ea1e98f 100644
--- a/app/test/test.c
+++ b/app/test/test.c
@@ -187,6 +187,9 @@  main(int argc, char **argv)
 	ret = 0;
 
 out:
+#ifdef RTE_LIBRTE_TIMER
+	rte_timer_subsystem_finalize();
+#endif
 	rte_eal_cleanup();
 	return ret;
 }