summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>1999-07-17 23:57:55 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>1999-07-17 23:57:55 (GMT)
commit4aafdc16750bea49f81f7421863f41a06c7e9133 (patch)
tree388148f85496f77b5efddcf80c8b3d745efc2d9a /test
parent185b1d1cd1cee839af5db7b14589b6f772587327 (diff)
downloadhdf5-4aafdc16750bea49f81f7421863f41a06c7e9133.zip
hdf5-4aafdc16750bea49f81f7421863f41a06c7e9133.tar.gz
hdf5-4aafdc16750bea49f81f7421863f41a06c7e9133.tar.bz2
[svn-r1504] Uncommented VL datatypes in compound datatypes test, since it's working now.
Some other memory leaks in the tests fixed.
Diffstat (limited to 'test')
-rw-r--r--test/big.c1
-rw-r--r--test/dsets.c2
-rw-r--r--test/enum.c2
-rw-r--r--test/tvltypes.c13
4 files changed, 6 insertions, 12 deletions
diff --git a/test/big.c b/test/big.c
index d414e7d..790cdee 100644
--- a/test/big.c
+++ b/test/big.c
@@ -79,6 +79,7 @@ is_sparse(void)
if ((fd=open("x.h5", O_RDWR|O_TRUNC|O_CREAT, 0666))<0) return 0;
if (lseek(fd, 1024*1024, SEEK_SET)!=1024*1024) return 0;
if (5!=write(fd, "hello", 5)) return 0;
+ if (close(fd)<0) return 0;
if (stat("x.h5", &sb)<0) return 0;
if (unlink("x.h5")<0) return 0;
#ifdef HAVE_STAT_ST_BLOCKS
diff --git a/test/dsets.c b/test/dsets.c
index c8bcbc2..8233360 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -168,7 +168,7 @@ test_simple_io(hid_t file)
/* Initialize the dataset */
for (i = n = 0; i < 100; i++) {
- for (j = 0; j < 100; j++) {
+ for (j = 0; j < 200; j++) {
points[i][j] = n++;
}
}
diff --git a/test/enum.c b/test/enum.c
index 71fc4bf..e540f80 100644
--- a/test/enum.c
+++ b/test/enum.c
@@ -367,6 +367,8 @@ main(void)
nerrors += test_tr1(file);
nerrors += test_tr2(file);
+ H5Fclose(file);
+
if (nerrors) goto error;
puts("All enum tests passed.");
h5_cleanup(fapl);
diff --git a/test/tvltypes.c b/test/tvltypes.c
index e349000..be1ada0 100644
--- a/test/tvltypes.c
+++ b/test/tvltypes.c
@@ -309,7 +309,6 @@ test_vltypes_vlen_compound(void)
ret=H5Dvlen_reclaim(tid1,sid1,xfer_pid,rdata);
CHECK(ret, FAIL, "H5Dvlen_reclaim");
-
/* Make certain the VL memory has been freed */
VERIFY(mem_used,0,"H5Dvlen_reclaim");
@@ -410,11 +409,9 @@ test_vltypes_compound_vlen_atomic(void)
dataset=H5Dcreate(fid1,"Dataset1",tid2,sid1,H5P_DEFAULT);
CHECK(dataset, FAIL, "H5Dcreate");
-printf("Before writing data to disk\n");
/* Write dataset to disk */
ret=H5Dwrite(dataset,tid2,H5S_ALL,H5S_ALL,H5P_DEFAULT,wdata);
CHECK(ret, FAIL, "H5Dwrite");
-printf("After writing data to disk\n");
/* Change to the custom memory allocation routines for reading VL data */
xfer_pid=H5Pcreate(H5P_DATASET_XFER);
@@ -423,11 +420,9 @@ printf("After writing data to disk\n");
ret=H5Pset_vlen_mem_manager(xfer_pid,test_vltypes_alloc_custom,&mem_used,test_vltypes_free_custom,&mem_used);
CHECK(ret, FAIL, "H5Pset_vlen_mem_manager");
-printf("Before reading data from disk\n");
/* Read dataset from disk */
ret=H5Dread(dataset,tid2,H5S_ALL,H5S_ALL,xfer_pid,rdata);
CHECK(ret, FAIL, "H5Dread");
-printf("After reading data from disk\n");
/* Make certain the correct amount of memory has been used */
/* 10 elements allocated = 1 + 2 + 3 + 4 elements for each array position */
@@ -460,16 +455,14 @@ printf("After reading data from disk\n");
} /* end for */
/* Reclaim the VL data */
-#ifdef QAK
ret=H5Dvlen_reclaim(tid2,sid1,xfer_pid,rdata);
CHECK(ret, FAIL, "H5Dvlen_reclaim");
/* Make certain the VL memory has been freed */
VERIFY(mem_used,0,"H5Dvlen_reclaim");
-#endif /* QAK */
/* Reclaim the write VL data */
- ret=H5Dvlen_reclaim(tid1,sid1,H5P_DEFAULT,wdata);
+ ret=H5Dvlen_reclaim(tid2,sid1,H5P_DEFAULT,wdata);
CHECK(ret, FAIL, "H5Dvlen_reclaim");
/* Close Dataset */
@@ -606,7 +599,7 @@ test_vltypes_vlen_vlen_atomic(void)
VERIFY(mem_used,0,"H5Dvlen_reclaim");
/* Reclaim the write VL data */
- ret=H5Dvlen_reclaim(tid1,sid1,H5P_DEFAULT,wdata);
+ ret=H5Dvlen_reclaim(tid2,sid1,H5P_DEFAULT,wdata);
CHECK(ret, FAIL, "H5Dvlen_reclaim");
/* Close Dataset */
@@ -649,9 +642,7 @@ test_vltypes(void)
/* These next tests use the same file */
test_vltypes_vlen_atomic(); /* Test VL atomic datatypes */
test_vltypes_vlen_compound(); /* Test VL compound datatypes */
-#ifdef QAK
test_vltypes_compound_vlen_atomic(); /* Test compound datatypes with VL atomic components */
-#endif
test_vltypes_vlen_vlen_atomic(); /* Test VL datatype with VL atomic components */
} /* test_vltypes() */