diff options
Diffstat (limited to 'test/dsets.c')
-rw-r--r-- | test/dsets.c | 474 |
1 files changed, 306 insertions, 168 deletions
diff --git a/test/dsets.c b/test/dsets.c index d23f438..9562ec9 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -87,6 +87,8 @@ const char *FILENAME[] = { NULL }; +#define OHMIN_FILENAME_A "ohdr_min_a" + #define FILENAME_BUF_SIZE 1024 #define KB 1024 @@ -268,6 +270,13 @@ const char *FILENAME[] = { #define STORAGE_SIZE_CHUNK_DIM1 5 #define STORAGE_SIZE_CHUNK_DIM2 5 +/* Parameters for testing version bounds */ +#define VDS_FNAME1 "virtual_file1" +#define VDS_FNAME2 "virtual_file2" +#define SRC_FNAME "source_file" +#define SRC_DSET "src_dset" +#define V_DSET "v_dset" + /* Shared global arrays */ #define DSET_DIM1 100 #define DSET_DIM2 200 @@ -339,7 +348,7 @@ filter_count(unsigned int flags, size_t H5_ATTR_UNUSED cd_nelmts, count_nbytes_written += nbytes; return nbytes; -} +} /* end filter_count() */ /*------------------------------------------------------------------------- @@ -486,7 +495,7 @@ test_create(hid_t file) error: return -1; -} +} /* end test_create() */ /*------------------------------------------------------------------------- @@ -622,7 +631,7 @@ error: if(tconv_buf) HDfree(tconv_buf); return -1; -} +} /* end test_simple_io() */ /*------------------------------------------------------------------------- @@ -728,7 +737,7 @@ error: if(f > 0) HDclose(f); return -1; -} +} /* end test_userblock_offset() */ /*------------------------------------------------------------------------- @@ -921,7 +930,7 @@ test_compact_io(hid_t fapl) } H5E_END_TRY; return -1; -} +} /* end test_compact_io() */ /*------------------------------------------------------------------------- @@ -1336,7 +1345,7 @@ test_conv_buffer(hid_t fid) error: return -1; -} +} /* end test_conv_buffer() */ /*------------------------------------------------------------------------- @@ -1420,7 +1429,7 @@ error: } H5E_END_TRY; return -1; -} +} /* end test_tconv() */ /* This message derives from H5Z */ const H5Z_class2_t H5Z_BOGUS[1] = {{ @@ -1453,7 +1462,7 @@ can_apply_bogus(hid_t H5_ATTR_UNUSED dcpl_id, hid_t type_id, hid_t H5_ATTR_UNUSE return 1; else return -1; -} +} /* end can_apply_bogus() */ /*------------------------------------------------------------------------- @@ -1471,7 +1480,7 @@ filter_bogus(unsigned int H5_ATTR_UNUSED flags, size_t H5_ATTR_UNUSED cd_nelmts, size_t H5_ATTR_UNUSED *buf_size, void H5_ATTR_UNUSED **buf) { return nbytes; -} +} /* end filter_bogus() */ /*------------------------------------------------------------------------- @@ -1571,7 +1580,7 @@ filter_bogus2(unsigned int flags, size_t cd_nelmts, /* Filter is "no op" */ else return(nbytes); -} +} /* end filter_bogus2() */ /*------------------------------------------------------------------------- @@ -1589,7 +1598,7 @@ filter_bogus3(unsigned int H5_ATTR_UNUSED flags, size_t H5_ATTR_UNUSED cd_nelmts size_t H5_ATTR_UNUSED *buf_size, void H5_ATTR_UNUSED **buf) { return 0; -} +} /* end filter_bogus3() */ /* This message derives from H5Z */ const H5Z_class2_t H5Z_CORRUPT[1] = {{ @@ -1678,7 +1687,7 @@ filter_cb_cont(H5Z_filter_t filter, void H5_ATTR_UNUSED *buf, size_t H5_ATTR_UNU return H5Z_CB_CONT; else return H5Z_CB_FAIL; -} +} /* end filter_cb_cont() */ /*------------------------------------------------------------------------- @@ -1697,7 +1706,7 @@ filter_cb_fail(H5Z_filter_t filter, void H5_ATTR_UNUSED *buf, size_t H5_ATTR_UNU return H5Z_CB_FAIL; else return H5Z_CB_CONT; -} +} /* end filter_cb_fail() */ /*------------------------------------------------------------------------- @@ -2046,7 +2055,7 @@ error: if(tconv_buf) HDfree (tconv_buf); return -1; -} +} /* end test_filter_internal() */ /*------------------------------------------------------------------------- * Function: test_filter_noencoder @@ -2164,7 +2173,7 @@ error: H5Fclose(file_id); return -1; -} +} /* end test_filter_noencoder() */ #endif /* H5_HAVE_FILTER_SZIP */ /*------------------------------------------------------------------------- @@ -2234,7 +2243,7 @@ test_get_filter_info(void) error: return -1; -} +} /* end test_get_filter_info() */ /*------------------------------------------------------------------------- * Function: test_filters @@ -2509,7 +2518,7 @@ H5_ATTR_UNUSED error: return -1; -} +} /* end test_filters() */ /*------------------------------------------------------------------------- @@ -2849,7 +2858,7 @@ test_onebyte_shuffle(hid_t file) error: return -1; -} +} /* end test_onebyte_shuffle() */ /*------------------------------------------------------------------------- @@ -2967,7 +2976,7 @@ test_nbit_int(hid_t file) error: return -1; -} +} /* end test_nbit_int() */ /*------------------------------------------------------------------------- @@ -3085,7 +3094,7 @@ test_nbit_float(hid_t file) error: return -1; -} +} /* end test_nbit_float() */ /*------------------------------------------------------------------------- @@ -3217,7 +3226,7 @@ test_nbit_double(hid_t file) error: return -1; -} +} /* end test_nbit_double() */ /*------------------------------------------------------------------------- @@ -3344,7 +3353,7 @@ test_nbit_array(hid_t file) error: return -1; -} +} /* end test_nbit_array() */ /*------------------------------------------------------------------------- @@ -3561,7 +3570,7 @@ test_nbit_compound(hid_t file) error: return -1; -} +} /* end test_nbit_compound() */ /*------------------------------------------------------------------------- @@ -3906,7 +3915,7 @@ out: error: return -1; -} +} /* end test_nbit_compound_2() */ /*------------------------------------------------------------------------- @@ -4086,7 +4095,7 @@ test_nbit_compound_3(hid_t file) error: return -1; -} +} /* end test_nbit_compound_3() */ /*------------------------------------------------------------------------- @@ -4253,7 +4262,7 @@ test_nbit_int_size(hid_t file) return 0; error: return -1; -} +} /* end test_nbit_int_size() */ /*------------------------------------------------------------------------- @@ -4450,7 +4459,7 @@ test_nbit_flt_size(hid_t file) return 0; error: return -1; -} +} /* end test_nbit_flt_size() */ /*------------------------------------------------------------------------- * Function: test_scaleoffset_int @@ -4561,7 +4570,7 @@ test_scaleoffset_int(hid_t file) return 0; error: return -1; -} +} /* end test_scaleoffset_int() */ /*------------------------------------------------------------------------- @@ -4689,7 +4698,7 @@ test_scaleoffset_int_2(hid_t file) return 0; error: return -1; -} +} /* end test_scaleoffset_int_2() */ /*------------------------------------------------------------------------- @@ -4802,7 +4811,7 @@ test_scaleoffset_float(hid_t file) return 0; error: return -1; -} +} /* end test_scaleoffset_float() */ /*------------------------------------------------------------------------- @@ -4931,7 +4940,7 @@ test_scaleoffset_float_2(hid_t file) return 0; error: return -1; -} +} /* end test_scaleoffset_float_2() */ /*------------------------------------------------------------------------- @@ -5044,7 +5053,7 @@ test_scaleoffset_double(hid_t file) return 0; error: return -1; -} +} /* end test_scaleoffset_double() */ /*------------------------------------------------------------------------- @@ -5174,7 +5183,7 @@ test_scaleoffset_double_2(hid_t file) return 0; error: return -1; -} +} /* end test_scaleoffset_double_2() */ /*------------------------------------------------------------------------- @@ -5241,7 +5250,7 @@ test_multiopen (hid_t file) H5Pclose(dcpl); } H5E_END_TRY; return -1; -} +} /* end test_multiopen () */ /*------------------------------------------------------------------------- @@ -5337,7 +5346,7 @@ test_types(hid_t file) H5Dclose(dset); } H5E_END_TRY; return -1; -} +} /* end test_types() */ /* This message derives from H5Z */ const H5Z_class2_t H5Z_CAN_APPLY_TEST[1] = {{ @@ -6576,7 +6585,7 @@ error: HDfree(buf); } H5E_END_TRY; return -1; -} +} /* end auxread_fdata() */ /*------------------------------------------------------------------------- @@ -10027,7 +10036,7 @@ error: H5Fclose(fid); } H5E_END_TRY; return -1; -} /* test_idx_compatible */ +} /* end test_idx_compatible() */ /*------------------------------------------------------------------------- * @@ -10167,7 +10176,7 @@ error: H5Fclose(fid); } H5E_END_TRY; return -1; -} /* test_unfiltered_edge_chunks */ +} /* end test_unfiltered_edge_chunks() */ /*------------------------------------------------------------------------- @@ -10864,7 +10873,7 @@ error: H5Sclose(msid); } H5E_END_TRY; return -1; -} /* test_farray_hdr_fd() */ +} /* end test_farray_hdr_fd() */ /*------------------------------------------------------------------------- @@ -10984,7 +10993,7 @@ error: H5Sclose(msid); } H5E_END_TRY; return -1; -} /* test_bt2_hdr_fd() */ +} /* end test_bt2_hdr_fd() */ /*------------------------------------------------------------------------- @@ -12182,7 +12191,7 @@ scatter_error_cb_fail(void **src_buf/*out*/, size_t *src_buf_bytes_used/*out*/, *src_buf_bytes_used = nelmts * sizeof(scatter_info->src_buf[0]); return FAIL; -} +} /* end scatter_error_cb_fail() */ static herr_t scatter_error_cb_null(void **src_buf/*out*/, size_t *src_buf_bytes_used/*out*/, @@ -12200,7 +12209,7 @@ scatter_error_cb_null(void **src_buf/*out*/, size_t *src_buf_bytes_used/*out*/, *src_buf_bytes_used = nelmts * sizeof(scatter_info->src_buf[0]); return SUCCEED; -} +} /* end scatter_error_cb_null() */ static herr_t scatter_error_cb_unalign(void **src_buf/*out*/, size_t *src_buf_bytes_used/*out*/, @@ -12211,7 +12220,7 @@ scatter_error_cb_unalign(void **src_buf/*out*/, size_t *src_buf_bytes_used/*out* *src_buf_bytes_used = *(size_t *)_src_buf_bytes_used; return SUCCEED; -} +} /* end scatter_error_cb_unalign() */ static herr_t test_scatter_error(void) @@ -12374,7 +12383,7 @@ gather_error_cb_fail(const void H5_ATTR_UNUSED *dst_buf, size_t H5_ATTR_UNUSED dst_buf_bytes_used, void H5_ATTR_UNUSED *op_data) { return FAIL; -} +} /* end gather_error_cb_fail() */ static herr_t test_gather_error(void) @@ -12587,7 +12596,8 @@ static herr_t dls_01_read_stuff( hid_t fid ); static herr_t dls_01_main( void ); static herr_t -dls_01_setup_file( hid_t fid ) { +dls_01_setup_file( hid_t fid ) +{ int status = 0; hid_t sid = 0, did = 0, tid = 0, dcpl = 0; @@ -12632,10 +12642,11 @@ error: return -1; -} /* dls_01_setup_file */ +} /* end dls_01_setup_file() */ static herr_t -dls_01_write_data( hid_t fid, char* buffer ) { +dls_01_write_data( hid_t fid, char* buffer ) +{ int status = 0; hid_t did = 0, tid = 0; @@ -12668,10 +12679,11 @@ error: return -1; -} /* dls_01_write_data */ +} /* end dls_01_write_data() */ static herr_t -dls_01_read_stuff( hid_t fid ) { +dls_01_read_stuff( hid_t fid ) +{ int status = 0; hid_t did = 0; @@ -12692,10 +12704,11 @@ error: return -1; -} /* dls_01_read_stuff() */ +} /* end dls_01_read_stuff() */ static herr_t -dls_01_main( void ) { +dls_01_main( void ) +{ char filename[512]; int status = 0; @@ -12761,7 +12774,7 @@ error: return -1; -} /* dls_01_main() */ +} /* end dls_01_main() */ /*------------------------------------------------------------------------- * Function: test_compact_open_close_dirty @@ -12879,7 +12892,7 @@ error: H5Fclose(fid); } H5E_END_TRY; return -1; -} /* test_compact_open_close_dirty() */ +} /* end test_compact_open_close_dirty() */ /*------------------------------------------------------------------------- @@ -12888,8 +12901,8 @@ error: * Purpose: Tests various format versions. * (Currently, only virtual dataset feature) * - * Return: Success: 0 - * Failure: -1 + * Return: Success: SUCCEED + * Failure: FAIL * Description: * This function attempts to create a virtual dataset in all * valid combinations of low/high library format bounds. Creation @@ -12898,13 +12911,8 @@ error: * *------------------------------------------------------------------------- */ -#define VDS_FNAME1 "virtual_file1" -#define VDS_FNAME2 "virtual_file2" -#define SRC_FNAME "source_file" -#define SRC_DSET "src_dset" -#define V_DSET "v_dset" static herr_t -test_versionbounds() +test_versionbounds(void) { hid_t fapl = -1; hid_t srcfile = -1; /* Files with source dsets */ @@ -13018,7 +13026,7 @@ test_versionbounds() TEST_ERROR dcpl = -1; PASSED(); - return 0; + return SUCCEED; error: H5E_BEGIN_TRY { @@ -13031,8 +13039,126 @@ test_versionbounds() H5Fclose(srcfile); H5Fclose(vfile); } H5E_END_TRY; - return -1; -} /* test_versionbounds() */ + return FAIL; +} /* end test_versionbounds() */ + + +/*----------------------------------------------------------------------------- + * Function: test_object_header_minimization_dcpl + * + * Purpose: Test the "datset object header minimization" property as part of + * the DCPL. + * + * Return: Success/pass: 0 + * Failure/error: -1 + * + * Programmer: Jacob Smith + * 2018 August 15 + * + * Changes: None. + *----------------------------------------------------------------------------- + */ +static herr_t +test_object_header_minimization_dcpl(hid_t fapl_id) +{ + hid_t dcpl_id = -1; + hid_t file_id = -1; + char filename[FILENAME_BUF_SIZE] = ""; + hbool_t minimize = FALSE; + herr_t ret; + + TESTING("dcpl flags to minimize dataset object header"); + + /*********/ + /* SETUP */ + /*********/ + + if(NULL == h5_fixname(OHMIN_FILENAME_A, fapl_id, filename, sizeof(filename))) + TEST_ERROR + + file_id = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id); + if (file_id == H5I_INVALID_HID) + TEST_ERROR + + dcpl_id = H5Pcreate(H5P_DATASET_CREATE); + if (dcpl_id == H5I_INVALID_HID) + TEST_ERROR + + /*********/ + /* TESTS */ + /*********/ + + /* default value (not set explicitly) + */ + if (H5Pget_dset_no_attrs_hint(dcpl_id, &minimize) == FAIL) + TEST_ERROR + if (FALSE != minimize) + TEST_ERROR + + /* FALSE-set value + */ + if (H5Pset_dset_no_attrs_hint(dcpl_id, FALSE) == FAIL) + TEST_ERROR + if (H5Pget_dset_no_attrs_hint(dcpl_id, &minimize) == FAIL) + TEST_ERROR + if (FALSE != minimize) + TEST_ERROR + + /* TRUE-set value + */ + if (H5Pset_dset_no_attrs_hint(dcpl_id, TRUE) == FAIL) + TEST_ERROR + if (H5Pget_dset_no_attrs_hint(dcpl_id, &minimize) == FAIL) + TEST_ERROR + if (TRUE != minimize) + TEST_ERROR + + /* error cases + */ + H5E_BEGIN_TRY { + ret = H5Pget_dset_no_attrs_hint(-1, &minimize); + } H5E_END_TRY; + if (ret == SUCCEED) + TEST_ERROR + + H5E_BEGIN_TRY { + ret = H5Pset_dset_no_attrs_hint(-1, FALSE); + } H5E_END_TRY; + if (ret == SUCCEED) + TEST_ERROR + + H5E_BEGIN_TRY { + ret = H5Pset_dset_no_attrs_hint(-1, TRUE); + } H5E_END_TRY; + if (ret == SUCCEED) + TEST_ERROR + + H5E_BEGIN_TRY { + ret = H5Pget_dset_no_attrs_hint(dcpl_id, NULL); + } H5E_END_TRY; + if (ret == SUCCEED) + TEST_ERROR + + /************/ + /* TEARDOWN */ + /************/ + + if (H5Fclose(file_id) == FAIL) + TEST_ERROR + + if (H5Pclose(dcpl_id) == FAIL) + TEST_ERROR + + PASSED(); + return SUCCEED; + +error: + H5E_BEGIN_TRY { + H5Pclose(dcpl_id); + H5Fclose(file_id); + } H5E_END_TRY; + return FAIL; +} /* end test_object_header_minimization_dcpl() */ /*------------------------------------------------------------------------- @@ -13056,6 +13182,7 @@ main(void) hid_t fcpl = -1, fcpl2 = -1; unsigned new_format; unsigned paged; + unsigned minimized_ohdr; int mdc_nelmts; size_t rdcc_nelmts; size_t rdcc_nbytes; @@ -13111,113 +13238,122 @@ main(void) if(!contig_addr_vfd && paged) continue; - /* Test with old & new format groups */ - for(new_format = FALSE; new_format <= TRUE; new_format++) { - hid_t my_fapl, my_fcpl; - - /* Set the FAPL for the type of format */ - if(new_format) { - my_fapl = fapl2; - if(paged) { - my_fcpl = fcpl2; - puts("\nTesting with new file format and paged aggregation"); - } else { - my_fcpl = fcpl; - puts("\nTesting with new file format and non-paged aggregation"); - } - } /* end if */ - else { - my_fapl = fapl; - if(paged) { - my_fcpl = fcpl2; - puts("Testing with old file format and paged aggregation:"); - } else { - my_fcpl = fcpl; - puts("Testing with old file format and non-paged aggregation:"); - } - } /* end else */ + for(minimized_ohdr = FALSE; minimized_ohdr <= TRUE; minimized_ohdr++) { + + /* Test with old & new format groups */ + for(new_format = FALSE; new_format <= TRUE; new_format++) { + hid_t my_fapl, my_fcpl; + + /* Set the FAPL for the type of format */ + if(new_format) { + my_fapl = fapl2; + if(paged) { + my_fcpl = fcpl2; + puts("\nTesting with new file format and paged aggregation"); + } else { + my_fcpl = fcpl; + puts("\nTesting with new file format and non-paged aggregation"); + } + } /* end if */ + else { + my_fapl = fapl; + if(paged) { + my_fcpl = fcpl2; + puts("Testing with old file format and paged aggregation:"); + } else { + my_fcpl = fcpl; + puts("Testing with old file format and non-paged aggregation:"); + } + } /* end else */ - /* Create the file for this test */ - if((file = H5Fcreate(filename, H5F_ACC_TRUNC, my_fcpl, my_fapl)) < 0) - goto error; + /* Create the file for this test */ + if((file = H5Fcreate(filename, H5F_ACC_TRUNC, my_fcpl, my_fapl)) < 0) + goto error; - /* Cause the library to emit initial messages */ - if((grp = H5Gcreate2(file, "emit diagnostics", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - goto error; - if(H5Oset_comment(grp, "Causes diagnostic messages to be emitted") < 0) - goto error; - if(H5Gclose(grp) < 0) - goto error; + if (TRUE == minimized_ohdr) { + if (0 > H5Fset_dset_no_attrs_hint(file, TRUE)) + goto error; + puts("(minimized dataset object headers with file setting)"); + } - nerrors += (test_create(file) < 0 ? 1 : 0); - nerrors += (test_simple_io(envval, my_fapl) < 0 ? 1 : 0); - nerrors += (test_compact_io(my_fapl) < 0 ? 1 : 0); - nerrors += (test_max_compact(my_fapl) < 0 ? 1 : 0); - nerrors += (test_compact_open_close_dirty(my_fapl) < 0 ? 1 : 0); - nerrors += (test_conv_buffer(file) < 0 ? 1 : 0); - nerrors += (test_tconv(file) < 0 ? 1 : 0); - nerrors += (test_filters(file, my_fapl) < 0 ? 1 : 0); - nerrors += (test_onebyte_shuffle(file) < 0 ? 1 : 0); - nerrors += (test_nbit_int(file) < 0 ? 1 : 0); - nerrors += (test_nbit_float(file) < 0 ? 1 : 0); - nerrors += (test_nbit_double(file) < 0 ? 1 : 0); - nerrors += (test_nbit_array(file) < 0 ? 1 : 0); - nerrors += (test_nbit_compound(file) < 0 ? 1 : 0); - nerrors += (test_nbit_compound_2(file) < 0 ? 1 : 0); - nerrors += (test_nbit_compound_3(file) < 0 ? 1 : 0); - nerrors += (test_nbit_int_size(file) < 0 ? 1 : 0); - nerrors += (test_nbit_flt_size(file) < 0 ? 1 : 0); - nerrors += (test_scaleoffset_int(file) < 0 ? 1 : 0); - nerrors += (test_scaleoffset_int_2(file) < 0 ? 1 : 0); - nerrors += (test_scaleoffset_float(file) < 0 ? 1 : 0); - nerrors += (test_scaleoffset_float_2(file) < 0 ? 1 : 0); - nerrors += (test_scaleoffset_double(file) < 0 ? 1 : 0); - nerrors += (test_scaleoffset_double_2(file) < 0 ? 1 : 0); - nerrors += (test_multiopen (file) < 0 ? 1 : 0); - nerrors += (test_types(file) < 0 ? 1 : 0); - nerrors += (test_userblock_offset(envval, my_fapl, new_format) < 0 ? 1 : 0); - nerrors += (test_missing_filter(file) < 0 ? 1 : 0); - nerrors += (test_can_apply(file) < 0 ? 1 : 0); - nerrors += (test_can_apply2(file) < 0 ? 1 : 0); - nerrors += (test_set_local(my_fapl) < 0 ? 1 : 0); - nerrors += (test_can_apply_szip(file) < 0 ? 1 : 0); - nerrors += (test_compare_dcpl(file) < 0 ? 1 : 0); - nerrors += (test_copy_dcpl(file, my_fapl) < 0 ? 1 : 0); - nerrors += (test_filter_delete(file) < 0 ? 1 : 0); - nerrors += (test_filters_endianess() < 0 ? 1 : 0); - nerrors += (test_zero_dims(file) < 0 ? 1 : 0); - nerrors += (test_missing_chunk(file) < 0 ? 1 : 0); - nerrors += (test_random_chunks(my_fapl) < 0 ? 1 : 0); + /* Cause the library to emit initial messages */ + if((grp = H5Gcreate2(file, "emit diagnostics", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto error; + if(H5Oset_comment(grp, "Causes diagnostic messages to be emitted") < 0) + goto error; + if(H5Gclose(grp) < 0) + goto error; + + nerrors += (test_create(file) < 0 ? 1 : 0); + nerrors += (test_simple_io(envval, my_fapl) < 0 ? 1 : 0); + nerrors += (test_compact_io(my_fapl) < 0 ? 1 : 0); + nerrors += (test_max_compact(my_fapl) < 0 ? 1 : 0); + nerrors += (test_compact_open_close_dirty(my_fapl) < 0 ? 1 : 0); + nerrors += (test_conv_buffer(file) < 0 ? 1 : 0); + nerrors += (test_tconv(file) < 0 ? 1 : 0); + nerrors += (test_filters(file, my_fapl) < 0 ? 1 : 0); + nerrors += (test_onebyte_shuffle(file) < 0 ? 1 : 0); + nerrors += (test_nbit_int(file) < 0 ? 1 : 0); + nerrors += (test_nbit_float(file) < 0 ? 1 : 0); + nerrors += (test_nbit_double(file) < 0 ? 1 : 0); + nerrors += (test_nbit_array(file) < 0 ? 1 : 0); + nerrors += (test_nbit_compound(file) < 0 ? 1 : 0); + nerrors += (test_nbit_compound_2(file) < 0 ? 1 : 0); + nerrors += (test_nbit_compound_3(file) < 0 ? 1 : 0); + nerrors += (test_nbit_int_size(file) < 0 ? 1 : 0); + nerrors += (test_nbit_flt_size(file) < 0 ? 1 : 0); + nerrors += (test_scaleoffset_int(file) < 0 ? 1 : 0); + nerrors += (test_scaleoffset_int_2(file) < 0 ? 1 : 0); + nerrors += (test_scaleoffset_float(file) < 0 ? 1 : 0); + nerrors += (test_scaleoffset_float_2(file) < 0 ? 1 : 0); + nerrors += (test_scaleoffset_double(file) < 0 ? 1 : 0); + nerrors += (test_scaleoffset_double_2(file) < 0 ? 1 : 0); + nerrors += (test_multiopen (file) < 0 ? 1 : 0); + nerrors += (test_types(file) < 0 ? 1 : 0); + nerrors += (test_userblock_offset(envval, my_fapl, new_format) < 0 ? 1 : 0); + nerrors += (test_missing_filter(file) < 0 ? 1 : 0); + nerrors += (test_can_apply(file) < 0 ? 1 : 0); + nerrors += (test_can_apply2(file) < 0 ? 1 : 0); + nerrors += (test_set_local(my_fapl) < 0 ? 1 : 0); + nerrors += (test_can_apply_szip(file) < 0 ? 1 : 0); + nerrors += (test_compare_dcpl(file) < 0 ? 1 : 0); + nerrors += (test_copy_dcpl(file, my_fapl) < 0 ? 1 : 0); + nerrors += (test_filter_delete(file) < 0 ? 1 : 0); + nerrors += (test_filters_endianess() < 0 ? 1 : 0); + nerrors += (test_zero_dims(file) < 0 ? 1 : 0); + nerrors += (test_missing_chunk(file) < 0 ? 1 : 0); + nerrors += (test_random_chunks(my_fapl) < 0 ? 1 : 0); #ifndef H5_NO_DEPRECATED_SYMBOLS - nerrors += (test_deprec(file) < 0 ? 1 : 0); + nerrors += (test_deprec(file) < 0 ? 1 : 0); #endif /* H5_NO_DEPRECATED_SYMBOLS */ - nerrors += (test_huge_chunks(my_fapl) < 0 ? 1 : 0); - nerrors += (test_chunk_cache(my_fapl) < 0 ? 1 : 0); - nerrors += (test_big_chunks_bypass_cache(my_fapl) < 0 ? 1 : 0); - nerrors += (test_chunk_fast(envval, my_fapl) < 0 ? 1 : 0); - nerrors += (test_reopen_chunk_fast(my_fapl) < 0 ? 1 : 0); - nerrors += (test_chunk_fast_bug1(my_fapl) < 0 ? 1 : 0); - nerrors += (test_chunk_expand(my_fapl) < 0 ? 1 : 0); - nerrors += (test_layout_extend(my_fapl) < 0 ? 1 : 0); - nerrors += (test_fixed_array(my_fapl) < 0 ? 1 : 0); - nerrors += (test_idx_compatible() < 0 ? 1 : 0); - nerrors += (test_unfiltered_edge_chunks(my_fapl) < 0 ? 1 : 0); - nerrors += (test_single_chunk(my_fapl) < 0 ? 1 : 0); - nerrors += (test_large_chunk_shrink(my_fapl) < 0 ? 1 : 0); - nerrors += (test_zero_dim_dset(my_fapl) < 0 ? 1 : 0); - nerrors += (test_storage_size(my_fapl) < 0 ? 1 : 0); - nerrors += (test_power2up(my_fapl) < 0 ? 1 : 0); - - nerrors += (test_swmr_non_latest(envval, my_fapl) < 0 ? 1 : 0); - nerrors += (test_earray_hdr_fd(envval, my_fapl) < 0 ? 1 : 0); - nerrors += (test_farray_hdr_fd(envval, my_fapl) < 0 ? 1 : 0); - nerrors += (test_bt2_hdr_fd(envval, my_fapl) < 0 ? 1 : 0); - - if(H5Fclose(file) < 0) - goto error; - } /* end for new_format */ + nerrors += (test_huge_chunks(my_fapl) < 0 ? 1 : 0); + nerrors += (test_chunk_cache(my_fapl) < 0 ? 1 : 0); + nerrors += (test_big_chunks_bypass_cache(my_fapl) < 0 ? 1 : 0); + nerrors += (test_chunk_fast(envval, my_fapl) < 0 ? 1 : 0); + nerrors += (test_reopen_chunk_fast(my_fapl) < 0 ? 1 : 0); + nerrors += (test_chunk_fast_bug1(my_fapl) < 0 ? 1 : 0); + nerrors += (test_chunk_expand(my_fapl) < 0 ? 1 : 0); + nerrors += (test_layout_extend(my_fapl) < 0 ? 1 : 0); + nerrors += (test_fixed_array(my_fapl) < 0 ? 1 : 0); + nerrors += (test_idx_compatible() < 0 ? 1 : 0); + nerrors += (test_unfiltered_edge_chunks(my_fapl) < 0 ? 1 : 0); + nerrors += (test_single_chunk(my_fapl) < 0 ? 1 : 0); + nerrors += (test_large_chunk_shrink(my_fapl) < 0 ? 1 : 0); + nerrors += (test_zero_dim_dset(my_fapl) < 0 ? 1 : 0); + nerrors += (test_storage_size(my_fapl) < 0 ? 1 : 0); + nerrors += (test_power2up(my_fapl) < 0 ? 1 : 0); + + nerrors += (test_swmr_non_latest(envval, my_fapl) < 0 ? 1 : 0); + nerrors += (test_earray_hdr_fd(envval, my_fapl) < 0 ? 1 : 0); + nerrors += (test_farray_hdr_fd(envval, my_fapl) < 0 ? 1 : 0); + nerrors += (test_bt2_hdr_fd(envval, my_fapl) < 0 ? 1 : 0); + + if(H5Fclose(file) < 0) + goto error; + } /* end for new_format */ + } /* end for minimized_ohdr */ } /* end for paged */ /* Close property lists */ @@ -13232,7 +13368,9 @@ main(void) nerrors += (test_gather_error() < 0 ? 1 : 0); /* Tests version bounds using its own file */ - nerrors += (test_versionbounds() < 0 ? 1 : 0); + nerrors += (test_versionbounds() < 0 ? 1 : 0); + + nerrors += (test_object_header_minimization_dcpl(fapl) < 0 ? 1 : 0); /* Run misc tests */ nerrors += dls_01_main(); @@ -13249,12 +13387,12 @@ main(void) #endif /* H5_HAVE_FILTER_SZIP */ h5_cleanup(FILENAME, fapl); - return 0; + return EXIT_SUCCESS; error: nerrors = MAX(1, nerrors); printf("***** %d DATASET TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S"); - return 1; -} + return EXIT_FAILURE; +} /* end main() */ |