file_id = H5Fopen(hdf_file_name, H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE, fapl_id);
 
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * Copyright by The HDF Group.                                               *
 * Copyright by the Board of Trustees of the University of Illinois.         *
 * All rights reserved.                                                      *
 *                                                                           *
 * This file is part of HDF5.  The full HDF5 copyright notice, including     *
 * terms governing use, modification, and redistribution, is contained in    *
 * the COPYING file, which can be found at the root of the source code       *
 * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.  *
 * If you do not have access to either file, you may request a copy from     *
 * help@hdfgroup.org.                                                        *
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Programmer:  John Mainzer
 *              7/13/15
 *
 *              This file contains tests specific to the cache image 
 *      feature implemented in H5C.c
 */
#include "cache_common.h"
#include "genall5.h"
/* global variable declarations: */
const char *FILENAMES[] = {
        "cache_image_test",
        NULL
};
/* local utility function declarations */
static void create_datasets(hid_t file_id, int min_dset, int max_dset);
static void delete_datasets(hid_t file_id, int min_dset, int max_dset);
static void open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected,
    hbool_t read_only, hbool_t set_mdci_fapl, hbool_t config_fsm,
    hbool_t set_eoc, const char *hdf_file_name, unsigned cache_image_flags, 
    hid_t *file_id_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr);
static void attempt_swmr_open_hdf5_file(hbool_t create_file,
    hbool_t set_mdci_fapl, const char *hdf_file_name);
static void verify_datasets(hid_t file_id, int min_dset, int max_dset);
/* local test function declarations */
static unsigned check_cache_image_ctl_flow_1(void);
static unsigned check_cache_image_ctl_flow_2(void);
static unsigned check_cache_image_ctl_flow_3(void);
static unsigned check_cache_image_ctl_flow_4(void);
static unsigned check_cache_image_ctl_flow_5(void);
static unsigned check_cache_image_ctl_flow_6(void);
static unsigned cache_image_smoke_check_1(void);
static unsigned cache_image_smoke_check_2(void);