diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/CMakeLists.txt | 14 | ||||
-rw-r--r-- | test/H5srcdir.h | 11 | ||||
-rw-r--r-- | test/h5test.c | 20 | ||||
-rw-r--r-- | test/links.c | 116 | ||||
-rw-r--r-- | test/links_env.c | 1 |
5 files changed, 80 insertions, 82 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 766ed7b..741976b 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -27,6 +27,7 @@ SET (TEST_LIB_HEADERS ) ADD_LIBRARY (${HDF5_TEST_LIB_TARGET} ${LIB_TYPE} ${TEST_LIB_SRCS} ${TEST_LIB_HEADERS}) +TARGET_C_PROPERTIES (${HDF5_TEST_LIB_TARGET} " " " ") IF (MSVC) TARGET_LINK_LIBRARIES (${HDF5_TEST_LIB_TARGET} "ws2_32.lib") ENDIF (MSVC) @@ -64,6 +65,7 @@ IF (BUILD_SHARED_LIBS) INCLUDE_DIRECTORIES (${HDF5_SRC_DIR}) ADD_LIBRARY (${HDF5_TEST_PLUGIN_LIB_TARGET} ${LIB_TYPE} ${HDF5_TEST_SOURCE_DIR}/${test_lib}.c) + TARGET_C_PROPERTIES (${HDF5_TEST_PLUGIN_LIB_TARGET} " " " ") TARGET_LINK_LIBRARIES (${HDF5_TEST_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) H5_SET_LIB_OPTIONS ( ${HDF5_TEST_PLUGIN_LIB_TARGET} ${HDF5_TEST_PLUGIN_LIB_NAME} @@ -94,6 +96,7 @@ IF (BUILD_SHARED_LIBS) INCLUDE_DIRECTORIES (${HDF5_SRC_DIR}) ADD_LIBRARY (${HDF5_TEST_PLUGIN_LIB_TARGET} ${LIB_TYPE} ${HDF5_TEST_SOURCE_DIR}/${test_lib}.c) + TARGET_C_PROPERTIES (${HDF5_TEST_PLUGIN_LIB_TARGET} " " " ") TARGET_LINK_LIBRARIES (${HDF5_TEST_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) H5_SET_LIB_OPTIONS ( ${HDF5_TEST_PLUGIN_LIB_TARGET} ${HDF5_TEST_PLUGIN_LIB_NAME} @@ -279,6 +282,7 @@ SET (testhdf5_SRCS #-- Adding test for testhdf5 ADD_EXECUTABLE (testhdf5 ${testhdf5_SRCS}) TARGET_NAMING (testhdf5 ${LIB_TYPE}) +TARGET_C_PROPERTIES (testhdf5 " " " ") TARGET_LINK_LIBRARIES (testhdf5 ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET}) SET_TARGET_PROPERTIES (testhdf5 PROPERTIES FOLDER test) @@ -331,6 +335,7 @@ ENDIF (HDF5_ENABLE_USING_MEMCHECKER) MACRO (ADD_H5_TEST file) ADD_EXECUTABLE (${file} ${HDF5_TEST_SOURCE_DIR}/${file}.c) TARGET_NAMING (${file} ${LIB_TYPE}) + TARGET_C_PROPERTIES (${file} " " " ") TARGET_LINK_LIBRARIES (${file} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET}) SET_TARGET_PROPERTIES (${file} PROPERTIES FOLDER test) @@ -474,6 +479,7 @@ SET_TESTS_PROPERTIES(flush2 PROPERTIES DEPENDS flush1) #-- Adding test for cache ADD_EXECUTABLE (cache ${HDF5_TEST_SOURCE_DIR}/cache.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c) TARGET_NAMING (cache ${LIB_TYPE}) +TARGET_C_PROPERTIES (cache " " " ") TARGET_LINK_LIBRARIES (cache ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) SET_TARGET_PROPERTIES (cache PROPERTIES FOLDER test) ADD_TEST ( @@ -488,6 +494,7 @@ SET_TESTS_PROPERTIES(cache PROPERTIES DEPENDS h5test-clear-cache-objects) #-- Adding test for cache_api ADD_EXECUTABLE (cache_api ${HDF5_TEST_SOURCE_DIR}/cache_api.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c) TARGET_NAMING (cache_api ${LIB_TYPE}) +TARGET_C_PROPERTIES (cache_api " " " ") TARGET_LINK_LIBRARIES (cache_api ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) SET_TARGET_PROPERTIES (cache_api PROPERTIES FOLDER test) @@ -503,6 +510,7 @@ SET_TESTS_PROPERTIES(cache_api PROPERTIES DEPENDS h5test-clear-cache_api-objects #-- Adding test for cache_tagging ADD_EXECUTABLE (cache_tagging ${HDF5_TEST_SOURCE_DIR}/cache_tagging.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c) TARGET_NAMING (cache_tagging ${LIB_TYPE}) +TARGET_C_PROPERTIES (cache_tagging " " " ") TARGET_LINK_LIBRARIES (cache_tagging ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) SET_TARGET_PROPERTIES (cache_tagging PROPERTIES FOLDER test) @@ -525,6 +533,7 @@ ADD_EXECUTABLE (ttsafe ${HDF5_TEST_SOURCE_DIR}/ttsafe_acreate.c ) TARGET_NAMING (ttsafe ${LIB_TYPE}) +TARGET_C_PROPERTIES (ttsafe " " " ") TARGET_LINK_LIBRARIES (ttsafe ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) SET_TARGET_PROPERTIES (ttsafe PROPERTIES FOLDER test) @@ -544,6 +553,7 @@ SET_TESTS_PROPERTIES(ttsafe PROPERTIES DEPENDS h5test-clear-ttsafe-objects) IF (HDF5_ENABLE_DEPRECATED_SYMBOLS) ADD_EXECUTABLE (err_compat ${HDF5_TEST_SOURCE_DIR}/err_compat.c) TARGET_NAMING (err_compat ${LIB_TYPE}) + TARGET_C_PROPERTIES (err_compat " " " ") TARGET_LINK_LIBRARIES (err_compat ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) SET_TARGET_PROPERTIES (err_compat PROPERTIES FOLDER test) @@ -570,6 +580,7 @@ ENDIF (HDF5_ENABLE_DEPRECATED_SYMBOLS) #-- Adding test for error_test ADD_EXECUTABLE (error_test ${HDF5_TEST_SOURCE_DIR}/error_test.c) TARGET_NAMING (error_test ${LIB_TYPE}) +TARGET_C_PROPERTIES (error_test " " " ") TARGET_LINK_LIBRARIES (error_test ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) SET_TARGET_PROPERTIES (error_test PROPERTIES FOLDER test) @@ -596,6 +607,7 @@ SET_TESTS_PROPERTIES (error_test PROPERTIES ENVIRONMENT "HDF5_PLUGIN_PRELOAD=::" #-- Adding test for links_env ADD_EXECUTABLE (links_env ${HDF5_TEST_SOURCE_DIR}/links_env.c) TARGET_NAMING (links_env ${LIB_TYPE}) +TARGET_C_PROPERTIES (links_env " " " ") TARGET_LINK_LIBRARIES (links_env ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) SET_TARGET_PROPERTIES (links_env PROPERTIES FOLDER test) @@ -649,6 +661,7 @@ IF (BUILD_SHARED_LIBS) ADD_EXECUTABLE (plugin ${HDF5_TEST_SOURCE_DIR}/plugin.c) TARGET_NAMING (plugin ${LIB_TYPE}) + TARGET_C_PROPERTIES (plugin " " " ") TARGET_LINK_LIBRARIES (plugin ${HDF5_TEST_PLUGIN_LIB_TARGET}) SET_TARGET_PROPERTIES (plugin PROPERTIES FOLDER test) @@ -784,6 +797,7 @@ IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) MACRO (ADD_H5_GENERATOR genfile) ADD_EXECUTABLE (${genfile} ${HDF5_TEST_SOURCE_DIR}/${genfile}.c) TARGET_NAMING (${genfile} ${LIB_TYPE}) + TARGET_C_PROPERTIES (${genfile} " " " ") TARGET_LINK_LIBRARIES (${genfile} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET}) SET_TARGET_PROPERTIES (${genfile} PROPERTIES FOLDER generator/test) ENDMACRO (ADD_H5_GENERATOR genfile) diff --git a/test/H5srcdir.h b/test/H5srcdir.h index 8bc8780..202d050 100644 --- a/test/H5srcdir.h +++ b/test/H5srcdir.h @@ -50,10 +50,12 @@ static const char *H5_get_srcdir_filename(const char *filename) #ifdef H5_VMS if(filename[0] == '[') { char *tmp = filename; - srcdir_testpath[strlen(srcdir)-1] = '\0'; - strcat(srcdir_testpath, ++tmp); - } else - strcat(srcdir_testpath, filename); + + srcdir_testpath[HDstrlen(srcdir) - 1] = '\0'; + HDstrcat(srcdir_testpath, ++tmp); + } /* end if */ + else + HDstrcat(srcdir_testpath, filename); #else HDstrcat(srcdir_testpath, "/"); HDstrcat(srcdir_testpath, filename); @@ -84,4 +86,3 @@ static const char *H5_get_srcdir(void) } #endif /* _H5SRCDIR_H */ - diff --git a/test/h5test.c b/test/h5test.c index 91497e3..32d78bd 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -1124,24 +1124,8 @@ h5_make_local_copy(const char *origfilename, const char *local_copy_name) { int fd_old = (-1), fd_new = (-1); /* File descriptors for copying data */ ssize_t nread; /* Number of bytes read in */ - char buf[READ_BUF_SIZE]; /* Buffer for copying data */ - char filename[FILENAME_BUF_SIZE] = ""; -#ifdef H5_VMS - HDstrcat(filename, origfilename); -#else - const char * srcdir = HDgetenv("srcdir"); /* The source directory */ - - /* Check for using the srcdir from configure time */ - if(NULL == srcdir) - srcdir = config_srcdir; - - if(srcdir && ((HDstrlen(srcdir) + - HDstrlen(origfilename) + 6) < FILENAME_BUF_SIZE)) { - HDstrcpy(filename, srcdir); - HDstrcat(filename, "/"); - } - HDstrcat(filename, origfilename); -#endif + char buf[READ_BUF_SIZE]; /* Buffer for copying data */ + const char *filename = H5_get_srcdir_filename(origfilename);; /* Get the test file name to copy */ /* Copy old file into temporary file */ if((fd_old = HDopen(filename, O_RDONLY, 0666)) < 0) return -1; diff --git a/test/links.c b/test/links.c index 19b620a..6aad164 100644 --- a/test/links.c +++ b/test/links.c @@ -558,8 +558,8 @@ cklinks(hid_t fapl, hbool_t new_format) } /* end if */ if(H5F_addr_ne(oinfo1.addr, oinfo2.addr)) { H5_FAILED(); - puts(" Hard link test failed. Link seems not to point to the "); - puts(" expected file location."); + HDputs(" Hard link test failed. Link seems not to point to the "); + HDputs(" expected file location."); TEST_ERROR } /* end if */ if(H5Lexists(file, "d1", H5P_DEFAULT) != TRUE) FAIL_STACK_ERROR @@ -574,14 +574,14 @@ cklinks(hid_t fapl, hbool_t new_format) } /* end if */ if(H5F_addr_ne(oinfo1.addr, oinfo2.addr)) { H5_FAILED(); - puts(" Soft link test failed. Link seems not to point to the "); - puts(" expected file location."); + HDputs(" Soft link test failed. Link seems not to point to the "); + HDputs(" expected file location."); TEST_ERROR } /* end if */ if(H5Lget_val(file, "grp1/soft", linkval, sizeof linkval, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(HDstrcmp(linkval, "/d1")) { H5_FAILED(); - puts(" Soft link test failed. Wrong link value"); + HDputs(" Soft link test failed. Wrong link value"); TEST_ERROR } /* end if */ if(H5Lexists(file, "grp1/soft", H5P_DEFAULT) != TRUE) FAIL_STACK_ERROR @@ -592,7 +592,7 @@ cklinks(hid_t fapl, hbool_t new_format) } H5E_END_TRY; if(status >= 0) { H5_FAILED(); - puts(" H5Oget_info_by_name() should have failed for a dangling link."); + HDputs(" H5Oget_info_by_name() should have failed for a dangling link."); TEST_ERROR } /* end if */ if(H5Lget_info(file, "grp1/dangle", &linfo2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR @@ -608,7 +608,7 @@ cklinks(hid_t fapl, hbool_t new_format) } /* end if */ if(HDstrcmp(linkval, "foobar")) { H5_FAILED(); - puts(" Dangling link test failed. Wrong link value"); + HDputs(" Dangling link test failed. Wrong link value"); TEST_ERROR } /* end if */ if(H5Lexists(file, "grp1/dangle", H5P_DEFAULT) != TRUE) FAIL_STACK_ERROR @@ -619,7 +619,7 @@ cklinks(hid_t fapl, hbool_t new_format) } H5E_END_TRY; if(status >= 0) { H5_FAILED(); - puts(" H5Oget_info_by_name() should have failed for a recursive link."); + HDputs(" H5Oget_info_by_name() should have failed for a recursive link."); TEST_ERROR } /* end if */ if(H5Lget_info(file, "grp1/recursive", &linfo2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR @@ -635,7 +635,7 @@ cklinks(hid_t fapl, hbool_t new_format) } /* end if */ if(HDstrcmp(linkval, "/grp1/recursive")) { H5_FAILED(); - puts(" Recursive link test failed. Wrong link value"); + HDputs(" Recursive link test failed. Wrong link value"); TEST_ERROR } /* end if */ @@ -700,8 +700,8 @@ ck_new_links(hid_t fapl, hbool_t new_format) } if(H5F_addr_ne(oi_dset.addr, oi_hard1.addr) || H5F_addr_ne(oi_dset.addr, oi_hard2.addr)) { H5_FAILED(); - puts(" Hard link test failed. Link seems not to point to the "); - puts(" expected file location."); + HDputs(" Hard link test failed. Link seems not to point to the "); + HDputs(" expected file location."); TEST_ERROR } @@ -905,7 +905,7 @@ toomany(hid_t fapl, hbool_t new_format) } H5E_END_TRY; if(gid >= 0) { H5_FAILED(); - puts(" Should have failed for sequence of too many nested links."); + HDputs(" Should have failed for sequence of too many nested links."); TEST_ERROR } /* end if */ @@ -1189,7 +1189,7 @@ test_move(hid_t fapl, hbool_t new_format) } H5E_END_TRY; if(moved_grp >= 0) { H5_FAILED(); - puts(" Group still in original location?"); + HDputs(" Group still in original location?"); TEST_ERROR } /* end if */ @@ -1684,8 +1684,8 @@ test_deprec(hid_t fapl, hbool_t new_format) if(HDmemcmp(&sb_hard1.objno, sb_hard2.objno, sizeof(sb_hard1.objno))) { H5_FAILED(); - puts(" Hard link test failed. Link seems not to point to the "); - puts(" expected file location."); + HDputs(" Hard link test failed. Link seems not to point to the "); + HDputs(" expected file location."); TEST_ERROR } /* end if */ @@ -1695,8 +1695,8 @@ test_deprec(hid_t fapl, hbool_t new_format) if(HDmemcmp(&sb_hard1.objno, sb_hard2.objno, sizeof(sb_hard1.objno))) { H5_FAILED(); - puts(" Hard link test failed. Link seems not to point to the "); - puts(" expected file location."); + HDputs(" Hard link test failed. Link seems not to point to the "); + HDputs(" expected file location."); TEST_ERROR } /* end if */ @@ -1812,19 +1812,19 @@ external_link_root(hid_t fapl, hbool_t new_format) if(H5Lget_info(fid, "ext_link", &linfo, H5P_DEFAULT) < 0) goto error; if(H5L_TYPE_EXTERNAL != linfo.type) { H5_FAILED(); - puts(" Unexpected object type - should have been an external link"); + HDputs(" Unexpected object type - should have been an external link"); goto error; } if(H5Lget_val(fid, "ext_link", objname, sizeof(objname), H5P_DEFAULT) < 0) TEST_ERROR if(H5Lunpack_elink_val(objname, linfo.u.val_size, NULL, &file, &path) < 0) TEST_ERROR if(HDstrcmp(file, filename1)) { H5_FAILED(); - puts(" External link file name incorrect"); + HDputs(" External link file name incorrect"); goto error; } if(HDstrcmp(path, "/")) { H5_FAILED(); - puts(" External link path incorrect"); + HDputs(" External link path incorrect"); goto error; } @@ -1836,19 +1836,19 @@ external_link_root(hid_t fapl, hbool_t new_format) if(H5Lget_info(fid, "ext_link", &linfo, H5P_DEFAULT) < 0) goto error; if(H5L_TYPE_EXTERNAL != linfo.type) { H5_FAILED(); - puts(" Unexpected object type - should have been an external link"); + HDputs(" Unexpected object type - should have been an external link"); goto error; } if(H5Lget_val(fid, "ext_link", objname, sizeof(objname), H5P_DEFAULT) < 0) TEST_ERROR if(H5Lunpack_elink_val(objname, linfo.u.val_size, NULL, &file, &path) < 0) TEST_ERROR if(HDstrcmp(file, filename1)) { H5_FAILED(); - puts(" External link file name incorrect"); + HDputs(" External link file name incorrect"); goto error; } if(HDstrcmp(path, "/")) { H5_FAILED(); - puts(" External link path incorrect"); + HDputs(" External link path incorrect"); goto error; } @@ -2693,7 +2693,7 @@ external_link_dangling(hid_t fapl, hbool_t new_format) } H5E_END_TRY; if (gid >= 0) { H5_FAILED(); - puts(" Should have failed for sequence of too many nested links."); + HDputs(" Should have failed for sequence of too many nested links."); goto error; } @@ -2703,7 +2703,7 @@ external_link_dangling(hid_t fapl, hbool_t new_format) } H5E_END_TRY; if (gid >= 0) { H5_FAILED(); - puts(" Should have failed for sequence of too many nested links."); + HDputs(" Should have failed for sequence of too many nested links."); goto error; } @@ -2713,7 +2713,7 @@ external_link_dangling(hid_t fapl, hbool_t new_format) } H5E_END_TRY; if (status >= 0) { H5_FAILED(); - puts(" Retreiving name of object by index through dangling file external link should have failed."); + HDputs(" Retreiving name of object by index through dangling file external link should have failed."); } /* end if */ /* Close root group */ @@ -2810,7 +2810,7 @@ external_link_prefix(hid_t fapl, hbool_t new_format) /* should be able to find the target file from pathnames set via H5Pset_elink_prefix() */ if (gid < 0) { H5_FAILED(); - puts(" Should have found the file in tmp directory."); + HDputs(" Should have found the file in tmp directory."); goto error; } @@ -2905,7 +2905,7 @@ external_link_abs_mainpath(hid_t fapl, hbool_t new_format) /* should be able to find the target file from absolute path set for main file */ if(gid < 0) { H5_FAILED(); - puts(" Should have found the file in tmp directory."); + HDputs(" Should have found the file in tmp directory."); goto error; } @@ -2991,7 +2991,7 @@ external_link_rel_mainpath(hid_t fapl, hbool_t new_format) /* should be able to find the target file from the main file's relative pathname */ if (gid < 0) { H5_FAILED(); - puts(" Should have found the file in current working directory"); + HDputs(" Should have found the file in current working directory"); goto error; } @@ -3083,7 +3083,7 @@ external_link_cwd(hid_t fapl, hbool_t new_format) /* should be able to find the target file from the current working directory */ if(gid < 0) { H5_FAILED(); - puts(" Should have found the file in current working directory"); + HDputs(" Should have found the file in current working directory"); goto error; } @@ -3179,7 +3179,7 @@ external_link_abstar(hid_t fapl, hbool_t new_format) /* should be able to find the target file with abolute path */ if(gid < 0) { H5_FAILED(); - puts(" Should have found the file in tmp directory."); + HDputs(" Should have found the file in tmp directory."); goto error; } @@ -3273,7 +3273,7 @@ external_link_abstar_cur(hid_t fapl, hbool_t new_format) /* should be able to find the target file from main file's current working directory */ if (gid < 0) { H5_FAILED(); - puts(" Should have found the file in current working directory."); + HDputs(" Should have found the file in current working directory."); goto error; } @@ -3353,7 +3353,7 @@ external_link_reltar(hid_t fapl, hbool_t new_format) /* Open object through external link */ if((gid = H5Gopen2(fid, "ext_link", H5P_DEFAULT)) < 0) { H5_FAILED(); - puts(" Should have found the file in tmp directory."); + HDputs(" Should have found the file in tmp directory."); goto error; } /* end if */ @@ -3450,7 +3450,7 @@ external_link_chdir(hid_t fapl, hbool_t new_format) */ if (gid < 0) { H5_FAILED(); - puts(" Should have found the file in tmp directory."); + HDputs(" Should have found the file in tmp directory."); goto error; } @@ -3625,7 +3625,7 @@ external_set_elink_fapl1(hid_t fapl, hbool_t new_format) /* should succeed in opening the target object A in the current working directory */ if (oidA < 0) { H5_FAILED(); - puts(" Should succeed in opening family target file A in current working directory"); + HDputs(" Should succeed in opening family target file A in current working directory"); goto error; } @@ -3639,7 +3639,7 @@ external_set_elink_fapl1(hid_t fapl, hbool_t new_format) /* should succeed in opening the target object B in the current working directory */ if (oidB < 0) { H5_FAILED(); - puts(" Should succeed in opening multi target file B in current working directory"); + HDputs(" Should succeed in opening multi target file B in current working directory"); goto error; } @@ -3785,7 +3785,7 @@ external_set_elink_fapl2(hid_t fapl, hbool_t new_format) did = H5Dopen2(fid, "ext_link", dapl_id); if(did < 0) { H5_FAILED(); - puts(" Should succeed in opening the target dataset"); + HDputs(" Should succeed in opening the target dataset"); goto error; } @@ -4371,7 +4371,7 @@ external_link_win1(hid_t fapl, hbool_t new_format) /* should be able to find the target file via main file's CWD*/ if(gid < 0) { H5_FAILED(); - puts(" Should have found the file in CWD."); + HDputs(" Should have found the file in CWD."); goto error; } @@ -4465,7 +4465,7 @@ external_link_win2(hid_t fapl, hbool_t new_format) /* should be able to find the target file directly */ if(gid < 0) { H5_FAILED(); - puts(" Should have found the file in tmp."); + HDputs(" Should have found the file in tmp."); goto error; } @@ -4558,7 +4558,7 @@ external_link_win3(hid_t fapl, hbool_t new_format) /* should be able to find the target file directly */ if (gid < 0) { H5_FAILED(); - puts(" Should have found the file in tmp."); + HDputs(" Should have found the file in tmp."); goto error; } @@ -4647,7 +4647,7 @@ external_link_win4(hid_t fapl, hbool_t new_format) /* should be able to find the target file via main file's absolute drive/relative path */ if (gid < 0) { H5_FAILED(); - puts(" Should have found the file in CWD."); + HDputs(" Should have found the file in CWD."); goto error; } @@ -4743,7 +4743,7 @@ external_link_win5(hid_t fapl, hbool_t new_format) /* should be able to find the target file via main file's rel drive/abs path */ if(gid < 0) { H5_FAILED(); - puts(" Should have found the file in CWD."); + HDputs(" Should have found the file in CWD."); goto error; } @@ -4836,7 +4836,7 @@ external_link_win6(hid_t fapl, hbool_t new_format) /* should be able to find the target file via target file's rel path in current drive */ if (gid < 0) { H5_FAILED(); - puts(" Should have found the file in tmp."); + HDputs(" Should have found the file in tmp."); goto error; } @@ -4923,7 +4923,7 @@ external_link_win7(hid_t fapl, hbool_t new_format) /* should be able to find the target file via main file's local host/main drive*/ if(gid < 0) { H5_FAILED(); - puts(" Should have found the file in local host/main drive."); + HDputs(" Should have found the file in local host/main drive."); goto error; } @@ -5015,7 +5015,7 @@ external_link_win8(hid_t fapl, hbool_t new_format) /* should be able to find the target file directly */ if(gid < 0) { H5_FAILED(); - puts(" Should have found the file in tmp."); + HDputs(" Should have found the file in tmp."); goto error; } @@ -5102,7 +5102,7 @@ external_link_win9(hid_t fapl, hbool_t new_format) /* should be able to find the target file via main file's local host/main drive*/ if(gid < 0) { H5_FAILED(); - puts(" Should have found the file in local host/main drive."); + HDputs(" Should have found the file in local host/main drive."); goto error; } @@ -5173,7 +5173,7 @@ external_link_recursive(hid_t fapl, hbool_t new_format) } H5E_END_TRY; if (gid >= 0) { H5_FAILED(); - puts(" Should have failed for recursive external links."); + HDputs(" Should have failed for recursive external links."); goto error; } @@ -5243,7 +5243,7 @@ external_link_query(hid_t fapl, hbool_t new_format) if(li.u.val_size != (1 + (HDstrlen(filename2) + 1) + (HDstrlen("/dst") + 1))) TEST_ERROR if (H5L_TYPE_EXTERNAL != li.type) { H5_FAILED(); - puts(" Unexpected link class - should have been an external link"); + HDputs(" Unexpected link class - should have been an external link"); goto error; } @@ -5269,7 +5269,7 @@ external_link_query(hid_t fapl, hbool_t new_format) if(li.u.val_size != (1 + (HDstrlen(filename2) + 1) + (HDstrlen("/dst") + 1))) TEST_ERROR if(H5L_TYPE_EXTERNAL != li.type) { H5_FAILED(); - puts(" Unexpected link class - should have been an external link"); + HDputs(" Unexpected link class - should have been an external link"); goto error; } @@ -5287,7 +5287,7 @@ external_link_query(hid_t fapl, hbool_t new_format) if(H5Oget_info_by_name(fid, "src", &oi, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(H5O_TYPE_GROUP != oi.type) { H5_FAILED(); - puts(" Unexpected object type - should have been a group"); + HDputs(" Unexpected object type - should have been a group"); goto error; } @@ -6510,7 +6510,7 @@ external_symlink(const char *env_h5_drvr, hid_t fapl, hbool_t new_format) } /* end if */ else { SKIPPED(); - puts(" Current VFD doesn't support POSIX I/O calls"); + HDputs(" Current VFD doesn't support POSIX I/O calls"); } /* end else */ return 0; @@ -6530,7 +6530,7 @@ external_symlink(const char *env_h5_drvr, hid_t fapl, hbool_t new_format) return -1; #else /* H5_HAVE_SYMLINK */ SKIPPED(); - puts(" Current file system or operating system doesn't support symbolic links"); + HDputs(" Current file system or operating system doesn't support symbolic links"); return 0; #endif /* H5_HAVE_SYMLINK */ @@ -7569,7 +7569,7 @@ ud_hard_links(hid_t fapl) if(li.u.val_size != 0) TEST_ERROR if(UD_HARD_TYPE != li.type) { H5_FAILED(); - puts(" Unexpected link class - should have been a UD hard link"); + HDputs(" Unexpected link class - should have been a UD hard link"); goto error; } /* end if */ @@ -7983,7 +7983,7 @@ ud_callbacks(hid_t fapl, hbool_t new_format) if(li.u.val_size != 16) TEST_ERROR if (UD_CB_TYPE != li.type) { H5_FAILED(); - puts(" Unexpected link class - should have been a UD hard link"); + HDputs(" Unexpected link class - should have been a UD hard link"); goto error; } @@ -8631,7 +8631,7 @@ lapl_nlinks(hid_t fapl, hbool_t new_format) } H5E_END_TRY; if (gid >= 0) { H5_FAILED(); - puts(" Should have failed for sequence of too many nested links."); + HDputs(" Should have failed for sequence of too many nested links."); goto error; } @@ -10146,7 +10146,7 @@ corder_create_empty(hid_t fapl) } H5E_END_TRY; if(ret > 0) { H5_FAILED(); - puts(" H5Pset_link_create_order() should have failed for a creation order index with no tracking."); + HDputs(" H5Pset_link_create_order() should have failed for a creation order index with no tracking."); TEST_ERROR } /* end if */ @@ -14702,7 +14702,7 @@ main(void) if(nerrors) { printf("***** %d LINK TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S"); - exit(1); + HDexit(1); } printf("All link tests passed.\n"); @@ -14717,7 +14717,7 @@ main(void) return 0; error: - puts("*** TESTS FAILED ***"); + HDputs("*** TESTS FAILED ***"); return 1; } diff --git a/test/links_env.c b/test/links_env.c index 2da5e64..308d562 100644 --- a/test/links_env.c +++ b/test/links_env.c @@ -21,7 +21,6 @@ #define H5G_TESTING #include "h5test.h" -#include "H5srcdir.h" #include "H5Gpkg.h" /* Groups */ #include "H5Iprivate.h" /* IDs */ #include "H5Lprivate.h" /* Links */ |