diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2010-01-28 13:11:38 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2010-01-28 13:11:38 (GMT) |
commit | 3360c3af0c100ac4d3a2fe2865f34661da862ec5 (patch) | |
tree | 9caf7dba62679504aa39ec02ebb72d8b8b5a848d /hl/test | |
parent | 5b4d3279099e7e4fad6e0092c77aa93dfd35d616 (diff) | |
download | hdf5-3360c3af0c100ac4d3a2fe2865f34661da862ec5.zip hdf5-3360c3af0c100ac4d3a2fe2865f34661da862ec5.tar.gz hdf5-3360c3af0c100ac4d3a2fe2865f34661da862ec5.tar.bz2 |
[svn-r18175] Description:
Bring r17986:18172 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 'hl/test')
-rw-r--r-- | hl/test/Makefile.in | 8 | ||||
-rw-r--r-- | hl/test/test_ds.c | 1 | ||||
-rw-r--r-- | hl/test/test_lite.c | 19 |
3 files changed, 17 insertions, 11 deletions
diff --git a/hl/test/Makefile.in b/hl/test/Makefile.in index 4a5aa5b..a364c75 100644 --- a/hl/test/Makefile.in +++ b/hl/test/Makefile.in @@ -345,12 +345,12 @@ CP = cp # Some machines need a command to run executables; this is that command # so that our tests will run. -# We use RUNTESTS instead of RUNSERIAL directly because it may be that +# We use RUNEXEC instead of RUNSERIAL directly because it may be that # some tests need to be run with a different command. Older versions # of the makefiles used the command # $(LIBTOOL) --mode=execute # in some directories, for instance. -RUNTESTS = $(RUNSERIAL) +RUNEXEC = $(RUNSERIAL) # Libraries to link to while building LIBHDF5 = $(top_builddir)/src/libhdf5.la @@ -837,7 +837,7 @@ $(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_: fi; \ echo "============================" >> $${log}; \ srcdir="$(srcdir)" \ - $(TIME) $(RUNTESTS) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \ + $(TIME) $(RUNEXEC) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \ && touch $(@:.chkexe_=.chkexe) || \ (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \ (cat $${log} && false) || exit 1; \ @@ -908,7 +908,7 @@ build-check-p: $(LIB) $(PROGS) $(TESTS) @for test in $(TEST_PROG_PARA) dummy; do \ if test $$test != dummy; then \ $(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ \ - RUNTESTS="$(RUNPARALLEL)" || exit 1; \ + RUNEXEC="$(RUNPARALLEL)" || exit 1; \ fi; \ done @for test in $(TEST_SCRIPT_PARA) dummy; do \ diff --git a/hl/test/test_ds.c b/hl/test/test_ds.c index 7e0f20e..32622ed 100644 --- a/hl/test/test_ds.c +++ b/hl/test/test_ds.c @@ -4889,6 +4889,7 @@ static int read_data( const char* fname, if ( *buf == NULL ) { printf( "memory allocation failed\n" ); + fclose(f); return -1; } diff --git a/hl/test/test_lite.c b/hl/test/test_lite.c index 21afc54..95869af 100644 --- a/hl/test/test_lite.c +++ b/hl/test/test_lite.c @@ -1534,17 +1534,16 @@ static int test_complicated_compound(void) hid_t dtype; int nmembs; H5T_class_t type_class; - char* line=NULL; - FILE *fp; + char *line = NULL; + FILE *fp = NULL; size_t size = 1024; - char *srcdir = getenv("srcdir"); /* the source directory */ + char *srcdir = getenv("srcdir"); /* the source directory */ char filename[1024]=""; TESTING3(" text for complicated compound types"); /* compose the name of the file to open, using the srcdir, if appropriate */ - if(srcdir) - { + if(srcdir) { strcpy(filename, srcdir); strcat(filename, "/"); } @@ -1552,8 +1551,7 @@ static int test_complicated_compound(void) /* Open input file */ fp = fopen(filename, "r"); - if(fp == NULL) - { + if(fp == NULL) { printf( "Could not find file %s. Try set $srcdir \n", filename); goto out; } @@ -1579,6 +1577,7 @@ static int test_complicated_compound(void) } fclose(fp); + fp = NULL; if((dtype = H5LTtext_to_dtype(line, H5LT_DDL))<0) goto out; @@ -1601,6 +1600,12 @@ static int test_complicated_compound(void) return 0; out: + + if(line) + free(line); + if(fp) + fclose(fp); + H5_FAILED(); return -1; } |