From 25bcb8e953772b21e46426655fb6a6f0f7edc1f5 Mon Sep 17 00:00:00 2001 From: Muqun Yang Date: Mon, 18 Oct 2021 18:20:56 -0500 Subject: Revise the H5Fopen log test. --- src/H5Fint.c | 6 +++--- src/H5Fvfd_swmr.c | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/H5Fint.c b/src/H5Fint.c index a50c38c..9c4a143 100644 --- a/src/H5Fint.c +++ b/src/H5Fint.c @@ -2225,6 +2225,9 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id) ret_value = file; done: +#if 1 /*KENT*/ + H5F_post_vfd_swrm_log_entry(file, 0, "File open ends"); +#endif if ((NULL == ret_value) && file) { if (file->shared->root_grp && file->shared->nrefs == 1) { if (H5AC_expunge_tag_type_metadata(file, H5G_oloc(file->shared->root_grp)->addr, H5AC_OHDR_ID, @@ -2235,9 +2238,6 @@ done: if (H5F__dest(file, FALSE) < 0) HDONE_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, NULL, "problems closing file") } -#if 1 /*KENT*/ - H5F_post_vfd_swrm_log_entry(file, 0, "File open ends"); -#endif if (vfd_swmr_config_ptr) H5MM_free(vfd_swmr_config_ptr); diff --git a/src/H5Fvfd_swmr.c b/src/H5Fvfd_swmr.c index c938014..77f5019 100644 --- a/src/H5Fvfd_swmr.c +++ b/src/H5Fvfd_swmr.c @@ -1923,6 +1923,8 @@ H5F_post_vfd_swrm_log_entry(H5F_t *f, int entry_type_code, char *body) FUNC_ENTER_NOAPI(FAIL) if (f==NULL) HGOTO_DONE(TRUE) + else if(f->shared==NULL) + HGOTO_DONE(TRUE) if (f->shared->vfd_swmr_log_on == false) HGOTO_DONE(TRUE) if (HDclock_gettime(CLOCK_MONOTONIC, ¤t_time) < 0) -- cgit v0.12