diff options
author | Jason Evans <jasone@canonware.com> | 2016-02-20 02:24:30 (GMT) |
---|---|---|
committer | Jason Evans <jasone@canonware.com> | 2016-02-20 04:29:06 (GMT) |
commit | 49931bd8ffeffde72865990d74b7ff65d6e8c466 (patch) | |
tree | 5a4fc3be6a2fe5c87979a38660f686ec50fd9a80 /test/unit/stats.c | |
parent | b24f74b8624fb43f9b562a067ca14563f45cb553 (diff) | |
download | jemalloc-49931bd8ffeffde72865990d74b7ff65d6e8c466.zip jemalloc-49931bd8ffeffde72865990d74b7ff65d6e8c466.tar.gz jemalloc-49931bd8ffeffde72865990d74b7ff65d6e8c466.tar.bz2 |
Fix test_stats_arenas_summary fragility.
Fix test_stats_arenas_summary to deallocate before asserting that
purging must have happened.
Diffstat (limited to 'test/unit/stats.c')
-rw-r--r-- | test/unit/stats.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/unit/stats.c b/test/unit/stats.c index 8e4bc63..6e80316 100644 --- a/test/unit/stats.c +++ b/test/unit/stats.c @@ -93,6 +93,10 @@ TEST_BEGIN(test_stats_arenas_summary) huge = mallocx(chunksize, 0); assert_ptr_not_null(huge, "Unexpected mallocx() failure"); + dallocx(little, 0); + dallocx(large, 0); + dallocx(huge, 0); + assert_d_eq(mallctl("arena.0.purge", NULL, NULL, NULL, 0), 0, "Unexpected mallctl() failure"); @@ -116,10 +120,6 @@ TEST_BEGIN(test_stats_arenas_summary) assert_u64_le(nmadvise, purged, "nmadvise should be no greater than purged"); } - - dallocx(little, 0); - dallocx(large, 0); - dallocx(huge, 0); } TEST_END |