summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1999-01-18 17:54:16 (GMT)
committerRobb Matzke <matzke@llnl.gov>1999-01-18 17:54:16 (GMT)
commita2db22ab74d0b4c552e9efe25209ca68ac42ce5d (patch)
tree712fe992c5fef6460ac77ee4a65138433b2f4947 /test
parentd10cb54a94a13ec7a095ac24039c405867117d4b (diff)
downloadhdf5-a2db22ab74d0b4c552e9efe25209ca68ac42ce5d.zip
hdf5-a2db22ab74d0b4c552e9efe25209ca68ac42ce5d.tar.gz
hdf5-a2db22ab74d0b4c552e9efe25209ca68ac42ce5d.tar.bz2
[svn-r1023] Changes since 19990105
---------------------- ./INSTALL ./doc/html/Compression.html ./doc/html/Filters.html Disassociated GNU from zlib. Did not change the introduction which incorrectly states that compression in hdf5 is available only if GNU gzip is available (should read zlib). Changed a typo in INSTALL to match what is documented in various other places: that zlib 1.1.2 (not 1.0.2) or better is required for compression. Added a reference to the main zlib web page in various places. ./src/H5Fistore.c Fixed a typo in a comment. ./src/H5Flow.c Removed carriage returns from the end of lines. ./test/dsets.c The deflate compression tests are still run but `-SKIP-' is printed instead of `PASSED' if the zlib library was not detected at configuration time. The tests check that the compression layer (H5Z) is correctly bypassed.
Diffstat (limited to 'test')
-rw-r--r--test/.distdep56
-rw-r--r--test/dsets.c47
2 files changed, 77 insertions, 26 deletions
diff --git a/test/.distdep b/test/.distdep
index a054a1a..6645e72 100644
--- a/test/.distdep
+++ b/test/.distdep
@@ -172,6 +172,36 @@ dsets.o: \
../src/H5HGprivate.h \
../src/H5Fprivate.h \
../src/H5Rprivate.h
+dtypes.o: \
+ dtypes.c \
+ h5test.h \
+ ../src/hdf5.h \
+ ../src/H5public.h \
+ ../src/H5config.h \
+ ../src/H5Ipublic.h \
+ ../src/H5Apublic.h \
+ ../src/H5ACpublic.h \
+ ../src/H5Bpublic.h \
+ ../src/H5Dpublic.h \
+ ../src/H5Epublic.h \
+ ../src/H5Fpublic.h \
+ ../src/H5Gpublic.h \
+ ../src/H5HGpublic.h \
+ ../src/H5HLpublic.h \
+ ../src/H5MFpublic.h \
+ ../src/H5MMpublic.h \
+ ../src/H5Opublic.h \
+ ../src/H5Ppublic.h \
+ ../src/H5Zpublic.h \
+ ../src/H5Rpublic.h \
+ ../src/H5RApublic.h \
+ ../src/H5Spublic.h \
+ ../src/H5Tpublic.h \
+ ../src/H5private.h \
+ ../src/H5Tpkg.h \
+ ../src/H5HGprivate.h \
+ ../src/H5Fprivate.h \
+ ../src/H5Rprivate.h
extend.o: \
extend.c \
h5test.h \
@@ -631,28 +661,6 @@ ragged.o: \
../src/H5Spublic.h \
../src/H5Tpublic.h \
../src/H5private.h
-space_overflow.o: \
- space_overflow.c \
- ../src/hdf5.h \
- ../src/H5public.h \
- ../src/H5config.h \
- ../src/H5Ipublic.h \
- ../src/H5Apublic.h \
- ../src/H5ACpublic.h \
- ../src/H5Bpublic.h \
- ../src/H5Dpublic.h \
- ../src/H5Epublic.h \
- ../src/H5Fpublic.h \
- ../src/H5Gpublic.h \
- ../src/H5HGpublic.h \
- ../src/H5HLpublic.h \
- ../src/H5MFpublic.h \
- ../src/H5MMpublic.h \
- ../src/H5Opublic.h \
- ../src/H5Ppublic.h \
- ../src/H5Zpublic.h \
- ../src/H5Rpublic.h \
- ../src/H5RApublic.h
stab.o: \
stab.c \
h5test.h \
@@ -845,8 +853,8 @@ unlink.o: \
../src/H5HGprivate.h \
../src/H5Fprivate.h \
../src/H5Rprivate.h
-dtypes.o: \
- dtypes.c \
+enum.o: \
+ enum.c \
h5test.h \
../src/hdf5.h \
../src/H5public.h \
diff --git a/test/dsets.c b/test/dsets.c
index be2b911..49b5f50 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -325,7 +325,10 @@ bogus(unsigned int __unused__ flags, size_t __unused__ cd_nelmts,
/*-------------------------------------------------------------------------
* Function: test_compression
*
- * Purpose: Tests dataset compression.
+ * Purpose: Tests dataset compression. If compression is requested when
+ * it hasn't been compiled into the library (such as when
+ * updating an existing compressed dataset) then data is sent to
+ * the file uncompressed but no errors are returned.
*
* Return: Success: 0
*
@@ -347,10 +350,14 @@ test_compression(hid_t file)
const hsize_t chunk_size[2] = {2, 25};
const hssize_t hs_offset[2] = {7, 30};
const hsize_t hs_size[2] = {4, 50};
+ const char *not_supported;
hsize_t i, j, n;
void *tconv_buf = NULL;
+ not_supported = " Deflate compression is not supported.\n"
+ " The zlib was not found when hdf5 was configured.";
+
TESTING("compression (setup)");
/* Create the data space */
@@ -372,7 +379,12 @@ test_compression(hid_t file)
/* Create the dataset */
if ((dataset = H5Dcreate(file, DSET_COMPRESS_NAME, H5T_NATIVE_INT, space,
dc))<0) goto error;
+#ifdef HAVE_COMPRESS2
PASSED();
+#else
+ SKIPPED();
+ puts(not_supported);
+#endif
/*----------------------------------------------------------------------
* STEP 1: Read uninitialized data. It should be zero.
@@ -394,7 +406,12 @@ test_compression(hid_t file)
}
}
}
+#ifdef HAVE_COMPRESS2
PASSED();
+#else
+ SKIPPED();
+ puts(not_supported);
+#endif
/*----------------------------------------------------------------------
* STEP 2: Test compression by setting up a chunked dataset and writing
@@ -411,7 +428,12 @@ test_compression(hid_t file)
if (H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, xfer, points)<0)
goto error;
+#ifdef HAVE_COMPRESS2
PASSED();
+#else
+ SKIPPED();
+ puts(not_supported);
+#endif
/*----------------------------------------------------------------------
* STEP 3: Try to read the data we just wrote.
@@ -435,7 +457,12 @@ test_compression(hid_t file)
}
}
}
+#ifdef HAVE_COMPRESS2
PASSED();
+#else
+ SKIPPED();
+ puts(not_supported);
+#endif
/*----------------------------------------------------------------------
* STEP 4: Write new data over the top of the old data. The new data is
@@ -470,7 +497,12 @@ test_compression(hid_t file)
}
}
}
+#ifdef HAVE_COMPRESS2
PASSED();
+#else
+ SKIPPED();
+ puts(not_supported);
+#endif
/*----------------------------------------------------------------------
* STEP 5: Close the dataset and then open it and read it again. This
@@ -497,7 +529,13 @@ test_compression(hid_t file)
}
}
}
+#ifdef HAVE_COMPRESS2
PASSED();
+#else
+ SKIPPED();
+ puts(not_supported);
+#endif
+
/*----------------------------------------------------------------------
* STEP 6: Test partial I/O by writing to and then reading from a
@@ -537,7 +575,12 @@ test_compression(hid_t file)
}
}
}
+#ifdef HAVE_COMPRESS2
PASSED();
+#else
+ SKIPPED();
+ puts(not_supported);
+#endif
/*----------------------------------------------------------------------
* STEP 7: Register an application-defined compression method and use it
@@ -685,7 +728,7 @@ main(void)
h5_reset();
fapl = h5_fileaccess();
-#if 1
+#if 0
/* Turn off raw data cache */
if (H5Pget_cache(fapl, &mdc_nelmts, NULL, NULL, NULL)<0) goto error;
if (H5Pset_cache(fapl, mdc_nelmts, 0, 0, 0.0)<0) goto error;