diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-06-29 19:33:46 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-29 19:33:46 (GMT) |
commit | 39e6bf48c92dda00057e2e19cdeed93f5a07b3c8 (patch) | |
tree | 7596e876fd008f38830d04591d49a0328208b0d1 /test/mirror_vfd.c | |
parent | fd933f30b1f8cd487ad790ac0b054bb779280a62 (diff) | |
download | hdf5-39e6bf48c92dda00057e2e19cdeed93f5a07b3c8.zip hdf5-39e6bf48c92dda00057e2e19cdeed93f5a07b3c8.tar.gz hdf5-39e6bf48c92dda00057e2e19cdeed93f5a07b3c8.tar.bz2 |
Remove HD from HDmem* calls (#3211)
Diffstat (limited to 'test/mirror_vfd.c')
-rw-r--r-- | test/mirror_vfd.c | 110 |
1 files changed, 55 insertions, 55 deletions
diff --git a/test/mirror_vfd.c b/test/mirror_vfd.c index e738364..e0068c0 100644 --- a/test/mirror_vfd.c +++ b/test/mirror_vfd.c @@ -303,13 +303,13 @@ test_encdec_uint8_t(void) TESTING("Mirror encode/decode of uint8_t data"); /* Start of buffer uint8_t */ - HDmemset(buf, 0, 8); - HDmemset(expected, 0, 8); + memset(buf, 0, 8); + memset(expected, 0, 8); expected[0] = 200; out = 0; if (H5FD__mirror_xmit_encode_uint8(buf, v) != 1) TEST_ERROR; - if (HDmemcmp(buf, expected, 8) != 0) { + if (memcmp(buf, expected, 8) != 0) { PRINT_BUFFER_DIFF(buf, expected, 8); TEST_ERROR; } @@ -319,13 +319,13 @@ test_encdec_uint8_t(void) TEST_ERROR; /* Middle of buffer uint8_t */ - HDmemset(buf, 0, 8); - HDmemset(expected, 0, 8); + memset(buf, 0, 8); + memset(expected, 0, 8); expected[3] = v; out = 0; if (H5FD__mirror_xmit_encode_uint8((buf + 3), v) != 1) TEST_ERROR; - if (HDmemcmp(buf, expected, 8) != 0) { + if (memcmp(buf, expected, 8) != 0) { PRINT_BUFFER_DIFF(buf, expected, 8); TEST_ERROR; } @@ -335,13 +335,13 @@ test_encdec_uint8_t(void) TEST_ERROR; /* End of buffer uint8_t */ - HDmemset(buf, 0, 8); - HDmemset(expected, 0, 8); + memset(buf, 0, 8); + memset(expected, 0, 8); expected[7] = v; out = 0; if (H5FD__mirror_xmit_encode_uint8((buf + 7), v) != 1) TEST_ERROR; - if (HDmemcmp(buf, expected, 8) != 0) { + if (memcmp(buf, expected, 8) != 0) { PRINT_BUFFER_DIFF(buf, expected, 8); TEST_ERROR; } @@ -369,14 +369,14 @@ test_encdec_uint16_t(void) TESTING("Mirror encode/decode of uint16_t data"); /* Start of buffer uint16_t */ - HDmemset(buf, 0, 8); - HDmemset(expected, 0, 8); + memset(buf, 0, 8); + memset(expected, 0, 8); expected[0] = 0x8F; expected[1] = 0x02; out = 0; if (H5FD__mirror_xmit_encode_uint16(buf, v) != 2) TEST_ERROR; - if (HDmemcmp(buf, expected, 8) != 0) { + if (memcmp(buf, expected, 8) != 0) { PRINT_BUFFER_DIFF(buf, expected, 8); TEST_ERROR; } @@ -386,14 +386,14 @@ test_encdec_uint16_t(void) TEST_ERROR; /* Middle of buffer uint16_t */ - HDmemset(buf, 0, 8); - HDmemset(expected, 0, 8); + memset(buf, 0, 8); + memset(expected, 0, 8); expected[3] = 0x8F; expected[4] = 0x02; out = 0; if (H5FD__mirror_xmit_encode_uint16((buf + 3), v) != 2) TEST_ERROR; - if (HDmemcmp(buf, expected, 8) != 0) { + if (memcmp(buf, expected, 8) != 0) { PRINT_BUFFER_DIFF(buf, expected, 8); TEST_ERROR; } @@ -409,14 +409,14 @@ test_encdec_uint16_t(void) TEST_ERROR; /* End of buffer uint16_t */ - HDmemset(buf, 0, 8); - HDmemset(expected, 0, 8); + memset(buf, 0, 8); + memset(expected, 0, 8); expected[6] = 0x8F; expected[7] = 0x02; out = 0; if (H5FD__mirror_xmit_encode_uint16((buf + 6), v) != 2) TEST_ERROR; - if (HDmemcmp(buf, expected, 8) != 0) { + if (memcmp(buf, expected, 8) != 0) { PRINT_BUFFER_DIFF(buf, expected, 8); TEST_ERROR; } @@ -444,8 +444,8 @@ test_encdec_uint32_t(void) TESTING("Mirror encode/decode of uint32_t data"); /* Start of buffer uint32_t */ - HDmemset(buf, 0, 8); - HDmemset(expected, 0, 8); + memset(buf, 0, 8); + memset(expected, 0, 8); expected[0] = 0x8F; expected[1] = 0x02; expected[2] = 0x00; @@ -453,7 +453,7 @@ test_encdec_uint32_t(void) out = 0; if (H5FD__mirror_xmit_encode_uint32(buf, v) != 4) TEST_ERROR; - if (HDmemcmp(buf, expected, 8) != 0) { + if (memcmp(buf, expected, 8) != 0) { PRINT_BUFFER_DIFF(buf, expected, 8); TEST_ERROR; } @@ -463,8 +463,8 @@ test_encdec_uint32_t(void) TEST_ERROR; /* Middle of buffer uint32_t */ - HDmemset(buf, 0, 8); - HDmemset(expected, 0, 8); + memset(buf, 0, 8); + memset(expected, 0, 8); expected[3] = 0x8F; expected[4] = 0x02; expected[5] = 0x00; @@ -472,7 +472,7 @@ test_encdec_uint32_t(void) out = 0; if (H5FD__mirror_xmit_encode_uint32((buf + 3), v) != 4) TEST_ERROR; - if (HDmemcmp(buf, expected, 8) != 0) { + if (memcmp(buf, expected, 8) != 0) { PRINT_BUFFER_DIFF(buf, expected, 8); TEST_ERROR; } @@ -487,8 +487,8 @@ test_encdec_uint32_t(void) TEST_ERROR; /* End of buffer uint32_t */ - HDmemset(buf, 0, 8); - HDmemset(expected, 0, 8); + memset(buf, 0, 8); + memset(expected, 0, 8); expected[4] = 0x8F; expected[5] = 0x02; expected[6] = 0x00; @@ -496,7 +496,7 @@ test_encdec_uint32_t(void) out = 0; if (H5FD__mirror_xmit_encode_uint32((buf + 4), v) != 4) TEST_ERROR; - if (HDmemcmp(buf, expected, 8) != 0) { + if (memcmp(buf, expected, 8) != 0) { PRINT_BUFFER_DIFF(buf, expected, 8); TEST_ERROR; } @@ -524,8 +524,8 @@ test_encdec_uint64_t(void) TESTING("Mirror encode/decode of uint64_t data"); /* Start of buffer uint64_t */ - HDmemset(buf, 0, 16); - HDmemset(expected, 0, 16); + memset(buf, 0, 16); + memset(expected, 0, 16); expected[0] = 0x90; expected[1] = 0xDC; expected[2] = 0xBE; @@ -537,7 +537,7 @@ test_encdec_uint64_t(void) out = 0; if (H5FD__mirror_xmit_encode_uint64(buf, v) != 8) TEST_ERROR; - if (HDmemcmp(buf, expected, 16) != 0) { + if (memcmp(buf, expected, 16) != 0) { PRINT_BUFFER_DIFF(buf, expected, 16); TEST_ERROR; } @@ -547,8 +547,8 @@ test_encdec_uint64_t(void) TEST_ERROR; /* Middle of buffer uint64_t */ - HDmemset(buf, 0, 16); - HDmemset(expected, 0, 16); + memset(buf, 0, 16); + memset(expected, 0, 16); expected[3] = 0x90; expected[4] = 0xDC; expected[5] = 0xBE; @@ -560,7 +560,7 @@ test_encdec_uint64_t(void) out = 0; if (H5FD__mirror_xmit_encode_uint64((buf + 3), v) != 8) TEST_ERROR; - if (HDmemcmp(buf, expected, 16) != 0) { + if (memcmp(buf, expected, 16) != 0) { PRINT_BUFFER_DIFF(buf, expected, 16); TEST_ERROR; } @@ -575,8 +575,8 @@ test_encdec_uint64_t(void) TEST_ERROR; /* End of buffer uint64_t */ - HDmemset(buf, 0, 16); - HDmemset(expected, 0, 16); + memset(buf, 0, 16); + memset(expected, 0, 16); expected[8] = 0x90; expected[9] = 0xDC; expected[10] = 0xBE; @@ -588,7 +588,7 @@ test_encdec_uint64_t(void) out = 0; if (H5FD__mirror_xmit_encode_uint64((buf + 8), v) != 8) TEST_ERROR; - if (HDmemcmp(buf, expected, 16) != 0) { + if (memcmp(buf, expected, 16) != 0) { PRINT_BUFFER_DIFF(buf, expected, 16); TEST_ERROR; } @@ -628,7 +628,7 @@ test_encdec_header(H5FD_mirror_xmit_t xmit_mock) FAIL_PUTS_ERROR("Header size definition does not match test\n"); /* Populate the expected buffer; expect end padding of 0xFF */ - HDmemset(expected, 0xFF, H5FD_MIRROR_XMIT_HEADER_SIZE + 8); + memset(expected, 0xFF, H5FD_MIRROR_XMIT_HEADER_SIZE + 8); for (i = 0; i < H5FD_MIRROR_XMIT_HEADER_SIZE; i++) { expected[i + 2] = (unsigned char)i; } @@ -636,10 +636,10 @@ test_encdec_header(H5FD_mirror_xmit_t xmit_mock) /* Encode, and compare buffer contents * Initial buffer is filled with 0xFF to match expected padding */ - HDmemset(buf, 0xFF, H5FD_MIRROR_XMIT_HEADER_SIZE + 8); + memset(buf, 0xFF, H5FD_MIRROR_XMIT_HEADER_SIZE + 8); if (H5FD_mirror_xmit_encode_header((buf + 2), &xmit_mock) != H5FD_MIRROR_XMIT_HEADER_SIZE) TEST_ERROR; - if (HDmemcmp(buf, expected, H5FD_MIRROR_XMIT_HEADER_SIZE + 8) != 0) { + if (memcmp(buf, expected, H5FD_MIRROR_XMIT_HEADER_SIZE + 8) != 0) { PRINT_BUFFER_DIFF(buf, expected, H5FD_MIRROR_XMIT_HEADER_SIZE + 8); TEST_ERROR; } @@ -704,7 +704,7 @@ test_encdec_set_eoa(H5FD_mirror_xmit_t xmit_mock) FAIL_PUTS_ERROR("shared header structure is not in expected state"); /* Populate the expected buffer; expect end padding of 0xFF */ - HDmemset(expected, 0xFF, H5FD_MIRROR_XMIT_EOA_SIZE + 8); + memset(expected, 0xFF, H5FD_MIRROR_XMIT_EOA_SIZE + 8); for (i = 0; i < H5FD_MIRROR_XMIT_EOA_SIZE; i++) expected[i + 2] = (unsigned char)i; @@ -716,10 +716,10 @@ test_encdec_set_eoa(H5FD_mirror_xmit_t xmit_mock) /* Encode, and compare buffer contents * Initial buffer is filled with 0xFF to match expected padding */ - HDmemset(buf, 0xFF, H5FD_MIRROR_XMIT_EOA_SIZE + 8); + memset(buf, 0xFF, H5FD_MIRROR_XMIT_EOA_SIZE + 8); if (H5FD_mirror_xmit_encode_set_eoa((buf + 2), &xmit_in) != H5FD_MIRROR_XMIT_EOA_SIZE) TEST_ERROR; - if (HDmemcmp(buf, expected, H5FD_MIRROR_XMIT_EOA_SIZE + 8) != 0) { + if (memcmp(buf, expected, H5FD_MIRROR_XMIT_EOA_SIZE + 8) != 0) { PRINT_BUFFER_DIFF(buf, expected, H5FD_MIRROR_XMIT_EOA_SIZE + 8); TEST_ERROR; } @@ -792,7 +792,7 @@ test_encdec_lock(H5FD_mirror_xmit_t xmit_mock) FAIL_PUTS_ERROR("shared header structure is not in expected state"); /* Populate the expected buffer; expect end padding of 0xFF */ - HDmemset(expected, 0xFF, H5FD_MIRROR_XMIT_LOCK_SIZE + 8); + memset(expected, 0xFF, H5FD_MIRROR_XMIT_LOCK_SIZE + 8); for (i = 0; i < H5FD_MIRROR_XMIT_LOCK_SIZE; i++) expected[i + 2] = (unsigned char)i; @@ -803,10 +803,10 @@ test_encdec_lock(H5FD_mirror_xmit_t xmit_mock) /* Encode, and compare buffer contents * Initial buffer is filled with 0xFF to match expected padding */ - HDmemset(buf, 0xFF, H5FD_MIRROR_XMIT_LOCK_SIZE + 8); + memset(buf, 0xFF, H5FD_MIRROR_XMIT_LOCK_SIZE + 8); if (H5FD_mirror_xmit_encode_lock((buf + 2), &xmit_in) != H5FD_MIRROR_XMIT_LOCK_SIZE) TEST_ERROR; - if (HDmemcmp(buf, expected, H5FD_MIRROR_XMIT_LOCK_SIZE + 8) != 0) { + if (memcmp(buf, expected, H5FD_MIRROR_XMIT_LOCK_SIZE + 8) != 0) { PRINT_BUFFER_DIFF(buf, expected, H5FD_MIRROR_XMIT_LOCK_SIZE + 8); TEST_ERROR; } @@ -887,7 +887,7 @@ test_encdec_open(H5FD_mirror_xmit_t xmit_mock) FAIL_PUTS_ERROR("Unable to allocate memory for xmit_out"); /* Populate the expected buffer; expect end padding of 0xFF */ - HDmemset(expected, 0xFF, H5FD_MIRROR_XMIT_OPEN_SIZE + 8); + memset(expected, 0xFF, H5FD_MIRROR_XMIT_OPEN_SIZE + 8); for (size_t i = 0; i < H5FD_MIRROR_XMIT_OPEN_SIZE; i++) { /* 0x100 is "zero" in a byte, so encode will treat it as a NULL- * terminator in the filepath string. Expect all zeroes following. @@ -909,10 +909,10 @@ test_encdec_open(H5FD_mirror_xmit_t xmit_mock) /* Encode, and compare buffer contents * Initial buffer is filled with 0xFF to match expected padding */ - HDmemset(buf, 0xFF, H5FD_MIRROR_XMIT_OPEN_SIZE + 8); + memset(buf, 0xFF, H5FD_MIRROR_XMIT_OPEN_SIZE + 8); if (H5FD_mirror_xmit_encode_open((buf + 2), xmit_in) != H5FD_MIRROR_XMIT_OPEN_SIZE) TEST_ERROR; - if (HDmemcmp(buf, expected, H5FD_MIRROR_XMIT_OPEN_SIZE + 8) != 0) { + if (memcmp(buf, expected, H5FD_MIRROR_XMIT_OPEN_SIZE + 8) != 0) { PRINT_BUFFER_DIFF(buf, expected, H5FD_MIRROR_XMIT_OPEN_SIZE + 8); TEST_ERROR; } @@ -1013,7 +1013,7 @@ test_encdec_reply(H5FD_mirror_xmit_t xmit_mock) FAIL_PUTS_ERROR("shared header structure is not in expected state"); /* Populate the expected buffer; expect end padding of 0xFF */ - HDmemset(expected, 0xFF, H5FD_MIRROR_XMIT_REPLY_SIZE + 8); + memset(expected, 0xFF, H5FD_MIRROR_XMIT_REPLY_SIZE + 8); for (i = 0; i < H5FD_MIRROR_XMIT_REPLY_SIZE; i++) { /* 0x100 is "zero" in a byte, so encode will treat it as a NULL- * terminator in the filepath string. Expect all zeroes following. @@ -1033,10 +1033,10 @@ test_encdec_reply(H5FD_mirror_xmit_t xmit_mock) /* Encode, and compare buffer contents * Initial buffer is filled with 0xFF to match expected padding */ - HDmemset(buf, 0xFF, H5FD_MIRROR_XMIT_REPLY_SIZE + 8); + memset(buf, 0xFF, H5FD_MIRROR_XMIT_REPLY_SIZE + 8); if (H5FD_mirror_xmit_encode_reply((buf + 2), &xmit_in) != H5FD_MIRROR_XMIT_REPLY_SIZE) TEST_ERROR; - if (HDmemcmp(buf, expected, H5FD_MIRROR_XMIT_REPLY_SIZE + 8) != 0) { + if (memcmp(buf, expected, H5FD_MIRROR_XMIT_REPLY_SIZE + 8) != 0) { PRINT_BUFFER_DIFF(buf, expected, H5FD_MIRROR_XMIT_REPLY_SIZE + 8); TEST_ERROR; } @@ -1116,7 +1116,7 @@ test_encdec_write(H5FD_mirror_xmit_t xmit_mock) FAIL_PUTS_ERROR("shared header structure is not in expected state"); /* Populate the expected buffer; expect end padding of 0xFF */ - HDmemset(expected, 0xFF, H5FD_MIRROR_XMIT_WRITE_SIZE + 8); + memset(expected, 0xFF, H5FD_MIRROR_XMIT_WRITE_SIZE + 8); for (i = 0; i < H5FD_MIRROR_XMIT_WRITE_SIZE; i++) expected[i + 2] = (unsigned char)i; @@ -1129,10 +1129,10 @@ test_encdec_write(H5FD_mirror_xmit_t xmit_mock) /* Encode, and compare buffer contents * Initial buffer is filled with 0xFF to match expected padding */ - HDmemset(buf, 0xFF, H5FD_MIRROR_XMIT_WRITE_SIZE + 8); + memset(buf, 0xFF, H5FD_MIRROR_XMIT_WRITE_SIZE + 8); if (H5FD_mirror_xmit_encode_write((buf + 2), &xmit_in) != H5FD_MIRROR_XMIT_WRITE_SIZE) TEST_ERROR; - if (HDmemcmp(buf, expected, H5FD_MIRROR_XMIT_WRITE_SIZE + 8) != 0) { + if (memcmp(buf, expected, H5FD_MIRROR_XMIT_WRITE_SIZE + 8) != 0) { PRINT_BUFFER_DIFF(buf, expected, H5FD_MIRROR_XMIT_WRITE_SIZE + 8); TEST_ERROR; } @@ -2341,7 +2341,7 @@ confirm_server(struct mt_opts *opts) target_addr.sin_family = AF_INET; target_addr.sin_port = htons((uint16_t)opts->portno); target_addr.sin_addr.s_addr = inet_addr(opts->ip); - HDmemset(target_addr.sin_zero, '\0', sizeof(target_addr.sin_zero)); + memset(target_addr.sin_zero, '\0', sizeof(target_addr.sin_zero)); while (1) { if (connect(live_socket, (struct sockaddr *)&target_addr, (socklen_t)sizeof(target_addr)) < 0) { |