From 71bc1a3d91ae7e513488401627eca2a31e9f6e60 Mon Sep 17 00:00:00 2001 From: Qi Wang Date: Fri, 10 Mar 2023 13:15:59 -0800 Subject: [PATCH] Avoid assuming the arena id in test when percpu_arena is used. --- test/unit/huge.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/unit/huge.c b/test/unit/huge.c index ec64e500..53f6577b 100644 --- a/test/unit/huge.c +++ b/test/unit/huge.c @@ -82,6 +82,9 @@ TEST_BEGIN(huge_allocation) { expect_u_gt(arena1, 0, "Huge allocation should not come from arena 0"); dallocx(ptr, 0); + test_skip_if(have_percpu_arena && + PERCPU_ARENA_ENABLED(opt_percpu_arena)); + ptr = mallocx(HUGE_SZ >> 1, 0); expect_ptr_not_null(ptr, "Fail to allocate half huge size"); expect_d_eq(mallctl("arenas.lookup", &arena2, &sz, &ptr,