summaryrefslogtreecommitdiffstats
path: root/test/th5s.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/th5s.c')
-rw-r--r--test/th5s.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/test/th5s.c b/test/th5s.c
index a38e384..d999920 100644
--- a/test/th5s.c
+++ b/test/th5s.c
@@ -173,13 +173,8 @@ test_h5s_basic(void)
* the instructions in space_overflow.c for regenerating the th5s.h5 file.
*/
{
- char testfile[512]="";
- char *srcdir = HDgetenv("srcdir");
- if (srcdir && ((HDstrlen(srcdir) + HDstrlen(TESTFILE) + 1) < sizeof(testfile))){
- HDstrcpy(testfile, srcdir);
- HDstrcat(testfile, "/");
- }
- HDstrcat(testfile, TESTFILE);
+ const char *testfile = H5_get_srcdir_filename(TESTFILE); /* Corrected test file name */
+
fid1 = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT);
CHECK_I(fid1, "H5Fopen");
if (fid1 >= 0){