summaryrefslogtreecommitdiffstats
path: root/test/vfd_swmr.c
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2020-04-20 21:05:27 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2020-04-20 21:05:27 (GMT)
commitaee40b370d9d005f7d15cc3f4c2b4c78fc8a9ab8 (patch)
tree0d540370198cd5598afdfdca9daf005e8f4b6dd8 /test/vfd_swmr.c
parentfc36f531155510f397c96f8d5b6e3a69cbb8a341 (diff)
downloadhdf5-aee40b370d9d005f7d15cc3f4c2b4c78fc8a9ab8.zip
hdf5-aee40b370d9d005f7d15cc3f4c2b4c78fc8a9ab8.tar.gz
hdf5-aee40b370d9d005f7d15cc3f4c2b4c78fc8a9ab8.tar.bz2
Retire globals vfd_swmr_writer_g and end_of_tick_g.
Diffstat (limited to 'test/vfd_swmr.c')
-rw-r--r--test/vfd_swmr.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/test/vfd_swmr.c b/test/vfd_swmr.c
index 72d1581..02cb877 100644
--- a/test/vfd_swmr.c
+++ b/test/vfd_swmr.c
@@ -1832,7 +1832,7 @@ test_multiple_file_opens(void)
FAIL_STACK_ERROR
/* Verify the global vfd_swmr_writer_g is not set */
- if(vfd_swmr_writer_g)
+ if((curr = TAILQ_FIRST(&eot_queue_g)) != NULL && curr->vfd_swmr_writer)
TEST_ERROR;
/* The EOT queue should be empty */
if(!TAILQ_EMPTY(&eot_queue_g))
@@ -1846,8 +1846,8 @@ test_multiple_file_opens(void)
if(NULL == (f1 = (H5F_t *)H5VL_object(fid1)))
FAIL_STACK_ERROR
- /* The global vfd_swmr_writer_g should be set */
- if(!vfd_swmr_writer_g)
+ /* Head of EOT queue should be a writer */
+ if((curr = TAILQ_FIRST(&eot_queue_g)) == NULL || !curr->vfd_swmr_writer)
TEST_ERROR;
/* The EOT queue should be initialized with the first entry equals to f1 */
if((curr = TAILQ_FIRST(&eot_queue_g)) == NULL || curr->vfd_swmr_file != f1)
@@ -1861,8 +1861,8 @@ test_multiple_file_opens(void)
if(NULL == (f2 = (H5F_t *)H5VL_object(fid2)))
FAIL_STACK_ERROR
- /* The global vfd_swmr_writer_g should still be set */
- if(!vfd_swmr_writer_g)
+ /* Head of EOT queue should be a writer */
+ if((curr = TAILQ_FIRST(&eot_queue_g)) == NULL || !curr->vfd_swmr_writer)
TEST_ERROR;
/* The EOT queue's first entry should be f1 */
if((curr = TAILQ_FIRST(&eot_queue_g)) == NULL || curr->vfd_swmr_file != f1)
@@ -1878,8 +1878,8 @@ test_multiple_file_opens(void)
if(H5Fclose(fid1) < 0)
FAIL_STACK_ERROR;
- /* The global vfd_swmr_writer_g should still be set */
- if(!vfd_swmr_writer_g)
+ /* Head of EOT queue should be a writer */
+ if((curr = TAILQ_FIRST(&eot_queue_g)) == NULL || !curr->vfd_swmr_writer)
TEST_ERROR;
/* The EOT queue's first entry should be f2 */
if((curr = TAILQ_FIRST(&eot_queue_g)) == NULL || curr->vfd_swmr_file != f2)
@@ -2146,8 +2146,8 @@ test_multiple_concur_file_opens(void)
if(NULL == (f1 = (H5F_t *)H5VL_object(fid1)))
FAIL_STACK_ERROR
- /* The global vfd_swmr_writer_g should be set */
- if(!vfd_swmr_writer_g)
+ /* Head of EOT queue should be a writer */
+ if((curr = TAILQ_FIRST(&eot_queue_g)) == NULL || !curr->vfd_swmr_writer)
TEST_ERROR;
/* The EOT queue's first entry should be f1 */
@@ -2202,8 +2202,8 @@ test_multiple_concur_file_opens(void)
if(NULL == (f2 = (H5F_t *)H5VL_object(fid2)))
FAIL_STACK_ERROR
- /* The global vfd_swmr_writer_g should not be set */
- if(vfd_swmr_writer_g)
+ /* Head of EOT queue should NOT be a writer */
+ if((curr = TAILQ_FIRST(&eot_queue_g)) != NULL && curr->vfd_swmr_writer)
TEST_ERROR;
/* The EOT queue's first entry should be f2 */