diff options
author | Vailin Choi <vchoi@hdfgroup.org> | 2013-07-30 21:41:23 (GMT) |
---|---|---|
committer | Vailin Choi <vchoi@hdfgroup.org> | 2013-07-30 21:41:23 (GMT) |
commit | 147522bb6118ec82f087208d5caa046f57ff801d (patch) | |
tree | fdc57bdc084da094731012092ba137336f75baf3 /test | |
parent | 4d080e50f6bde9746d2dc12ced01d7f5758965cb (diff) | |
download | hdf5-147522bb6118ec82f087208d5caa046f57ff801d.zip hdf5-147522bb6118ec82f087208d5caa046f57ff801d.tar.gz hdf5-147522bb6118ec82f087208d5caa046f57ff801d.tar.bz2 |
[svn-r23948] Bring revisions #23670 - 23713 from trunk to revise_chunks.
h5committested.
Diffstat (limited to 'test')
-rw-r--r-- | test/CMakeLists.txt | 4 | ||||
-rw-r--r-- | test/H5srcdir.h | 11 | ||||
-rw-r--r-- | test/file_image.c | 3 | ||||
-rw-r--r-- | test/h5test.c | 20 | ||||
-rw-r--r-- | test/links_env.c | 1 | ||||
-rw-r--r-- | test/unregister.c | 6 |
6 files changed, 17 insertions, 28 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 8904fee..766ed7b 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -397,6 +397,8 @@ ADD_TEST ( testmeta.h5 tstint1.h5 tstint2.h5 + unregister_filter_1.h5 + unregister_filter_2.h5 ) SET (H5_TESTS @@ -453,6 +455,7 @@ SET (H5_TESTS file_image enc_dec_plist enc_dec_plist_with_endianess + unregister ) FOREACH (test ${H5_TESTS}) @@ -728,6 +731,7 @@ IF (HDF5_TEST_VFD) tcheck_version testmeta links_env + unregister ) IF (DIRECT_VFD) 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/file_image.c b/test/file_image.c index c734db8..d4056a7 100644 --- a/test/file_image.c +++ b/test/file_image.c @@ -1207,6 +1207,9 @@ test_get_file_image_error_rejection(void) err = H5Fclose(file_id); VERIFY(err == SUCCEED, "H5Fclose(2) failed."); + /* tidy up */ + result = h5_cleanup(FILENAME2, fapl_id); + VERIFY(result != 0, "h5_cleanup(2 failed."); /************************** Test #4 **********************************/ /* set up a family file driver test file, and try to get its image 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_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 */ diff --git a/test/unregister.c b/test/unregister.c index 88f4d1b..383958d 100644 --- a/test/unregister.c +++ b/test/unregister.c @@ -145,7 +145,6 @@ test_unregister_filters(hid_t my_fapl) goto error; } /* end if */ - /* Close the group */ if(H5Gclose(gid) < 0) goto error; @@ -176,7 +175,6 @@ test_unregister_filters(hid_t my_fapl) goto error; /* Unregister the filter before closing the dataset. It should fail */ - /*if(H5Zunregister(H5Z_FILTER_DUMMY) < 0) goto error;*/ H5E_BEGIN_TRY { ret = H5Zunregister(H5Z_FILTER_DUMMY); } H5E_END_TRY; @@ -244,14 +242,14 @@ main(void) if(nerrors) goto error; - printf("All dataset tests passed.\n"); + printf("All filter unregistration tests passed.\n"); h5_cleanup(FILENAME, fapl); return 0; error: nerrors = MAX(1, nerrors); - printf("***** %d DATASET TEST%s FAILED! *****\n", + printf("***** %d FILTER UNREGISTRATION TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S"); return 1; } |