Skip to content

Commit fb86046

Browse files
committed
nvm_flash_log: test: rename nvm backend enums
1 parent e544f3c commit fb86046

File tree

5 files changed

+17
-17
lines changed

5 files changed

+17
-17
lines changed

test/wh_test.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ int whTest_Unit(void)
6666
WH_TEST_ASSERT(0 == whTest_Flash_RamSim());
6767
WH_TEST_ASSERT(0 == whTest_NvmFlash());
6868
#if defined(WOLFHSM_CFG_CERTIFICATE_MANAGER) && !defined(WOLFHSM_CFG_NO_CRYPTO)
69-
WH_TEST_ASSERT(0 == whTest_CertRamSim(NVM_TEST_BACKEND_FLASH));
69+
WH_TEST_ASSERT(0 == whTest_CertRamSim(WH_NVM_TEST_BACKEND_FLASH));
7070

7171
#if defined(WOLFHSM_CFG_SERVER_NVM_FLASH_LOG)
72-
WH_TEST_ASSERT(0 == whTest_CertRamSim(NVM_TEST_BACKEND_FLASH_LOG));
72+
WH_TEST_ASSERT(0 == whTest_CertRamSim(WH_NVM_TEST_BACKEND_FLASH_LOG));
7373
#endif /* WOLFHSM_CFG_SERVER_NVM_FLASH_LOG */
7474

7575
#endif /* WOLFHSM_CFG_CERTIFICATE_MANAGER && !WOLFHSM_CFG_NO_CRYPTO */
@@ -85,10 +85,10 @@ int whTest_Unit(void)
8585

8686
#if defined(WOLFHSM_CFG_SERVER_IMG_MGR) && !defined(WOLFHSM_CFG_NO_CRYPTO)
8787
/* Image Manager Tests */
88-
WH_TEST_ASSERT(0 == whTest_ServerImgMgr(NVM_TEST_BACKEND_FLASH));
88+
WH_TEST_ASSERT(0 == whTest_ServerImgMgr(WH_NVM_TEST_BACKEND_FLASH));
8989

9090
#if defined(WOLFHSM_CFG_SERVER_NVM_FLASH_LOG)
91-
WH_TEST_ASSERT(0 == whTest_ServerImgMgr(NVM_TEST_BACKEND_FLASH_LOG));
91+
WH_TEST_ASSERT(0 == whTest_ServerImgMgr(WH_NVM_TEST_BACKEND_FLASH_LOG));
9292
#endif
9393

9494
#endif /* WOLFHSM_CFG_SERVER_IMG_MGR && !WOLFHSM_CFG_NO_CRYPTO */

test/wh_test_clientserver.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1933,31 +1933,31 @@ static int wh_ClientServer_PosixMemMapThreadTest(whTestNvmBackendType nvmType)
19331933
int whTest_ClientServer(void)
19341934
{
19351935
printf("Testing client/server sequential: mem...\n");
1936-
WH_TEST_ASSERT(0 == whTest_ClientServerSequential(NVM_TEST_BACKEND_FLASH));
1936+
WH_TEST_ASSERT(0 == whTest_ClientServerSequential(WH_NVM_TEST_BACKEND_FLASH));
19371937

19381938
#if defined(WOLFHSM_CFG_SERVER_NVM_FLASH_LOG)
19391939
printf("Testing client/server sequential: mem + flash log...\n");
19401940
WH_TEST_ASSERT(0 ==
1941-
whTest_ClientServerSequential(NVM_TEST_BACKEND_FLASH_LOG));
1941+
whTest_ClientServerSequential(WH_NVM_TEST_BACKEND_FLASH_LOG));
19421942
#endif /* defined(WOLFHSM_CFG_SERVER_NVM_FLASH_LOG) */
19431943

19441944
#if defined(WOLFHSM_CFG_TEST_POSIX)
19451945
printf("Testing client/server: (pthread) mem...\n");
1946-
WH_TEST_ASSERT(0 == wh_ClientServer_MemThreadTest(NVM_TEST_BACKEND_FLASH));
1946+
WH_TEST_ASSERT(0 == wh_ClientServer_MemThreadTest(WH_NVM_TEST_BACKEND_FLASH));
19471947

