diff options
author | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2013-12-26 15:34:33 (GMT) |
---|---|---|
committer | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2013-12-26 15:34:33 (GMT) |
commit | 8965bb188cab6e82eb3ac1ad1909f2ab4089c20b (patch) | |
tree | db6dd26968b5c314e67ecc0410d63e9a46747615 /tools/misc | |
parent | 3c9424e67dc113ba89c281953f21d37ef3739fe2 (diff) | |
parent | 928d398be4143546e57c50788b429095328cb3ba (diff) | |
download | hdf5-8965bb188cab6e82eb3ac1ad1909f2ab4089c20b.zip hdf5-8965bb188cab6e82eb3ac1ad1909f2ab4089c20b.tar.gz hdf5-8965bb188cab6e82eb3ac1ad1909f2ab4089c20b.tar.bz2 |
[svn-r24594] Merge from VOL branch.
Update plist encode/decode pre-generated files for newly added properties.
Diffstat (limited to 'tools/misc')
-rw-r--r-- | tools/misc/h5repart.c | 4 | ||||
-rw-r--r-- | tools/misc/talign.c | 10 | ||||
-rw-r--r-- | tools/misc/testh5mkgrp.sh.in | 16 |
3 files changed, 23 insertions, 7 deletions
diff --git a/tools/misc/h5repart.c b/tools/misc/h5repart.c index 07f6bfd..ffd52e8 100644 --- a/tools/misc/h5repart.c +++ b/tools/misc/h5repart.c @@ -290,7 +290,7 @@ main (int argc, char *argv[]) if (argno<argc) usage (prog_name); /* Now the real work, split the file */ - buf = malloc (blk_size); + buf = HDmalloc (blk_size); while (src_offset<src_size) { /* Read a block. The amount to read is the minimum of: @@ -498,6 +498,6 @@ main (int argc, char *argv[]) } /* Free resources and return */ - free (buf); + HDfree (buf); return EXIT_SUCCESS; } diff --git a/tools/misc/talign.c b/tools/misc/talign.c index 017eb55..66318bf 100644 --- a/tools/misc/talign.c +++ b/tools/misc/talign.c @@ -126,7 +126,7 @@ int main(void) H5Dclose(set); /* Now open the set, and read it back in */ - data = (char *)malloc(H5Tget_size(fix)); + data = (char *)HDmalloc(H5Tget_size(fix)); if(!data) { perror("malloc() failed"); @@ -152,7 +152,7 @@ out: mname ? mname : "(null)", (int)H5Tget_member_offset(fix,0), string5, (char *)(data + H5Tget_member_offset(fix, 0))); if(mname) - free(mname); + HDfree(mname); fptr = (float *)(data + H5Tget_member_offset(fix, 1)); mname = H5Tget_member_name(fix, 1); @@ -163,7 +163,7 @@ out: (double)fok[0], (double)fptr[0], (double)fok[1], (double)fptr[1]); if(mname) - free(mname); + HDfree(mname); fptr = (float *)(data + H5Tget_member_offset(fix, 2)); mname = H5Tget_member_name(fix, 2); @@ -173,7 +173,7 @@ out: (double)fnok[0], (double)fptr[0], (double)fnok[1], (double)fptr[1]); if(mname) - free(mname); + HDfree(mname); fptr = (float *)(data + H5Tget_member_offset(fix, 1)); printf("\n" @@ -192,7 +192,7 @@ out: } if(data) - free(data); + HDfree(data); H5Sclose(spc); H5Tclose(cmp); H5Tclose(cmp1); diff --git a/tools/misc/testh5mkgrp.sh.in b/tools/misc/testh5mkgrp.sh.in index 5ec1a28..85205a8 100644 --- a/tools/misc/testh5mkgrp.sh.in +++ b/tools/misc/testh5mkgrp.sh.in @@ -31,6 +31,7 @@ H5LS=h5ls # The h5ls tool name H5LS_ARGS=-vr # Arguments to the h5ls tool H5LS_BIN=`pwd`/../h5ls/$H5LS # The path of the h5ls tool binary +RM='rm -rf' CMP='cmp' DIFF='diff -c' CP='cp' @@ -111,6 +112,19 @@ COPY_TESTFILES_TO_TESTDIR() done } +CLEAN_TESTFILES_AND_TESTDIR() +{ + # skip rm if srcdir is same as destdir + # this occurs when build/test performed in source dir and + # make cp fail + SDIR=`$DIRNAME $tstfile` + INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` + INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` + if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then + $RM $TESTDIR + fi +} + # Print a line-line message left justified in a field of 70 characters # beginning with the word "Testing". TESTING() @@ -299,6 +313,8 @@ RUNTEST h5mkgrp_nested_lp.h5 "-lp" /one/two RUNTEST h5mkgrp_nested_mult_p.h5 "-p" /one/two /three/four RUNTEST h5mkgrp_nested_mult_lp.h5 "-lp" /one/two /three/four +# Clean up temporary files/directories +CLEAN_TESTFILES_AND_TESTDIR if test $nerrors -eq 0 ; then echo "All $TESTNAME tests passed." |