From 4e9b694a940e326cc1852938ca15d65f924d5d48 Mon Sep 17 00:00:00 2001 From: aidan garske Date: Thu, 25 Jun 2026 14:56:10 -0700 Subject: [PATCH] Fix whTest_NvmDma cleanup baseline check to tolerate prior-test NVM objects --- test-refactor/client-server/wh_test_nvm_ops.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test-refactor/client-server/wh_test_nvm_ops.c b/test-refactor/client-server/wh_test_nvm_ops.c index 92ecb3020..2f4151928 100644 --- a/test-refactor/client-server/wh_test_nvm_ops.c +++ b/test-refactor/client-server/wh_test_nvm_ops.c @@ -253,8 +253,9 @@ static int _runNvmObjectTest(whClientContext* ctx, ctx, (whNvmId)(id_base + i))); } - /* Cleanup -> Init round-trip leaves NVM in a usable state - * with no leftovers. */ + /* Cleanup -> Init round-trip wipes all objects and leaves NVM usable. As a + * full wipe also clears objects left by earlier tests, the available count + * is at least the starting baseline rather than exactly equal to it. */ WH_TEST_RETURN_ON_FAIL(wh_Client_NvmCleanup(ctx, &server_rc)); WH_TEST_ASSERT_RETURN(server_rc == WH_ERROR_OK); @@ -266,7 +267,7 @@ static int _runNvmObjectTest(whClientContext* ctx, ctx, &server_rc, &avail_size, &avail_objects, &reclaim_size, &reclaim_objects)); WH_TEST_ASSERT_RETURN(server_rc == WH_ERROR_OK); - WH_TEST_ASSERT_RETURN(avail_objects == baseline); + WH_TEST_ASSERT_RETURN(avail_objects >= baseline); return WH_ERROR_OK; }