Skip test/unit/pack when profiling is enabled.

The test assumes no sampled allocations.
This commit is contained in:
Qi Wang 2017-12-11 14:04:07 -08:00 committed by Qi Wang
parent 5e0332890f
commit f70785de91

View File

@ -88,6 +88,12 @@ arena_reset_mallctl(unsigned arena_ind) {
} }
TEST_BEGIN(test_pack) { TEST_BEGIN(test_pack) {
bool prof_enabled;
size_t sz = sizeof(prof_enabled);
if (mallctl("opt.prof", (void *)&prof_enabled, &sz, NULL, 0) == 0) {
test_skip_if(prof_enabled);
}
unsigned arena_ind = arenas_create_mallctl(); unsigned arena_ind = arenas_create_mallctl();
size_t nregs_per_run = nregs_per_run_compute(); size_t nregs_per_run = nregs_per_run_compute();
size_t nregs = nregs_per_run * NSLABS; size_t nregs = nregs_per_run * NSLABS;