summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/H5Fvfd_swmr.c8
-rw-r--r--src/H5PB.c2
-rw-r--r--src/H5private.h2
-rw-r--r--test/vfd_swmr.c29
-rw-r--r--test/vfd_swmr_group_writer.c4
5 files changed, 20 insertions, 25 deletions
diff --git a/src/H5Fvfd_swmr.c b/src/H5Fvfd_swmr.c
index 6a20350..cd9f45f 100644
--- a/src/H5Fvfd_swmr.c
+++ b/src/H5Fvfd_swmr.c
@@ -1241,9 +1241,11 @@ H5F_vfd_swmr_reader_end_of_tick(H5F_t *f, bool entering_api)
assert(old_mdf_idx[i].length == new_mdf_idx[j].length);
hlog_fast(shadow_index_update,
- "writer moved shadow at slot %" PRIu32
- " for page %" PRIu64, i,
- old_mdf_idx[i].hdf5_page_offset);
+ "shadow page for slot %" PRIu32 " lower page %" PRIu64
+ " moved, %" PRIu64 " -> %" PRIu64, i,
+ old_mdf_idx[i].hdf5_page_offset,
+ old_mdf_idx[i].md_file_page_offset,
+ new_mdf_idx[j].md_file_page_offset);
/* the page has been altered -- evict it and
* any contained metadata cache entries.
diff --git a/src/H5PB.c b/src/H5PB.c
index 7d0b18c..a9028d7 100644
--- a/src/H5PB.c
+++ b/src/H5PB.c
@@ -2479,7 +2479,7 @@ H5PB_write(H5F_shared_t *shared, H5FD_mem_t type, haddr_t addr, size_t size,
FUNC_ENTER_NOAPI(FAIL)
- hlog_fast(pbwr, "%s %p type %d %" PRIuHADDR " size %zu",
+ hlog_fast(pbwr, "%s %p type %d addr %" PRIuHADDR " size %zu",
__func__, (void *)shared, type, addr, size);
pb_ptr = shared->pb_ptr;
diff --git a/src/H5private.h b/src/H5private.h
index ae66485..b1d88c1 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -2171,7 +2171,7 @@ H5_DLL herr_t H5CX_pop(void);
else if (TAILQ_EMPTY(&eot_queue_g)) \
; /* Nothing to do. */ \
else if (H5F_vfd_swmr_process_eot_queue(true) < 0) { \
- HDONE_ERROR(H5E_FUNC, H5E_CANTSET, err, \
+ HGOTO_ERROR(H5E_FUNC, H5E_CANTSET, err, \
"error processing EOT queue") \
} \
} while (0)
diff --git a/test/vfd_swmr.c b/test/vfd_swmr.c
index 4f8151c..5f97a8c 100644
--- a/test/vfd_swmr.c
+++ b/test/vfd_swmr.c
@@ -84,9 +84,9 @@ test_fapl(void)
TESTING("Configure VFD SWMR with fapl");
/* Allocate memory for the configuration structure */
- if((my_config = (H5F_vfd_swmr_config_t *)HDmalloc(sizeof(H5F_vfd_swmr_config_t))) == NULL)
+ if((my_config = HDmalloc(sizeof(*my_config))) == NULL)
FAIL_STACK_ERROR;
- HDmemset(my_config, 0, sizeof(H5F_vfd_swmr_config_t));
+ HDmemset(my_config, 0, sizeof(*my_config));
/* Get a copy of the file access property list */
if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
@@ -932,7 +932,7 @@ test_writer_md(void)
TEST_ERROR
/* Allocate memory for the read/write buffer */
- if((rwbuf = (int *)HDmalloc(sizeof(int) * (50 * 20))) == NULL)
+ if((rwbuf = HDmalloc(sizeof(*rwbuf) * (50 * 20))) == NULL)
FAIL_STACK_ERROR;
for(i = 0; i < (50 * 20); i++)
rwbuf[i] = (int)i;
@@ -1114,8 +1114,7 @@ test_reader_md_concur(void)
TESTING("Verify the metadata file for VFD SWMR reader");
/* Allocate memory for the configuration structure */
- if((config_writer = (H5F_vfd_swmr_config_t *)
- HDmalloc(sizeof(H5F_vfd_swmr_config_t))) == NULL)
+ if((config_writer = HDmalloc(sizeof(*config_writer))) == NULL)
FAIL_STACK_ERROR;
HDmemset(config_writer, 0, sizeof(H5F_vfd_swmr_config_t));
@@ -1202,8 +1201,7 @@ test_reader_md_concur(void)
}
/* Allocate memory for the configuration structure */
- if((config_reader = (H5F_vfd_swmr_config_t *)
- HDmalloc(sizeof(H5F_vfd_swmr_config_t))) == NULL)
+ if((config_reader = HDmalloc(sizeof(*config_reader))) == NULL)
HDexit(EXIT_FAILURE);
HDmemset(config_reader, 0, sizeof(H5F_vfd_swmr_config_t));
@@ -1539,7 +1537,7 @@ test_reader_md_concur(void)
}
/* Allocate memory for the read/write buffer */
- if((rwbuf = (int *)HDmalloc(sizeof(int) * (50 * 20))) == NULL)
+ if((rwbuf = HDmalloc(sizeof(*rwbuf) * (50 * 20))) == NULL)
FAIL_STACK_ERROR;
for(i = 0; i < (50 * 20); i++)
rwbuf[i] = (int)i;
@@ -1769,9 +1767,9 @@ test_multiple_file_opens(void)
TESTING("EOT queue entries when opening files with/without VFD SWMR");
/* Allocate memory for the configuration structure */
- if((config1 = (H5F_vfd_swmr_config_t *)HDmalloc(sizeof(H5F_vfd_swmr_config_t))) == NULL)
+ if((config1 = HDmalloc(sizeof(*config1))) == NULL)
FAIL_STACK_ERROR;
- if((config2 = (H5F_vfd_swmr_config_t *)HDmalloc(sizeof(H5F_vfd_swmr_config_t))) == NULL)
+ if((config2 = HDmalloc(sizeof(*config2))) == NULL)
FAIL_STACK_ERROR;
HDmemset(config1, 0, sizeof(H5F_vfd_swmr_config_t));
HDmemset(config2, 0, sizeof(H5F_vfd_swmr_config_t));
@@ -2033,8 +2031,7 @@ test_multiple_concur_file_opens(void)
}
/* Allocate memory for VFD SMWR configuration */
- if((config_writer = (H5F_vfd_swmr_config_t *)
- HDmalloc(sizeof(H5F_vfd_swmr_config_t))) == NULL)
+ if((config_writer = HDmalloc(sizeof(*config_writer))) == NULL)
HDexit(EXIT_FAILURE);
HDmemset(config_writer, 0, sizeof(H5F_vfd_swmr_config_t));
@@ -2114,7 +2111,7 @@ test_multiple_concur_file_opens(void)
*/
/* Allocate memory for VFD SWMR configuration */
- if((config1 = (H5F_vfd_swmr_config_t *) HDmalloc(sizeof(H5F_vfd_swmr_config_t))) == NULL)
+ if((config1 = HDmalloc(sizeof(*config1))) == NULL)
FAIL_STACK_ERROR
HDmemset(config1, 0, sizeof(H5F_vfd_swmr_config_t));
@@ -2170,7 +2167,7 @@ test_multiple_concur_file_opens(void)
/* Open file B as VFD SWMR reader */
/* Allocate memory for VFD SWMR configuration */
- if((config2 = (H5F_vfd_swmr_config_t *) HDmalloc(sizeof(H5F_vfd_swmr_config_t))) == NULL)
+ if((config2 = HDmalloc(sizeof(*config2))) == NULL)
FAIL_STACK_ERROR
HDmemset(config2, 0, sizeof(H5F_vfd_swmr_config_t));
@@ -2335,9 +2332,9 @@ test_same_file_opens(void)
FAIL_STACK_ERROR;
/* Allocate memory for the configuration structure */
- if((config1 = (H5F_vfd_swmr_config_t *)HDmalloc(sizeof(H5F_vfd_swmr_config_t))) == NULL)
+ if((config1 = HDmalloc(sizeof(*config1))) == NULL)
FAIL_STACK_ERROR;
- if((config2 = (H5F_vfd_swmr_config_t *)HDmalloc(sizeof(H5F_vfd_swmr_config_t))) == NULL)
+ if((config2 = HDmalloc(sizeof(*config2))) == NULL)
FAIL_STACK_ERROR;
HDmemset(config1, 0, sizeof(H5F_vfd_swmr_config_t));
HDmemset(config2, 0, sizeof(H5F_vfd_swmr_config_t));
diff --git a/test/vfd_swmr_group_writer.c b/test/vfd_swmr_group_writer.c
index 9e36876..5c7cddf 100644
--- a/test/vfd_swmr_group_writer.c
+++ b/test/vfd_swmr_group_writer.c
@@ -30,14 +30,11 @@
#include "testhdf5.h"
#include "vfd_swmr_common.h"
-static const unsigned int hang_back = 3;
-
typedef struct {
hid_t file;
char filename[PATH_MAX];
char progname[PATH_MAX];
struct timespec update_interval;
- unsigned int asteps;
unsigned int nsteps;
bool wait_for_signal;
bool use_vfd_swmr;
@@ -79,7 +76,6 @@ state_init(state_t *s, int argc, char **argv)
{
unsigned long tmp;
int ch;
- const hsize_t dims = 1;
char tfile[PATH_MAX];
char *end;
unsigned long millis;