summaryrefslogtreecommitdiffstats
path: root/test/tmisc.c
diff options
context:
space:
mode:
authorJames Laird <jlaird@hdfgroup.org>2006-12-20 21:33:51 (GMT)
committerJames Laird <jlaird@hdfgroup.org>2006-12-20 21:33:51 (GMT)
commit56dae018e20d1810137e61564c4ca47da3d32937 (patch)
tree4bcd5a99aa7ffddca9232a3b90e19dd9e5895094 /test/tmisc.c
parent79c17d54cc2f66f57f51f578681a35140e2b580e (diff)
downloadhdf5-56dae018e20d1810137e61564c4ca47da3d32937.zip
hdf5-56dae018e20d1810137e61564c4ca47da3d32937.tar.gz
hdf5-56dae018e20d1810137e61564c4ca47da3d32937.tar.bz2
[svn-r13084] Fixed a bug that occurrs when copying DCPLs with filters that have filter
data. Added a regression test for this bug. Tested on kagiso.
Diffstat (limited to 'test/tmisc.c')
-rw-r--r--test/tmisc.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/test/tmisc.c b/test/tmisc.c
index 3625681..20489fe 100644
--- a/test/tmisc.c
+++ b/test/tmisc.c
@@ -4643,6 +4643,47 @@ test_misc25b(void)
/****************************************************************
**
+** test_misc26(): Regression test: ensure that copying filter
+** pipelines works properly.
+**
+****************************************************************/
+static void
+test_misc26(void)
+{
+ hid_t dcpl1, dcpl2; /* Property List IDs */
+ herr_t ret; /* Generic return value */
+
+ /* Output message about test being performed */
+ MESSAGE(5, ("Copying filter pipelines\n"));
+
+ /* Create the property list */
+ dcpl1 = H5Pcreate(H5P_DATASET_CREATE);
+ CHECK_I(dcpl1, "H5Pcreate");
+
+ /* Add a filter to the property list */
+ ret = H5Pset_deflate(dcpl1, 1);
+ CHECK_I(ret, "H5Pset_deflate");
+
+ /* Copy the property list */
+ dcpl2 = H5Pcopy(dcpl1);
+ CHECK_I(dcpl2, "H5Pcopy");
+
+ /* Add a filter to the copy */
+ ret = H5Pset_shuffle(dcpl2);
+ CHECK_I(ret, "H5Pset_shuffle");
+
+ /* Close the property lists. If adding the second filter to
+ * dcpl2 caused it to be in an inconsistent state, closing it
+ * will trip an assert.
+ */
+ ret = H5Pclose(dcpl1);
+ CHECK_I(ret, "H5Pclose");
+ ret = H5Pclose(dcpl2);
+ CHECK_I(ret, "H5Pclose");
+}
+
+/****************************************************************
+**
** test_misc(): Main misc. test routine.
**
****************************************************************/
@@ -4680,6 +4721,8 @@ test_misc(void)
test_misc24(); /* Test inappropriate API opens of objects */
test_misc25a(); /* Exercise null object header message merge bug */
test_misc25b(); /* Exercise null object header message merge bug on existing file */
+ test_misc26(); /* Test closing property lists with long filter pipelines */
+
} /* test_misc() */