summaryrefslogtreecommitdiffstats
path: root/test/h5test.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1998-11-25 14:58:22 (GMT)
committerRobb Matzke <matzke@llnl.gov>1998-11-25 14:58:22 (GMT)
commit4354606d1e86a514958f20b21163c19c30dc26f5 (patch)
treedb93fa4fa072524becbc7a8e6221a6c64fdbfa3f /test/h5test.c
parent49ca76e303a15bfb6a46d7b68086ca974044c5c1 (diff)
downloadhdf5-4354606d1e86a514958f20b21163c19c30dc26f5.zip
hdf5-4354606d1e86a514958f20b21163c19c30dc26f5.tar.gz
hdf5-4354606d1e86a514958f20b21163c19c30dc26f5.tar.bz2
[svn-r949] Changes since 19981124
---------------------- ./src/H5T.c Fixed a typo in the registration of the `unsigned char' to `unsigned long long' type conversion that caused it to not be registered, falling back to software whenever that conversion path was taken. ./MANIFEST ./test/Makefile.in ./test/testhdf5.c ./test/testhdf5.h ./test/theap.c [REMOVED] ./test/lheap.c [NEW] ./test/tohdr.c [REMOVED] ./test/ohdr.c [NEW] ./test/tstab.c [REMOVED] ./test/stab.c [NEW] Removed the `t' from the front of these names and made each test a stand-alone program following the format of most of the other tests. ./test/big.c Uses libh5test.a but always sets the low-level driver to 1GB file family. The `#if' near the top to set the data space to 8GB has been simplified now that `long_long' is always defined and the error message is improved when `long_long' isn't wide enough. Cleanup code was added to the error handling. ./test/gheap.c ./test/istore.c Uses libh5test.a. Added error cleanup code. ./test/dtypes.c ./test/h5test.c Added 68 new tests that check hardware and software conversions between `long long' and `unsigned long long' and the other integer types. The tests only run on machines where sizeof(long_long)!=sizeof(long). We test a total of 180 different integer conversions, half in hardware and half in software. Cut down the number of times each test is run from 5 to 1 so it doesn't take so long. If you want to run more times there's a constant that can be changed at the top of the file. ./test/extend.c Removed unused variable. ./test/h5test.c ./test/h5test.h ./test/external.c ./test/fillval.c The h5_cleanup() returns true/false so it can be used in an `if' statement to clean up additional files. ./doc/html/Environment.html Indented. Added HDF5_PREFIX and HDF5_DRIVER descriptions. ./src/H5P.c Changed the trace type for the second argument from `Iu' to `x' since it's an output parameter. ./INSTALL Added a warning that the GNU zlib that comes with the latest version of HDF4 is too old to use with HDF5 and must be renamed so configure doesn't see it when `--enable-hdf4' is used.
Diffstat (limited to 'test/h5test.c')
-rw-r--r--test/h5test.c62
1 files changed, 59 insertions, 3 deletions
diff --git a/test/h5test.c b/test/h5test.c
index 0e2ef53..f124e0e 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -66,7 +66,7 @@ h5_errors(void __unused__ *client_data)
* `extern const char *FILENAMES[]' -- these are only the base
* names. The file access property list is also closed.
*
- * Return: none
+ * Return: Non-zero if cleanup actions were performed; zero otherwise.
*
* Programmer: Albert Cheng
* May 28, 1998
@@ -75,12 +75,13 @@ h5_errors(void __unused__ *client_data)
*
*-------------------------------------------------------------------------
*/
-void
+int
h5_cleanup(hid_t fapl)
{
char filename[1024];
char temp[2048];
int i, j;
+ int retval=0;
if (!getenv("HDF5_NOCLEANUP")) {
for (i=0; FILENAME[i]; i++) {
@@ -113,8 +114,10 @@ h5_cleanup(hid_t fapl)
break;
}
}
+ retval=1;
}
H5Pclose(fapl);
+ return retval;
}
@@ -135,10 +138,27 @@ h5_cleanup(hid_t fapl)
void
h5_reset(void)
{
+ char filename[1024];
+
fflush(stdout);
fflush(stderr);
H5close();
- H5Eset_auto (h5_errors, NULL);}
+ H5Eset_auto (h5_errors, NULL);
+
+ /*
+ * Cause the library to emit some diagnostics early so they don't
+ * interfere with other formatted output.
+ */
+ sprintf(filename, "/tmp/h5emit-%05d.h5", getpid());
+ H5E_BEGIN_TRY {
+ hid_t file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT,
+ H5P_DEFAULT);
+ hid_t grp = H5Gcreate(file, "emit", 0);
+ H5Gclose(grp);
+ H5Fclose(file);
+ unlink(filename);
+ } H5E_END_TRY;
+}
/*-------------------------------------------------------------------------
@@ -304,6 +324,8 @@ h5_no_hwconv(void)
H5Tunregister(H5T_conv_char_uint);
H5Tunregister(H5T_conv_char_long);
H5Tunregister(H5T_conv_char_ulong);
+ H5Tunregister(H5T_conv_char_llong);
+ H5Tunregister(H5T_conv_char_ullong);
H5Tunregister(H5T_conv_uchar_char);
H5Tunregister(H5T_conv_uchar_short);
@@ -312,6 +334,8 @@ h5_no_hwconv(void)
H5Tunregister(H5T_conv_uchar_uint);
H5Tunregister(H5T_conv_uchar_long);
H5Tunregister(H5T_conv_uchar_ulong);
+ H5Tunregister(H5T_conv_uchar_llong);
+ H5Tunregister(H5T_conv_uchar_ullong);
H5Tunregister(H5T_conv_short_char);
H5Tunregister(H5T_conv_short_uchar);
@@ -320,6 +344,8 @@ h5_no_hwconv(void)
H5Tunregister(H5T_conv_short_uint);
H5Tunregister(H5T_conv_short_long);
H5Tunregister(H5T_conv_short_ulong);
+ H5Tunregister(H5T_conv_short_llong);
+ H5Tunregister(H5T_conv_short_ullong);
H5Tunregister(H5T_conv_ushort_char);
H5Tunregister(H5T_conv_ushort_uchar);
@@ -328,6 +354,8 @@ h5_no_hwconv(void)
H5Tunregister(H5T_conv_ushort_uint);
H5Tunregister(H5T_conv_ushort_long);
H5Tunregister(H5T_conv_ushort_ulong);
+ H5Tunregister(H5T_conv_ushort_llong);
+ H5Tunregister(H5T_conv_ushort_ullong);
H5Tunregister(H5T_conv_int_char);
H5Tunregister(H5T_conv_int_uchar);
@@ -336,6 +364,8 @@ h5_no_hwconv(void)
H5Tunregister(H5T_conv_int_uint);
H5Tunregister(H5T_conv_int_long);
H5Tunregister(H5T_conv_int_ulong);
+ H5Tunregister(H5T_conv_int_llong);
+ H5Tunregister(H5T_conv_int_ullong);
H5Tunregister(H5T_conv_uint_char);
H5Tunregister(H5T_conv_uint_uchar);
@@ -344,6 +374,8 @@ h5_no_hwconv(void)
H5Tunregister(H5T_conv_uint_int);
H5Tunregister(H5T_conv_uint_long);
H5Tunregister(H5T_conv_uint_ulong);
+ H5Tunregister(H5T_conv_uint_llong);
+ H5Tunregister(H5T_conv_uint_ullong);
H5Tunregister(H5T_conv_long_char);
H5Tunregister(H5T_conv_long_uchar);
@@ -352,6 +384,8 @@ h5_no_hwconv(void)
H5Tunregister(H5T_conv_long_int);
H5Tunregister(H5T_conv_long_uint);
H5Tunregister(H5T_conv_long_ulong);
+ H5Tunregister(H5T_conv_long_llong);
+ H5Tunregister(H5T_conv_long_ullong);
H5Tunregister(H5T_conv_ulong_char);
H5Tunregister(H5T_conv_ulong_uchar);
@@ -360,6 +394,28 @@ h5_no_hwconv(void)
H5Tunregister(H5T_conv_ulong_int);
H5Tunregister(H5T_conv_ulong_uint);
H5Tunregister(H5T_conv_ulong_long);
+ H5Tunregister(H5T_conv_ulong_llong);
+ H5Tunregister(H5T_conv_ulong_ullong);
+
+ H5Tunregister(H5T_conv_llong_char);
+ H5Tunregister(H5T_conv_llong_uchar);
+ H5Tunregister(H5T_conv_llong_short);
+ H5Tunregister(H5T_conv_llong_ushort);
+ H5Tunregister(H5T_conv_llong_int);
+ H5Tunregister(H5T_conv_llong_uint);
+ H5Tunregister(H5T_conv_llong_long);
+ H5Tunregister(H5T_conv_llong_ulong);
+ H5Tunregister(H5T_conv_llong_ullong);
+
+ H5Tunregister(H5T_conv_ullong_char);
+ H5Tunregister(H5T_conv_ullong_uchar);
+ H5Tunregister(H5T_conv_ullong_short);
+ H5Tunregister(H5T_conv_ullong_ushort);
+ H5Tunregister(H5T_conv_ullong_int);
+ H5Tunregister(H5T_conv_ullong_uint);
+ H5Tunregister(H5T_conv_ullong_long);
+ H5Tunregister(H5T_conv_ullong_ulong);
+ H5Tunregister(H5T_conv_ullong_llong);
H5Tunregister(H5T_conv_float_double);
H5Tunregister(H5T_conv_double_float);