diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/CMakeLists.txt | 8 | ||||
-rw-r--r-- | test/big.c | 16 | ||||
-rw-r--r-- | test/btree2.c | 2 | ||||
-rw-r--r-- | test/cache_api.c | 140 | ||||
-rw-r--r-- | test/cache_tagging.c | 3 | ||||
-rw-r--r-- | test/dsets.c | 2 | ||||
-rw-r--r-- | test/dtypes.c | 4 | ||||
-rw-r--r-- | test/file_image.c | 97 | ||||
-rw-r--r-- | test/fillval.c | 2 | ||||
-rw-r--r-- | test/lheap.c | 101 | ||||
-rw-r--r-- | test/links.c | 22 | ||||
-rw-r--r-- | test/mf.c | 4 | ||||
-rw-r--r-- | test/objcopy.c | 2 | ||||
-rw-r--r-- | test/ohdr.c | 2 | ||||
-rw-r--r-- | test/plugin.c | 2 | ||||
-rw-r--r-- | test/set_extent.c | 4 | ||||
-rw-r--r-- | test/stab.c | 2 | ||||
-rw-r--r-- | test/tattr.c | 18 | ||||
-rw-r--r-- | test/tfile.c | 6 | ||||
-rw-r--r-- | test/th5o.c | 3 | ||||
-rw-r--r-- | test/titerate.c | 2 | ||||
-rw-r--r-- | test/tmisc.c | 2 | ||||
-rw-r--r-- | test/unlink.c | 2 | ||||
-rw-r--r-- | test/vds.c | 6 |
24 files changed, 210 insertions, 242 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index f9832f3..d2dd282 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -209,11 +209,7 @@ set (H5_TESTS ohdr stab gheap - #cache - #cache_api - #cache_tagging pool - #hyperslab istore bittests dt_arith @@ -236,7 +232,6 @@ set (H5_TESTS app_ref enum set_extent - #ttsafe getname vfd ntypes @@ -251,11 +246,8 @@ set (H5_TESTS earray btree2 fheap - #error_test - #err_compat tcheck_version testmeta - #links_env file_image enc_dec_plist enc_dec_plist_cross_platform @@ -73,10 +73,10 @@ /* Define Small, Large, Extra Large, Huge File which * corrspond to less than 2GB, 2GB, 4GB, and tens of GB file size. - * NOFILE stands for "no file" to be tested. + * NO_FILE stands for "no file" to be tested. */ -typedef enum fsizes_t { SFILE, LFILE, XLFILE, HUGEFILE, NOFILE} fsizes_t; -fsizes_t file_size= NOFILE; +typedef enum fsizes_t { SFILE, LFILE, XLFILE, HUGEFILE, NO_FILE} fsizes_t; +fsizes_t file_size= NO_FILE; const char *FILENAME[] = { "big", @@ -210,7 +210,7 @@ static fsizes_t supports_big(void) { int fd = -1; - fsizes_t fsize = NOFILE; + fsizes_t fsize = NO_FILE; if((fd=HDopen("y.h5", O_RDWR|O_TRUNC|O_CREAT, 0666)) < 0) goto error; @@ -377,9 +377,9 @@ writer (char* filename, hid_t fapl, fsizes_t testsize, int wrt_n) size2[0] /= 32; break; - case NOFILE: + case NO_FILE: /* what to do?? */ - HDfprintf(stdout, "Unexpected file size of NOFILE\n"); + HDfprintf(stdout, "Unexpected file size of NO_FILE\n"); goto error; break; @@ -599,7 +599,7 @@ test_sec2(hid_t fapl) fsizes_t testsize; testsize = supports_big(); - if(testsize == NOFILE) { + if(testsize == NO_FILE) { HDfprintf(stdout, "Test for sec2 is skipped because file system does not support big files.\n"); goto quit; } @@ -634,7 +634,7 @@ test_stdio(hid_t fapl) fsizes_t testsize; testsize = supports_big(); - if(testsize == NOFILE) { + if(testsize == NO_FILE) { HDfprintf(stdout, "Test for stdio is skipped because file system does not support big files.\n"); goto quit; } diff --git a/test/btree2.c b/test/btree2.c index caad849..8f84135 100644 --- a/test/btree2.c +++ b/test/btree2.c @@ -7625,7 +7625,7 @@ main(void) bt2_test_param_t tparam; /* Test parameters for v2 B-tree */ hid_t fapl = -1; /* File access property list for data files */ unsigned nerrors = 0; /* Cumulative error count */ - hbool_t reopen; /* Whether to reopen B-tree during tests */ + unsigned reopen; /* Whether to reopen B-tree during tests */ int ExpressMode; const char *envval = NULL; diff --git a/test/cache_api.c b/test/cache_api.c index 1697884..bebb828 100644 --- a/test/cache_api.c +++ b/test/cache_api.c @@ -1530,7 +1530,7 @@ mdc_api_call_smoke_check(int express_test) * Note: It is assumed that boolean parameters are only set to TRUE/FALSE. */ -#define NUM_INVALID_CONFIGS 42 +#define NUM_INVALID_CONFIGS 36 H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = { @@ -1605,42 +1605,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = H5AC__DEFAULT_METADATA_WRITE_STRATEGY }, { - /* 2 -- bad set_initial_size */ - /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER, - /* hbool_t rpt_fcn_enabled = */ FALSE, - /* hbool_t open_trace_file = */ FALSE, - /* hbool_t close_trace_file = */ FALSE, - /* char trace_file_name[] = */ "", - /* hbool_t evictions_enabled = */ TRUE, - /* hbool_t set_initial_size = */ 2, - /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.25f, - /* size_t max_size = */ (16 * 1024 * 1024), - /* size_t min_size = */ ( 1 * 1024 * 1024), - /* long int epoch_length = */ 50000, - /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, - /* double lower_hr_threshold = */ 0.9f, - /* double increment = */ 2.0f, - /* hbool_t apply_max_increment = */ TRUE, - /* size_t max_increment = */ (4 * 1024 * 1024), - /* enum H5C_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C_flash_incr__off, - /* double flash_multiple = */ 2.0f, - /* double flash_threshold = */ 0.5f, - /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, - /* double upper_hr_threshold = */ 0.999f, - /* double decrement = */ 0.9f, - /* hbool_t apply_max_decrement = */ TRUE, - /* size_t max_decrement = */ (1 * 1024 * 1024), - /* int epochs_before_eviction = */ 3, - /* hbool_t apply_empty_reserve = */ TRUE, - /* double empty_reserve = */ 0.1f, - /* int dirty_bytes_threshold = */ (256 * 1024), - /* int metadata_write_strategy = */ - H5AC__DEFAULT_METADATA_WRITE_STRATEGY - }, - { - /* 3 -- max_size too big */ + /* 2 -- max_size too big */ /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER, /* hbool_t rpt_fcn_enabled = */ FALSE, /* hbool_t open_trace_file = */ FALSE, @@ -1675,7 +1640,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = H5AC__DEFAULT_METADATA_WRITE_STRATEGY }, { - /* 4 -- min_size too small */ + /* 3 -- min_size too small */ /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER, /* hbool_t rpt_fcn_enabled = */ FALSE, /* hbool_t open_trace_file = */ FALSE, @@ -1710,7 +1675,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = H5AC__DEFAULT_METADATA_WRITE_STRATEGY }, { - /* 5 -- min_size > max_size */ + /* 4 -- min_size > max_size */ /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER, /* hbool_t rpt_fcn_enabled = */ FALSE, /* hbool_t open_trace_file = */ FALSE, @@ -1745,7 +1710,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = H5AC__DEFAULT_METADATA_WRITE_STRATEGY }, { - /* 6 -- initial size out of range (too big) */ + /* 5 -- initial size out of range (too big) */ /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER, /* hbool_t rpt_fcn_enabled = */ FALSE, /* hbool_t open_trace_file = */ FALSE, @@ -1780,7 +1745,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = H5AC__DEFAULT_METADATA_WRITE_STRATEGY }, { - /* 7 -- initial_size out of range (too small) */ + /* 6 -- initial_size out of range (too small) */ /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER, /* hbool_t rpt_fcn_enabled = */ FALSE, /* hbool_t open_trace_file = */ FALSE, @@ -1815,7 +1780,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = H5AC__DEFAULT_METADATA_WRITE_STRATEGY }, { - /* 8 -- min_clean_fraction too big */ + /* 7 -- min_clean_fraction too big */ /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER, /* hbool_t rpt_fcn_enabled = */ FALSE, /* hbool_t open_trace_file = */ FALSE, @@ -1850,7 +1815,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = H5AC__DEFAULT_METADATA_WRITE_STRATEGY }, { - /* 9 -- min_clean_fraction too small */ + /* 8 -- min_clean_fraction too small */ /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER, /* hbool_t rpt_fcn_enabled = */ FALSE, /* hbool_t open_trace_file = */ FALSE, @@ -1885,7 +1850,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = H5AC__DEFAULT_METADATA_WRITE_STRATEGY }, { - /* 10 -- epoch_length too small */ + /* 9 -- epoch_length too small */ /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER, /* hbool_t rpt_fcn_enabled = */ FALSE, /* hbool_t open_trace_file = */ FALSE, @@ -1920,7 +1885,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = H5AC__DEFAULT_METADATA_WRITE_STRATEGY }, { - /* 11 -- epoch_length too big */ + /* 10 -- epoch_length too big */ /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER, /* hbool_t rpt_fcn_enabled = */ FALSE, /* hbool_t open_trace_file = */ FALSE, @@ -1955,7 +1920,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = H5AC__DEFAULT_METADATA_WRITE_STRATEGY }, { - /* 12 -- invalid incr_mode */ + /* 11 -- invalid incr_mode */ /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER, /* hbool_t rpt_fcn_enabled = */ FALSE, /* hbool_t open_trace_file = */ FALSE, @@ -1990,7 +1955,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = H5AC__DEFAULT_METADATA_WRITE_STRATEGY }, { - /* 13 -- lower_hr_threshold too small */ + /* 12 -- lower_hr_threshold too small */ /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER, /* hbool_t rpt_fcn_enabled = */ FALSE, /* hbool_t open_trace_file = */ FALSE, @@ -2025,7 +1990,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = H5AC__DEFAULT_METADATA_WRITE_STRATEGY }, { - /* 14 -- lower_hr_threshold too big */ + /* 13 -- lower_hr_threshold too big */ /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER, /* hbool_t rpt_fcn_enabled = */ FALSE, /* hbool_t open_trace_file = */ FALSE, @@ -2060,7 +2025,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = H5AC__DEFAULT_METADATA_WRITE_STRATEGY }, { - /* 15 -- increment too small */ + /* 14 -- increment too small */ /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER, /* hbool_t rpt_fcn_enabled = */ FALSE, /* hbool_t open_trace_file = */ FALSE, @@ -2095,7 +2060,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = H5AC__DEFAULT_METADATA_WRITE_STRATEGY }, { - /* 16 -- invalid flash_incr_mode */ + /* 15 -- invalid flash_incr_mode */ /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER, /* hbool_t rpt_fcn_enabled = */ FALSE, /* hbool_t open_trace_file = */ FALSE, @@ -2130,7 +2095,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = H5AC__DEFAULT_METADATA_WRITE_STRATEGY }, { - /* 17 -- flash_multiple too small */ + /* 16 -- flash_multiple too small */ /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER, /* hbool_t rpt_fcn_enabled = */ FALSE, /* hbool_t open_trace_file = */ FALSE, @@ -2165,7 +2130,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = H5AC__DEFAULT_METADATA_WRITE_STRATEGY }, { - /* 18 -- flash_multiple too big */ + /* 17 -- flash_multiple too big */ /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER, /* hbool_t rpt_fcn_enabled = */ FALSE, /* hbool_t open_trace_file = */ FALSE, @@ -2200,7 +2165,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = H5AC__DEFAULT_METADATA_WRITE_STRATEGY }, { - /* 19 -- flash_threshold too small */ + /* 18 -- flash_threshold too small */ /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER, /* hbool_t rpt_fcn_enabled = */ FALSE, /* hbool_t open_trace_file = */ FALSE, @@ -2235,7 +2200,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = H5AC__DEFAULT_METADATA_WRITE_STRATEGY }, { - /* 20 -- flash_threshold too big */ + /* 19 -- flash_threshold too big */ /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER, /* hbool_t rpt_fcn_enabled = */ FALSE, /* hbool_t open_trace_file = */ FALSE, @@ -2270,7 +2235,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = H5AC__DEFAULT_METADATA_WRITE_STRATEGY }, { - /* 21 -- bad decr_mode */ + /* 20 -- bad decr_mode */ /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER, /* hbool_t rpt_fcn_enabled = */ FALSE, /* hbool_t open_trace_file = */ FALSE, @@ -2305,7 +2270,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = H5AC__DEFAULT_METADATA_WRITE_STRATEGY }, { - /* 22 -- upper_hr_threshold too big */ + /* 21 -- upper_hr_threshold too big */ /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER, /* hbool_t rpt_fcn_enabled = */ FALSE, /* hbool_t open_trace_file = */ FALSE, @@ -2340,7 +2305,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = H5AC__DEFAULT_METADATA_WRITE_STRATEGY }, { - /* 23 -- decrement too small */ + /* 22 -- decrement too small */ /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER, /* hbool_t rpt_fcn_enabled = */ FALSE, /* hbool_t open_trace_file = */ FALSE, @@ -2375,7 +2340,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = H5AC__DEFAULT_METADATA_WRITE_STRATEGY }, { - /* 24 -- decrement too big */ + /* 23 -- decrement too big */ /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER, /* hbool_t rpt_fcn_enabled = */ FALSE, /* hbool_t open_trace_file = */ FALSE, @@ -2410,7 +2375,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = H5AC__DEFAULT_METADATA_WRITE_STRATEGY }, { - /* 25 -- epochs_before_eviction too small */ + /* 24 -- epochs_before_eviction too small */ /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER, /* hbool_t rpt_fcn_enabled = */ FALSE, /* hbool_t open_trace_file = */ FALSE, @@ -2445,7 +2410,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = H5AC__DEFAULT_METADATA_WRITE_STRATEGY }, { - /* 26 -- epochs_before_eviction too big */ + /* 25 -- epochs_before_eviction too big */ /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER, /* hbool_t rpt_fcn_enabled = */ FALSE, /* hbool_t open_trace_file = */ FALSE, @@ -2480,42 +2445,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = H5AC__DEFAULT_METADATA_WRITE_STRATEGY }, { - /* 27 -- invalid apply_empty_reserve */ - /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER, - /* hbool_t rpt_fcn_enabled = */ FALSE, - /* hbool_t open_trace_file = */ FALSE, - /* hbool_t close_trace_file = */ FALSE, - /* char trace_file_name[] = */ "", - /* hbool_t evictions_enabled = */ TRUE, - /* hbool_t set_initial_size = */ TRUE, - /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.25f, - /* size_t max_size = */ (16 * 1024 * 1024), - /* size_t min_size = */ ( 1 * 1024 * 1024), - /* long int epoch_length = */ 50000, - /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, - /* double lower_hr_threshold = */ 0.9f, - /* double increment = */ 2.0f, - /* hbool_t apply_max_increment = */ TRUE, - /* size_t max_increment = */ (4 * 1024 * 1024), - /* enum H5C_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C_flash_incr__off, - /* double flash_multiple = */ 2.0f, - /* double flash_threshold = */ 0.5f, - /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, - /* double upper_hr_threshold = */ 0.999f, - /* double decrement = */ 0.9f, - /* hbool_t apply_max_decrement = */ TRUE, - /* size_t max_decrement = */ (1 * 1024 * 1024), - /* int epochs_before_eviction = */ 3, - /* hbool_t apply_empty_reserve = */ 2, - /* double empty_reserve = */ 0.1f, - /* int dirty_bytes_threshold = */ (256 * 1024), - /* int metadata_write_strategy = */ - H5AC__DEFAULT_METADATA_WRITE_STRATEGY - }, - { - /* 28 -- empty_reserve too small */ + /* 26 -- empty_reserve too small */ /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER, /* hbool_t rpt_fcn_enabled = */ FALSE, /* hbool_t open_trace_file = */ FALSE, @@ -2550,7 +2480,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = H5AC__DEFAULT_METADATA_WRITE_STRATEGY }, { - /* 29 -- empty_reserve too big */ + /* 27 -- empty_reserve too big */ /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER, /* hbool_t rpt_fcn_enabled = */ FALSE, /* hbool_t open_trace_file = */ FALSE, @@ -2585,7 +2515,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = H5AC__DEFAULT_METADATA_WRITE_STRATEGY }, { - /* 30 -- upper_hr_threshold too small */ + /* 28 -- upper_hr_threshold too small */ /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER, /* hbool_t rpt_fcn_enabled = */ FALSE, /* hbool_t open_trace_file = */ FALSE, @@ -2620,7 +2550,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = H5AC__DEFAULT_METADATA_WRITE_STRATEGY }, { - /* 31 -- upper_hr_threshold too big */ + /* 29 -- upper_hr_threshold too big */ /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER, /* hbool_t rpt_fcn_enabled = */ FALSE, /* hbool_t open_trace_file = */ FALSE, @@ -2655,7 +2585,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = H5AC__DEFAULT_METADATA_WRITE_STRATEGY }, { - /* 32 -- upper_hr_threshold <= lower_hr_threshold */ + /* 30 -- upper_hr_threshold <= lower_hr_threshold */ /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER, /* hbool_t rpt_fcn_enabled = */ FALSE, /* hbool_t open_trace_file = */ FALSE, @@ -2690,7 +2620,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = H5AC__DEFAULT_METADATA_WRITE_STRATEGY }, { - /* 33 -- dirty_bytes_threshold too small */ + /* 31 -- dirty_bytes_threshold too small */ /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER, /* hbool_t rpt_fcn_enabled = */ FALSE, /* hbool_t open_trace_file = */ FALSE, @@ -2725,7 +2655,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = H5AC__DEFAULT_METADATA_WRITE_STRATEGY }, { - /* 34 -- dirty_bytes_threshold too big */ + /* 32 -- dirty_bytes_threshold too big */ /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER, /* hbool_t rpt_fcn_enabled = */ FALSE, /* hbool_t open_trace_file = */ FALSE, @@ -2760,7 +2690,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = H5AC__DEFAULT_METADATA_WRITE_STRATEGY }, { - /* 35 -- attempt to disable evictions when auto incr enabled */ + /* 33 -- attempt to disable evictions when auto incr enabled */ /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER, /* hbool_t rpt_fcn_enabled = */ FALSE, /* hbool_t open_trace_file = */ FALSE, @@ -2795,7 +2725,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = H5AC__DEFAULT_METADATA_WRITE_STRATEGY }, { - /* 36 -- attempt to disable evictions when auto decr enabled */ + /* 34 -- attempt to disable evictions when auto decr enabled */ /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER, /* hbool_t rpt_fcn_enabled = */ FALSE, /* hbool_t open_trace_file = */ FALSE, @@ -2830,7 +2760,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = H5AC__DEFAULT_METADATA_WRITE_STRATEGY }, { - /* 37 -- unknown metadata write strategy */ + /* 35 -- unknown metadata write strategy */ /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER, /* hbool_t rpt_fcn_enabled = */ FALSE, /* hbool_t open_trace_file = */ FALSE, diff --git a/test/cache_tagging.c b/test/cache_tagging.c index 2d22b5b..80ba2eb 100644 --- a/test/cache_tagging.c +++ b/test/cache_tagging.c @@ -2463,6 +2463,9 @@ check_dataset_write_tags(hid_t fcpl, int type) for (i=0; i<10; i++) if ( verify_tag(fid, H5AC_BT_ID, d_tag) < 0 ) TEST_ERROR; + /* Verify object header for dataset */ + if ( verify_tag(fid, H5AC_OHDR_ID, d_tag) < 0 ) TEST_ERROR; + /* verify no other entries present */ if ( verify_no_unknown_tags(fid) < 0 ) TEST_ERROR; diff --git a/test/dsets.c b/test/dsets.c index a233b4e..c0e8702 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -9080,7 +9080,7 @@ main(void) { char filename[FILENAME_BUF_SIZE]; hid_t file, grp, fapl, fapl2; - hbool_t new_format; + unsigned new_format; int mdc_nelmts; size_t rdcc_nelmts; size_t rdcc_nbytes; diff --git a/test/dtypes.c b/test/dtypes.c index 6fe455d..326294f 100644 --- a/test/dtypes.c +++ b/test/dtypes.c @@ -6728,7 +6728,7 @@ test_delete_obj_named(hid_t fapl) hid_t attr = -1; /* Attribute ID */ hid_t dset = -1; /* Dataset ID */ hid_t fapl2 = -1; /* File access property list ID */ - hbool_t new_format; /* Whether to use old or new format */ + unsigned new_format; /* Whether to use old or new format */ char filename[1024], filename2[1024]; TESTING("deleting objects that use named datatypes"); @@ -6823,7 +6823,7 @@ test_delete_obj_named_fileid(hid_t fapl) hid_t attr = -1; /* Attribute ID */ hid_t dset = -1; /* Dataset ID */ hid_t fapl2 = -1; /* File access property list ID */ - hbool_t new_format; /* Whether to use old or new format */ + unsigned new_format; /* Whether to use old or new format */ char filename[1024], filename2[1024]; TESTING("deleting objects that use named datatypes"); diff --git a/test/file_image.c b/test/file_image.c index d9c782a..52d0b28 100644 --- a/test/file_image.c +++ b/test/file_image.c @@ -41,6 +41,8 @@ #define FAMILY_SIZE (2 * 1024) +#define USERBLOCK_SIZE 512 + const char *FILENAME[] = { "file_image_core_test", NULL @@ -549,7 +551,7 @@ test_core(void) VERIFY(fapl >= 0, "fapl creation failed"); /* Set up the core VFD */ - ret = H5Pset_fapl_core(fapl, 0, 0); + ret = H5Pset_fapl_core(fapl, (size_t)0, 0); VERIFY(ret >= 0, "setting core driver in fapl failed"); tmp = h5_fixname(FILENAME[0], fapl, filename, sizeof(filename)); @@ -665,12 +667,17 @@ error: * Programmer: John Mainzer * Tuesday, November 15, 2011 * + * Modifications: + * Vailin Choi; July 2013 + * Add the creation of user block to the file as indicated by the parameter "user". + * ****************************************************************************** */ static int test_get_file_image(const char * test_banner, const int file_name_num, - hid_t fapl) + hid_t fapl, + hbool_t user) { char file_name[1024] = "\0"; void * insertion_ptr = NULL; @@ -694,6 +701,8 @@ test_get_file_image(const char * test_banner, ssize_t image_size; ssize_t file_size; h5_stat_t stat_buf; + hid_t fcpl = -1; + herr_t ret; TESTING(test_banner); @@ -708,8 +717,15 @@ test_get_file_image(const char * test_banner, h5_fixname(FILENAME2[file_name_num], fapl, file_name, sizeof(file_name)); VERIFY(HDstrlen(file_name)>0, "h5_fixname failed"); + fcpl = H5Pcreate(H5P_FILE_CREATE); + VERIFY(fcpl >= 0, "H5Pcreate"); + if(user) { + ret = H5Pset_userblock(fcpl, (hsize_t)USERBLOCK_SIZE); + VERIFY(ret >=0, "H5Pset_userblock"); + } + /* create the file */ - file_id = H5Fcreate(file_name, 0, H5P_DEFAULT, fapl); + file_id = H5Fcreate(file_name, 0, fcpl, fapl); VERIFY(file_id >= 0, "H5Fcreate() failed."); /* Set up data space for new new data set */ @@ -761,11 +777,15 @@ test_get_file_image(const char * test_banner, ssize_t member_size; ssize_t size_remaining; + /* + * Modifications need to be made to accommodate userblock when + * H5Fget_file_image() works for family driver + */ i = 0; file_size = 0; do { - HDsnprintf(member_file_name, 1024, file_name, i); + HDsnprintf(member_file_name, (size_t)1024, file_name, i); /* get the size of the member file */ result = HDstat(member_file_name, &stat_buf); @@ -829,6 +849,10 @@ test_get_file_image(const char * test_banner, * the remainder of the file is all '\0's. */ file_size = (ssize_t)stat_buf.st_size; + if(user) { + VERIFY(file_size > USERBLOCK_SIZE, "file size !> userblock size."); + file_size -= USERBLOCK_SIZE; + } /* with latest mods to truncate call in core file drive, * file size should match image size @@ -843,6 +867,12 @@ test_get_file_image(const char * test_banner, fd = HDopen(file_name, O_RDONLY, 0666); VERIFY(fd >= 0, "HDopen() failed."); + if(user) { + /* Position at userblock */ + ret = HDlseek(fd, (off_t)USERBLOCK_SIZE, SEEK_SET); + VERIFY(ret >= 0, "HDlseek() failed."); + } + /* read the test file from disk into the buffer */ bytes_read = HDread(fd, file_image_ptr, (size_t)file_size); VERIFY(bytes_read == file_size, "HDread() failed."); @@ -930,7 +960,6 @@ test_get_file_image_error_rejection(void) void * image_ptr = NULL; int data[100]; int i; - int result; hid_t fapl_id = -1; hid_t file_id = -1; hid_t dset_id = -1; @@ -1273,13 +1302,18 @@ test_get_file_image_error_rejection(void) error: return 1; -} +} /* test_get_file_image_error_rejection() */ +/* + * Modifications: + * Add testing for file image with or without user block in the file. + */ int main(void) { int errors = 0; hid_t fapl; + unsigned user; h5_reset(); @@ -1289,29 +1323,34 @@ main(void) errors += test_callbacks(); errors += test_core(); - /* test H5Fget_file_image() with sec2 driver */ - fapl = H5Pcreate(H5P_FILE_ACCESS); - if(H5Pset_fapl_sec2(fapl) < 0) - errors++; - else - errors += test_get_file_image("H5Fget_file_image() with sec2 driver", - 0, fapl); - - /* test H5Fget_file_image() with stdio driver */ - fapl = H5Pcreate(H5P_FILE_ACCESS); - if(H5Pset_fapl_stdio(fapl) < 0) - errors++; - else - errors += test_get_file_image("H5Fget_file_image() with stdio driver", - 1, fapl); - - /* test H5Fget_file_image() with core driver */ - fapl = H5Pcreate(H5P_FILE_ACCESS); - if(H5Pset_fapl_core(fapl, (size_t)(64 *1024), TRUE) < 0) - errors++; - else - errors += test_get_file_image("H5Fget_file_image() with core driver", - 2, fapl); + /* Perform tests with/without user block */ + for(user = FALSE; user <= TRUE; user++) { + + /* test H5Fget_file_image() with sec2 driver */ + fapl = H5Pcreate(H5P_FILE_ACCESS); + if(H5Pset_fapl_sec2(fapl) < 0) + errors++; + else + errors += test_get_file_image("H5Fget_file_image() with sec2 driver", + 0, fapl, user); + + /* test H5Fget_file_image() with stdio driver */ + fapl = H5Pcreate(H5P_FILE_ACCESS); + if(H5Pset_fapl_stdio(fapl) < 0) + errors++; + else + errors += test_get_file_image("H5Fget_file_image() with stdio driver", + 1, fapl, user); + + /* test H5Fget_file_image() with core driver */ + fapl = H5Pcreate(H5P_FILE_ACCESS); + if(H5Pset_fapl_core(fapl, (size_t)(64 *1024), TRUE) < 0) + errors++; + else + errors += test_get_file_image("H5Fget_file_image() with core driver", + 2, fapl, user); + + } /* end for */ #if 0 /* at present, H5Fget_file_image() rejects files opened with the diff --git a/test/fillval.c b/test/fillval.c index b7b2ff5..1ea2ae6 100644 --- a/test/fillval.c +++ b/test/fillval.c @@ -2368,7 +2368,7 @@ main(int argc, char *argv[]) { int nerrors=0, argno, test_contig=1, test_chunk=1, test_compact=1; hid_t fapl = (-1), fapl2 = (-1); /* File access property lists */ - hbool_t new_format; /* Whether to use the new format or not */ + unsigned new_format; /* Whether to use the new format or not */ if(argc >= 2) { test_contig = test_chunk = test_compact = 0; diff --git a/test/lheap.c b/test/lheap.c index 492316e..60b29f3 100644 --- a/test/lheap.c +++ b/test/lheap.c @@ -36,36 +36,34 @@ const char *FILENAME[] = { /*------------------------------------------------------------------------- - * Function: main + * Function: main * - * Purpose: Create a file, create a local heap, write data into the local - * heap, close the file, open the file, read data out of the - * local heap, close the file. + * Purpose: Create a file, create a local heap, write data into the local + * heap, close the file, open the file, read data out of the + * local heap, close the file. * - * Return: Success: zero + * Return: Success: zero * - * Failure: non-zero + * Failure: non-zero * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Tuesday, November 24, 1998 * - * Modifications: - * *------------------------------------------------------------------------- */ int main(void) { - hid_t fapl=H5P_DEFAULT; /*file access properties */ - hid_t file=-1; /*hdf5 file */ - H5F_t *f=NULL; /*hdf5 file pointer */ - char filename[1024]; /*file name */ - haddr_t heap_addr; /*local heap address */ - H5HL_t *heap = NULL; /*local heap */ - size_t obj[NOBJS]; /*offsets within the heap */ - int i, j; /*miscellaneous counters */ - char buf[1024]; /*the value to store */ - const char *s; /*value to read */ + hid_t fapl = H5P_DEFAULT; /* file access properties */ + hid_t file = -1; /* hdf5 file */ + H5F_t *f = NULL; /* hdf5 file pointer */ + char filename[1024]; /* file name */ + haddr_t heap_addr; /* local heap address */ + H5HL_t *heap = NULL; /* local heap */ + size_t obj[NOBJS]; /* offsets within the heap */ + int i, j; /* miscellaneous counters */ + char buf[1024]; /* the value to store */ + const char *s; /* value to read */ /* Reset library */ h5_reset(); @@ -77,22 +75,22 @@ main(void) */ TESTING("local heap write"); h5_fixname(FILENAME[0], fapl, filename, sizeof filename); - if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) - goto error; + if(FAIL == (file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))) + goto error; if(NULL == (f = (H5F_t *)H5I_object(file))) { - H5_FAILED(); - H5Eprint2(H5E_DEFAULT, stdout); - goto error; + H5_FAILED(); + H5Eprint2(H5E_DEFAULT, stdout); + goto error; } - if (H5AC_ignore_tags(f) < 0) { - H5_FAILED(); - H5Eprint2(H5E_DEFAULT, stdout); - goto error; + if(FAIL == H5AC_ignore_tags(f)) { + H5_FAILED(); + H5Eprint2(H5E_DEFAULT, stdout); + goto error; } - if(H5HL_create(f, H5P_DATASET_XFER_DEFAULT, (size_t)0, &heap_addr/*out*/) < 0) { - H5_FAILED(); - H5Eprint2(H5E_DEFAULT, stdout); - goto error; + if(FAIL == H5HL_create(f, H5P_DATASET_XFER_DEFAULT, (size_t)0, &heap_addr/*out*/)) { + H5_FAILED(); + H5Eprint2(H5E_DEFAULT, stdout); + goto error; } if (NULL == (heap = H5HL_protect(f, H5P_DATASET_XFER_DEFAULT, heap_addr, H5AC__NO_FLAGS_SET))) { H5_FAILED(); @@ -106,18 +104,19 @@ main(void) if(j > 4) buf[j] = '\0'; - if((size_t)(-1) == (obj[i] = H5HL_insert(f, H5P_DATASET_XFER_DEFAULT, heap, strlen(buf) + 1, buf))) { - H5_FAILED(); - H5Eprint2(H5E_DEFAULT, stdout); - goto error; - } + if(UFAIL == (obj[i] = H5HL_insert(f, H5P_DATASET_XFER_DEFAULT, heap, strlen(buf) + 1, buf))) { + H5_FAILED(); + H5Eprint2(H5E_DEFAULT, stdout); + goto error; + } } - if(H5HL_unprotect(heap) < 0) { + if(FAIL == H5HL_unprotect(heap)) { H5_FAILED(); H5Eprint2(H5E_DEFAULT, stdout); goto error; } - if (H5Fclose(file)<0) goto error; + if (FAIL == H5Fclose(file)) + goto error; PASSED(); /* @@ -126,16 +125,17 @@ main(void) TESTING("local heap read"); h5_fixname(FILENAME[0], fapl, filename, sizeof filename); - if((file = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0) goto error; + if(FAIL == (file = H5Fopen(filename, H5F_ACC_RDONLY, fapl))) + goto error; if(NULL == (f = (H5F_t *)H5I_object(file))) { H5_FAILED(); H5Eprint2(H5E_DEFAULT, stdout); goto error; } - if (H5AC_ignore_tags(f) < 0) { - H5_FAILED(); - H5Eprint2(H5E_DEFAULT, stdout); - goto error; + if (FAIL == H5AC_ignore_tags(f)) { + H5_FAILED(); + H5Eprint2(H5E_DEFAULT, stdout); + goto error; } for(i = 0; i < NOBJS; i++) { sprintf(buf, "%03d-", i); @@ -164,14 +164,15 @@ main(void) goto error; } - if(H5HL_unprotect(heap) < 0) { + if(FAIL == H5HL_unprotect(heap)) { H5_FAILED(); H5Eprint2(H5E_DEFAULT, stdout); goto error; } } - if (H5Fclose(file)<0) goto error; + if (FAIL == H5Fclose(file)) + goto error; PASSED(); /* Check opening existing file non-default sizes of lengths and addresses */ @@ -183,8 +184,10 @@ main(void) if(file >= 0){ if((dset = H5Dopen2(file, "/Dataset1", H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Dclose(dset) < 0) TEST_ERROR - if(H5Fclose(file) < 0) TEST_ERROR + if(H5Dclose(dset) < 0) + TEST_ERROR + if(H5Fclose(file) < 0) + TEST_ERROR } else { H5_FAILED(); @@ -206,7 +209,7 @@ main(void) error: puts("*** TESTS FAILED ***"); H5E_BEGIN_TRY { - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return 1; } diff --git a/test/links.c b/test/links.c index 577834d..db5922b 100644 --- a/test/links.c +++ b/test/links.c @@ -10695,7 +10695,7 @@ corder_delete(hid_t fapl) unsigned min_dense; /* Minimum # of links to store in group "densely" */ hsize_t name_count; /* # of records in name index */ hsize_t corder_count; /* # of records in creation order index */ - hbool_t reopen_file; /* Whether to re-open the file before deleting group */ + unsigned reopen_file; /* Whether to re-open the file before deleting group */ h5_stat_size_t empty_size; /* Size of empty file */ h5_stat_size_t file_size; /* Size of file after operating on it */ char objname[NAME_BUF_SIZE]; /* Object name */ @@ -10976,8 +10976,8 @@ link_info_by_idx(hid_t fapl) hid_t file_id = (-1); /* File ID */ hid_t group_id = (-1); /* Group ID */ hid_t gcpl_id = (-1); /* Group creation property list ID */ - hbool_t hard_link; /* Create hard or soft link? */ - hbool_t use_index; /* Use index on creation order values */ + unsigned hard_link; /* Create hard or soft link? */ + unsigned use_index; /* Use index on creation order values */ unsigned max_compact; /* Maximum # of links to store in group compactly */ unsigned min_dense; /* Minimum # of links to store in group "densely" */ H5L_info_t linfo; /* Link info struct */ @@ -11159,7 +11159,7 @@ link_info_by_idx_old(hid_t fapl) { hid_t file_id = (-1); /* File ID */ hid_t group_id = (-1), group_id2 = (-1); /* Group IDs */ - hbool_t hard_link; /* Create hard or soft link? */ + unsigned hard_link; /* Create hard or soft link? */ H5L_info_t linfo; /* Link info struct */ char objname[NAME_BUF_SIZE]; /* Object name */ char valname[NAME_BUF_SIZE]; /* Link value name */ @@ -11328,7 +11328,7 @@ delete_by_idx(hid_t fapl) hid_t gcpl_id = (-1); /* Group creation property list ID */ H5_index_t idx_type; /* Type of index to operate on */ H5_iter_order_t order; /* Order within in the index */ - hbool_t use_index; /* Use index on creation order values */ + unsigned use_index; /* Use index on creation order values */ unsigned max_compact; /* Maximum # of links to store in group compactly */ unsigned min_dense; /* Minimum # of links to store in group "densely" */ H5L_info_t linfo; /* Link info struct */ @@ -12161,7 +12161,7 @@ link_iterate(hid_t fapl) hid_t gcpl_id = (-1); /* Group creation property list ID */ H5_index_t idx_type; /* Type of index to operate on */ H5_iter_order_t order; /* Order within in the index */ - hbool_t use_index; /* Use index on creation order values */ + unsigned use_index; /* Use index on creation order values */ unsigned max_compact; /* Maximum # of links to store in group compactly */ unsigned min_dense; /* Minimum # of links to store in group "densely" */ char objname[NAME_BUF_SIZE]; /* Object name */ @@ -12847,7 +12847,7 @@ open_by_idx(hid_t fapl) hid_t gcpl_id = (-1); /* Group creation property list ID */ H5_index_t idx_type; /* Type of index to operate on */ H5_iter_order_t order; /* Order within in the index */ - hbool_t use_index; /* Use index on creation order values */ + unsigned use_index; /* Use index on creation order values */ unsigned max_compact; /* Maximum # of links to store in group compactly */ unsigned min_dense; /* Minimum # of links to store in group "densely" */ H5O_info_t oi; /* Buffer for querying object's info */ @@ -13283,7 +13283,7 @@ object_info(hid_t fapl) hid_t space_id = (-1); /* Dataspace ID (for attributes) */ H5_index_t idx_type; /* Type of index to operate on */ H5_iter_order_t order; /* Order within in the index */ - hbool_t use_index; /* Use index on creation order values */ + unsigned use_index; /* Use index on creation order values */ unsigned max_compact; /* Maximum # of links to store in group compactly */ unsigned min_dense; /* Minimum # of links to store in group "densely" */ H5O_info_t oinfo; /* Buffer for querying object's info */ @@ -13679,7 +13679,7 @@ group_info(hid_t fapl) hid_t gcpl_id = (-1); /* Group creation property list ID */ H5_index_t idx_type; /* Type of index to operate on */ H5_iter_order_t order; /* Order within in the index */ - hbool_t use_index; /* Use index on creation order values */ + unsigned use_index; /* Use index on creation order values */ unsigned max_compact; /* Maximum # of links to store in group compactly */ unsigned min_dense; /* Minimum # of links to store in group "densely" */ H5G_info_t grp_info; /* Buffer for querying object's info */ @@ -14490,8 +14490,8 @@ main(void) { hid_t fapl, fapl2; /* File access property lists */ int nerrors = 0; - hbool_t new_format; /* Whether to use the new format or not */ - hbool_t efc; /* Whether to use the external file cache */ + unsigned new_format; /* Whether to use the new format or not */ + unsigned efc; /* Whether to use the external file cache */ const char *env_h5_drvr; /* File Driver value from environment */ env_h5_drvr = HDgetenv("HDF5_DRIVER"); @@ -6802,7 +6802,7 @@ test_mf_fs_drivers(hid_t fapl) hid_t fcpl = -1; /* file creation property list */ hid_t fapl_new = -1; /* copy of file access property list */ hid_t fapl2 = -1; /* copy of file access property list */ - hbool_t new_format; /* To use new library format or not */ + unsigned new_format; /* To use new library format or not */ unsigned ret = 0; /* return value */ H5FD_mem_t memb_map[H5FD_MEM_NTYPES]; /* Memory usage map */ @@ -7227,7 +7227,7 @@ test_filespace_drivers(hid_t fapl) { hid_t fapl_new = -1; /* copy of file access property list */ hid_t fapl2 = -1; /* copy of file access property list */ - hbool_t new_format; /* Using library new format or not */ + unsigned new_format; /* Using library new format or not */ unsigned ret = 0; /* return value */ H5FD_mem_t memb_map[H5FD_MEM_NTYPES]; /* Memory usage map */ diff --git a/test/objcopy.c b/test/objcopy.c index ecc3ba5..82be446 100644 --- a/test/objcopy.c +++ b/test/objcopy.c @@ -12312,7 +12312,7 @@ main(void) /* Tests that do not use attributes and do not need to be tested * multiple times for different attribute configurations */ if(configuration < CONFIG_DENSE) { - hbool_t reopen; + unsigned reopen; nerrors += test_copy_named_datatype(fcpl_src, fcpl_dst, src_fapl, dst_fapl); nerrors += test_copy_named_datatype_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl); diff --git a/test/ohdr.c b/test/ohdr.c index e178729..53aa18f 100644 --- a/test/ohdr.c +++ b/test/ohdr.c @@ -321,7 +321,7 @@ main(void) time_t time_new, ro; int chunkno; /* Chunk index for message */ int i; /* Local index variable */ - hbool_t b; /* Index for "new format" loop */ + unsigned b; /* Index for "new format" loop */ herr_t ret; /* Generic return value */ /* Reset library */ diff --git a/test/plugin.c b/test/plugin.c index e34c691..a3082d2 100644 --- a/test/plugin.c +++ b/test/plugin.c @@ -710,7 +710,7 @@ main(void) { char filename[FILENAME_BUF_SIZE]; hid_t file, fapl, fapl2; - hbool_t new_format; + unsigned new_format; int mdc_nelmts; size_t rdcc_nelmts; size_t rdcc_nbytes; diff --git a/test/set_extent.c b/test/set_extent.c index f6c3766..ae83ba2 100644 --- a/test/set_extent.c +++ b/test/set_extent.c @@ -116,8 +116,8 @@ int main( void ) { hid_t fapl; /* file access property list */ hid_t fapl2; /* file access property list w/latest format set */ - hbool_t new_format; /* Whether to use the latest file format */ - hbool_t chunk_cache; /* Whether to enable chunk caching */ + unsigned new_format; /* Whether to use the latest file format */ + unsigned chunk_cache; /* Whether to enable chunk caching */ int nerrors = 0; /* Initialize random number seed */ diff --git a/test/stab.c b/test/stab.c index 7db1feb..f81bb5f 100644 --- a/test/stab.c +++ b/test/stab.c @@ -1166,7 +1166,7 @@ int main(void) { hid_t fapl, fapl2; /* File access property list IDs */ - hbool_t new_format; /* Whether to use the new format or not */ + unsigned new_format; /* Whether to use the new format or not */ int nerrors = 0; /* Reset library */ diff --git a/test/tattr.c b/test/tattr.c index d96ca59..585246a 100644 --- a/test/tattr.c +++ b/test/tattr.c @@ -5338,7 +5338,7 @@ test_attr_corder_delete(hid_t fcpl, hid_t fapl) hsize_t nattrs; /* Number of attributes on object */ hsize_t name_count; /* # of records in name index */ hsize_t corder_count; /* # of records in creation order index */ - hbool_t reopen_file; /* Whether to re-open the file before deleting group */ + unsigned reopen_file; /* Whether to re-open the file before deleting group */ char attrname[NAME_BUF_SIZE]; /* Name of attribute */ #ifdef LATER h5_stat_size_t empty_size; /* Size of empty file */ @@ -5687,7 +5687,7 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl) hsize_t nattrs; /* Number of attributes on object */ hsize_t name_count; /* # of records in name index */ hsize_t corder_count; /* # of records in creation order index */ - hbool_t use_index; /* Use index on creation order values */ + unsigned use_index; /* Use index on creation order values */ char attrname[NAME_BUF_SIZE]; /* Name of attribute */ char tmpname[NAME_BUF_SIZE]; /* Temporary attribute name */ unsigned curr_dset; /* Current dataset to work on */ @@ -5899,7 +5899,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl) hsize_t corder_count; /* # of records in creation order index */ H5_index_t idx_type; /* Type of index to operate on */ H5_iter_order_t order; /* Order within in the index */ - hbool_t use_index; /* Use index on creation order values */ + unsigned use_index; /* Use index on creation order values */ char attrname[NAME_BUF_SIZE]; /* Name of attribute */ char tmpname[NAME_BUF_SIZE]; /* Temporary attribute name */ unsigned curr_dset; /* Current dataset to work on */ @@ -6842,7 +6842,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl) attr_iter_info_t iter_info; /* Iterator info */ hbool_t *visited = NULL; /* Array of flags for visiting links */ hsize_t idx; /* Start index for iteration */ - hbool_t use_index; /* Use index on creation order values */ + unsigned use_index; /* Use index on creation order values */ const char *dsetname; /* Name of dataset for attributes */ char attrname[NAME_BUF_SIZE]; /* Name of attribute */ unsigned curr_dset; /* Current dataset to work on */ @@ -7203,7 +7203,7 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl) hsize_t corder_count; /* # of records in creation order index */ H5_index_t idx_type; /* Type of index to operate on */ H5_iter_order_t order; /* Order within in the index */ - hbool_t use_index; /* Use index on creation order values */ + unsigned use_index; /* Use index on creation order values */ char attrname[NAME_BUF_SIZE]; /* Name of attribute */ unsigned curr_dset; /* Current dataset to work on */ unsigned u; /* Local index variable */ @@ -7549,7 +7549,7 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl) hsize_t nattrs; /* Number of attributes on object */ hsize_t name_count; /* # of records in name index */ hsize_t corder_count; /* # of records in creation order index */ - hbool_t use_index; /* Use index on creation order values */ + unsigned use_index; /* Use index on creation order values */ const char *dsetname; /* Name of dataset for attributes */ char attrname[NAME_BUF_SIZE]; /* Name of attribute */ unsigned curr_dset; /* Current dataset to work on */ @@ -7804,7 +7804,7 @@ test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl) hsize_t nattrs; /* Number of attributes on object */ hsize_t name_count; /* # of records in name index */ hsize_t corder_count; /* # of records in creation order index */ - hbool_t use_index; /* Use index on creation order values */ + unsigned use_index; /* Use index on creation order values */ const char *dsetname; /* Name of dataset for attributes */ char attrname[NAME_BUF_SIZE]; /* Name of attribute */ unsigned curr_dset; /* Current dataset to work on */ @@ -10568,8 +10568,8 @@ test_attr(void) { hid_t fapl = (-1), fapl2 = (-1); /* File access property lists */ hid_t fcpl = (-1), fcpl2 = (-1); /* File creation property lists */ - hbool_t new_format; /* Whether to use the new format or not */ - hbool_t use_shared; /* Whether to use shared attributes or not */ + unsigned new_format; /* Whether to use the new format or not */ + unsigned use_shared; /* Whether to use shared attributes or not */ herr_t ret; /* Generic return value */ /* Output message about test being performed */ diff --git a/test/tfile.c b/test/tfile.c index 5fc528e..c36045b 100644 --- a/test/tfile.c +++ b/test/tfile.c @@ -3058,7 +3058,7 @@ test_filespace_info(void) char filename[FILENAME_LEN]; /* Filename to use */ H5F_file_space_type_t strategy, fs_type, def_type; /* File space handling strategy */ hsize_t threshold, fs_size, def_size; /* Free space section threshold */ - hbool_t new_format; /* new format or old format */ + unsigned new_format; /* new format or old format */ herr_t ret; /* return value */ /* Output message about test being performed */ @@ -3121,7 +3121,7 @@ test_filespace_info(void) /* Create the file with the specified file space info */ fid1 = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl1, my_fapl); - CHECK(ret, FAIL, "H5Fcreate"); + CHECK(fid1, FAIL, "H5Fcreate"); /* Close the file */ ret = H5Fclose(fid1); @@ -3129,7 +3129,7 @@ test_filespace_info(void) /* Re-open the file */ fid2 = H5Fopen(filename, H5F_ACC_RDWR, my_fapl); - CHECK(ret, FAIL, "H5Fopen"); + CHECK(fid2, FAIL, "H5Fopen"); /* Get the file's creation property */ fcpl2 = H5Fget_create_plist(fid2); diff --git a/test/th5o.c b/test/th5o.c index 90f3c9b..3be5d12 100644 --- a/test/th5o.c +++ b/test/th5o.c @@ -776,7 +776,7 @@ test_h5o_link(void) hid_t lcpl_id=-1; hsize_t dims[2] = {TEST6_DIM1, TEST6_DIM2}; htri_t committed; /* Whether the named datatype is committed */ - hbool_t new_format; /* Whether to use the new format or not */ + unsigned new_format; /* Whether to use the new format or not */ int wdata[TEST6_DIM1][TEST6_DIM2]; int rdata[TEST6_DIM1][TEST6_DIM2]; int i, n, j; @@ -1335,6 +1335,7 @@ test_h5o_getinfo_same_file(void) } /* test_h5o_getinfo_same_file() */ + /**************************************************************** ** diff --git a/test/titerate.c b/test/titerate.c index 98428ea..20a3940 100644 --- a/test/titerate.c +++ b/test/titerate.c @@ -919,7 +919,7 @@ void test_iterate(void) { hid_t fapl, fapl2; /* File access property lists */ - hbool_t new_format; /* Whether to use the new format or not */ + unsigned new_format; /* Whether to use the new format or not */ herr_t ret; /* Generic return value */ /* Output message about test being performed */ diff --git a/test/tmisc.c b/test/tmisc.c index fa0f150..1298f6b 100644 --- a/test/tmisc.c +++ b/test/tmisc.c @@ -5176,7 +5176,7 @@ static void test_misc30(void) { hsize_t file_size[] = {0, 0}; /* Sizes of file created */ - hbool_t get_info; /* Whether to perform the get info call */ + unsigned get_info; /* Whether to perform the get info call */ /* Output message about test being performed */ MESSAGE(5, ("Local heap dropping free block info\n")); diff --git a/test/unlink.c b/test/unlink.c index c091281..7169365 100644 --- a/test/unlink.c +++ b/test/unlink.c @@ -2443,7 +2443,7 @@ main(void) hid_t fapl, fapl2, file; int nerrors = 0; char filename[1024]; - hbool_t new_format; + unsigned new_format; /* Metadata cache parameters */ int mdc_nelmts; @@ -37,7 +37,7 @@ const char *FILENAME[] = { "vds_virt_1", "vds_src_0", "vds_src_1", - "vds%_src", + "vds%%_src", NULL }; @@ -1156,7 +1156,7 @@ test_basic_io(unsigned config, hid_t fapl) char vfilename2[FILENAME_BUF_SIZE]; char srcfilenamepct[FILENAME_BUF_SIZE]; char srcfilenamepct_map[FILENAME_BUF_SIZE]; - const char *srcfilenamepct_map_orig = "vds%%_src"; + const char *srcfilenamepct_map_orig = "vds%%%%_src"; hid_t srcfile[4] = {-1, -1, -1, -1}; /* Files with source dsets */ hid_t vfile = -1; /* File with virtual dset */ hid_t vfile2 = -1; /* File with copied virtual dset */ @@ -6383,7 +6383,7 @@ test_printf(unsigned config, hid_t fapl) const char *printf_srcfilename_map_orig = "vds_src_%b"; char srcfilenamepct[FILENAME_BUF_SIZE]; char srcfilenamepct_map[FILENAME_BUF_SIZE]; - const char *srcfilenamepct_map_orig = "vds%%_src"; + const char *srcfilenamepct_map_orig = "vds%%%%_src"; hid_t srcfile[4] = {-1, -1, -1, -1}; /* Files with source dsets */ hid_t vfile = -1; /* File with virtual dset */ hid_t dcpl = -1; /* Dataset creation property list */ |