diff options
author | jhendersonHDF <jhenderson@hdfgroup.org> | 2023-05-26 20:29:02 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-26 20:29:02 (GMT) |
commit | 79bb60c3f6f67411e5d70b84743fc9f6b6143cbc (patch) | |
tree | dce0c97c567cb20eeb65de917e21347376979f18 /test/API/H5_api_file_test.c | |
parent | 77e64e0df46bb7498be014b1005efd49c4ad7518 (diff) | |
download | hdf5-79bb60c3f6f67411e5d70b84743fc9f6b6143cbc.zip hdf5-79bb60c3f6f67411e5d70b84743fc9f6b6143cbc.tar.gz hdf5-79bb60c3f6f67411e5d70b84743fc9f6b6143cbc.tar.bz2 |
API test updates (#3018)
* Remove macros from api tests (#2929)
* Remove macros and undefined callbacks (#2959)
* Remove remaining macros from H5_api_tests_disabled.h (#2968)
* Put some vol capability checks in testpar tests and remove remaining warnings (#2995)
* API tests datatype generation cleanup
* Clean up API tests' random datatype generation and fix bug with enum
datatype generation
* Init parallel API tests with MPI_THREAD_MULTIPLE
* HDF5 API tests - Check VOL connector registration
* Determine whether a VOL connector failed to load before running API
tests
* Cleanup some usages of H5VL_CAP_FLAG_CREATION_ORDER in API tests
* Remove some now-unused macros from H5_api_tests_disabled.h
* Enable HDF5 API tests by default
* Implement CMake option to install HDF5 API tests
* Check for invalid AAPL from H5Acreate
* Enable building of VOL connectors alongside HDF5 in CMake
* Prepend CMake VOL URL option indices with 0s so they come in order
* Don't turn on API tests by default yet
* Document VOL connector FetchContent functionality
* Add release note for API test updates
* Only install testing library if API tests are installed
* Fix grammar
Diffstat (limited to 'test/API/H5_api_file_test.c')
-rw-r--r-- | test/API/H5_api_file_test.c | 42 |
1 files changed, 9 insertions, 33 deletions
diff --git a/test/API/H5_api_file_test.c b/test/API/H5_api_file_test.c index 279e9e7..a8169e2 100644 --- a/test/API/H5_api_file_test.c +++ b/test/API/H5_api_file_test.c @@ -602,7 +602,7 @@ test_file_permission(void) !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES)) { SKIPPED(); - HDprintf(" API functions for basic file, group, dataset, attribute, stored datatype aren't " + HDprintf(" API functions for basic file, group, dataset, attribute, or stored datatype aren't " "supported with this connector\n"); return 0; } @@ -1597,8 +1597,9 @@ test_get_file_obj_count(void) !(vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) { SKIPPED(); - HDprintf(" API functions for basic or more file, basic dataset, group, datatype, or attribute " - "aren't supported with this connector\n"); + HDprintf( + " API functions for basic or more file, basic dataset, group, stored datatypes, or attribute " + "aren't supported with this connector\n"); return 0; } @@ -1742,7 +1743,7 @@ test_get_file_obj_count(void) PART_BEGIN(H5Fget_obj_count_types) { TESTING_2("H5Fget_obj_count for datatypes"); -#ifndef WRONG_DATATYPE_OBJ_COUNT + /* Get the number of named datatype in two opened files */ if ((obj_count = H5Fget_obj_count((hid_t)H5F_OBJ_ALL, H5F_OBJ_DATATYPE)) < 0) { H5_FAILED(); @@ -1758,10 +1759,6 @@ test_get_file_obj_count(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Fget_obj_count_types); -#endif } PART_END(H5Fget_obj_count_types); @@ -1833,7 +1830,7 @@ test_get_file_obj_count(void) PART_BEGIN(H5Fget_obj_count_all) { TESTING_2("H5Fget_obj_count for all object types"); -#ifndef WRONG_DATATYPE_OBJ_COUNT + /* Get the number of all open objects */ if ((obj_count = H5Fget_obj_count(H5F_OBJ_ALL, H5F_OBJ_ALL)) < 0) { H5_FAILED(); @@ -1848,10 +1845,6 @@ test_get_file_obj_count(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Fget_obj_count_all); -#endif } PART_END(H5Fget_obj_count_all); @@ -1930,7 +1923,6 @@ error: static int test_file_open_overlap(void) { -#ifndef NO_DOUBLE_OBJECT_OPENS ssize_t obj_count; hid_t file_id = H5I_INVALID_HID; hid_t file_id2 = H5I_INVALID_HID; @@ -1938,7 +1930,6 @@ test_file_open_overlap(void) hid_t dspace_id = H5I_INVALID_HID; hid_t dset_id = H5I_INVALID_HID; char *prefixed_filename = NULL; -#endif TESTING("overlapping file opens"); @@ -1951,7 +1942,6 @@ test_file_open_overlap(void) return 0; } -#ifndef NO_DOUBLE_OBJECT_OPENS if (prefix_filename(test_path_prefix, OVERLAPPING_FILENAME, &prefixed_filename) < 0) { H5_FAILED(); HDprintf(" couldn't prefix filename\n"); @@ -2062,10 +2052,6 @@ error: HDfree(prefixed_filename); return 1; -#else - SKIPPED(); - return 0; -#endif } /* @@ -2075,12 +2061,10 @@ error: static int test_file_mounts(void) { -#ifndef NO_FILE_MOUNTS hid_t file_id = H5I_INVALID_HID; hid_t child_fid = H5I_INVALID_HID; hid_t group_id = H5I_INVALID_HID; char *prefixed_filename = NULL; -#endif TESTING("file mounting/unmounting"); @@ -2093,7 +2077,6 @@ test_file_mounts(void) return 0; } -#ifndef NO_FILE_MOUNTS if (prefix_filename(test_path_prefix, FILE_MOUNT_TEST_FILENAME, &prefixed_filename) < 0) { H5_FAILED(); HDprintf(" couldn't prefix filename\n"); @@ -2158,10 +2141,6 @@ error: HDfree(prefixed_filename); return 1; -#else - SKIPPED(); - return 0; -#endif } /* @@ -2188,8 +2167,9 @@ test_get_file_name(void) !(vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) { SKIPPED(); - HDprintf(" API functions for basic or more file, basic dataset, group, datatype, or attribute " - "aren't supported with this connector\n"); + HDprintf( + " API functions for basic or more file, basic dataset, group, stored datatypes, or attribute " + "aren't supported with this connector\n"); return 0; } @@ -2523,9 +2503,7 @@ cleanup_files(void) /* The below file should not get created */ /* remove_test_file(test_path_prefix, FILE_CREATE_INVALID_PARAMS_FILE_NAME); */ -#ifndef NO_DOUBLE_OBJECT_OPENS remove_test_file(test_path_prefix, OVERLAPPING_FILENAME); -#endif remove_test_file(test_path_prefix, FILE_PERMISSION_TEST_FILENAME); remove_test_file(test_path_prefix, FILE_FLUSH_TEST_FILENAME); remove_test_file(test_path_prefix, FILE_PROPERTY_LIST_TEST_FNAME1); @@ -2533,9 +2511,7 @@ cleanup_files(void) remove_test_file(test_path_prefix, FILE_INTENT_TEST_FILENAME); remove_test_file(test_path_prefix, GET_OBJ_COUNT_TEST_FILENAME1); remove_test_file(test_path_prefix, GET_OBJ_COUNT_TEST_FILENAME2); -#ifndef NO_FILE_MOUNTS remove_test_file(test_path_prefix, FILE_MOUNT_TEST_FILENAME); -#endif remove_test_file(test_path_prefix, GET_FILE_NAME_TEST_FNAME); } |