summaryrefslogtreecommitdiffstats
path: root/test/mtime.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-03-25 03:51:41 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-03-25 03:51:41 (GMT)
commit42efc1c2b591e4cd45ec6cb3bdf32044343118d2 (patch)
tree0ab542871c32246199479e8933ff26286aaf629a /test/mtime.c
parent3360c3af0c100ac4d3a2fe2865f34661da862ec5 (diff)
downloadhdf5-42efc1c2b591e4cd45ec6cb3bdf32044343118d2.zip
hdf5-42efc1c2b591e4cd45ec6cb3bdf32044343118d2.tar.gz
hdf5-42efc1c2b591e4cd45ec6cb3bdf32044343118d2.tar.bz2
[svn-r18451] Description:
Bring r18172:18446 from trunk to revise_chunks branch. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Diffstat (limited to 'test/mtime.c')
-rw-r--r--test/mtime.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/test/mtime.c b/test/mtime.c
index 741f09a..cc04e42 100644
--- a/test/mtime.c
+++ b/test/mtime.c
@@ -23,6 +23,7 @@
* working properly.
*/
#include "h5test.h"
+#include "H5srcdir.h"
const char *FILENAME[] = {
"mtime",
@@ -131,14 +132,8 @@ main(void)
TESTING("accessing old modification time messages");
{
- char testfile[512]="";
- char *srcdir = HDgetenv("srcdir");
+ const char *testfile = H5_get_srcdir_filename(TESTFILE1); /* Corrected test file name */
- if(srcdir && ((HDstrlen(srcdir) + strlen(TESTFILE1) + 1) < sizeof(testfile))){
- HDstrcpy(testfile, srcdir);
- HDstrcat(testfile, "/");
- }
- HDstrcat(testfile, TESTFILE1);
file = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT);
if(file >= 0){
if(H5Oget_info_by_name(file, "/Dataset1", &oi1, H5P_DEFAULT) < 0)
@@ -167,14 +162,8 @@ main(void)
TESTING("accessing new modification time messages");
{
- char testfile[512]="";
- char *srcdir = HDgetenv("srcdir");
+ const char *testfile = H5_get_srcdir_filename(TESTFILE2); /* Corrected test file name */
- if(srcdir && ((HDstrlen(srcdir) + strlen(TESTFILE2) + 1) < sizeof(testfile))){
- HDstrcpy(testfile, srcdir);
- HDstrcat(testfile, "/");
- }
- HDstrcat(testfile, TESTFILE2);
file = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT);
if(file >= 0){
if(H5Oget_info_by_name(file, "/Dataset1", &oi2, H5P_DEFAULT) < 0)