19481948
printf("Testing client/server: (pthread) POSIX shared memory ...\n");
19491949
WH_TEST_ASSERT(
1950-
0 == wh_ClientServer_PosixMemMapThreadTest(NVM_TEST_BACKEND_FLASH));
1950+
0 == wh_ClientServer_PosixMemMapThreadTest(WH_NVM_TEST_BACKEND_FLASH));
19511951

19521952
#if defined(WOLFHSM_CFG_SERVER_NVM_FLASH_LOG)
19531953
printf("Testing client/server: (pthread) mem + flash log...\n");
19541954
WH_TEST_ASSERT(0 ==
1955-
wh_ClientServer_MemThreadTest(NVM_TEST_BACKEND_FLASH_LOG));
1955+
wh_ClientServer_MemThreadTest(WH_NVM_TEST_BACKEND_FLASH_LOG));
19561956

19571957
printf("Testing client/server: (pthread) POSIX shared memory + flash "
19581958
"log...\n");
19591959
WH_TEST_ASSERT(
1960-
0 == wh_ClientServer_PosixMemMapThreadTest(NVM_TEST_BACKEND_FLASH_LOG));
1960+
0 == wh_ClientServer_PosixMemMapThreadTest(WH_NVM_TEST_BACKEND_FLASH_LOG));
19611961
#endif /* defined(WOLFHSM_CFG_SERVER_NVM_FLASH_LOG) */
19621962

19631963
#endif /* defined(WOLFHSM_CFG_TEST_POSIX) */

test/wh_test_common.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ int whTest_NvmCfgBackend(whTestNvmBackendType type,
5454

5555
switch (type) {
5656
#if defined(WOLFHSM_CFG_SERVER_NVM_FLASH_LOG)
57-
case NVM_TEST_BACKEND_FLASH_LOG:
57+
case WH_NVM_TEST_BACKEND_FLASH_LOG:
5858
nvmSetup->nvmFlashLogCfg.flash_cb = fCb;
5959
/* restrict simulated flash partition to nvm_flash_log_partition */
6060
WH_TEST_ASSERT(fCfg->size >= WH_NVM_FLASH_LOG_PARTITION_SIZE * 2);
@@ -70,7 +70,7 @@ int whTest_NvmCfgBackend(whTestNvmBackendType type,
7070
nvmCfg->config = &nvmSetup->nvmFlashLogCfg;
7171
break;
7272
#endif
73-
case NVM_TEST_BACKEND_FLASH:
73+
case WH_NVM_TEST_BACKEND_FLASH:
7474
/* NVM Flash Configuration using RamSim HAL Flash */
7575
nvmSetup->nvmFlashCfg.cb = fCb;
7676
nvmSetup->nvmFlashCfg.context = fCtx;

test/wh_test_common.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,11 @@
111111

112112

113113
typedef enum {
114-
NVM_TEST_BACKEND_FLASH = 0,
114+
WH_NVM_TEST_BACKEND_FLASH = 0,
115115
#if defined(WOLFHSM_CFG_SERVER_NVM_FLASH_LOG)
116-
NVM_TEST_BACKEND_FLASH_LOG,
116+
WH_NVM_TEST_BACKEND_FLASH_LOG,
117117
#endif
118-
NVM_TEST_BACKEND_COUNT
118+
WH_NVM_TEST_BACKEND_COUNT
119119
} whTestNvmBackendType;
120120

121121
/* union helper struct to be able to test more than one NVM implementation */

test/wh_test_crypto.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3713,12 +3713,12 @@ int whTest_Crypto(void)
37133713
{
37143714
printf("Testing crypto: (pthread) mem...\n");
37153715
WH_TEST_RETURN_ON_FAIL(
3716-
wh_ClientServer_MemThreadTest(NVM_TEST_BACKEND_FLASH));
3716+
wh_ClientServer_MemThreadTest(WH_NVM_TEST_BACKEND_FLASH));
37173717

37183718
#if defined(WOLFHSM_CFG_SERVER_NVM_FLASH_LOG)
37193719
printf("Testing crypto: (pthread) mem (flash log)...\n");
37203720
WH_TEST_RETURN_ON_FAIL(
3721-
wh_ClientServer_MemThreadTest(NVM_TEST_BACKEND_FLASH_LOG));
3721+
wh_ClientServer_MemThreadTest(WH_NVM_TEST_BACKEND_FLASH_LOG));
37223722
#endif
37233723

37243724
return 0;

0 commit comments

Comments
 (0)