summaryrefslogtreecommitdiffstats
path: root/test/tsohm.c
diff options
context:
space:
mode:
authorJames Laird <jlaird@hdfgroup.org>2007-01-26 20:22:36 (GMT)
committerJames Laird <jlaird@hdfgroup.org>2007-01-26 20:22:36 (GMT)
commit261b24c62cf0505259c15be83cc6b4b334ecd526 (patch)
tree34919c29af1e56bca94f9b46ce32570be3c9997b /test/tsohm.c
parent2b3806581140d25541e35a464304bd16d12b6995 (diff)
downloadhdf5-261b24c62cf0505259c15be83cc6b4b334ecd526.zip
hdf5-261b24c62cf0505259c15be83cc6b4b334ecd526.tar.gz
hdf5-261b24c62cf0505259c15be83cc6b4b334ecd526.tar.bz2
[svn-r13207] Added a debug function to dump file sizes during one of the tsohm.c tests.
Also cleaned up a warning. Tested on kagiso; changes should only affect debugging.
Diffstat (limited to 'test/tsohm.c')
-rw-r--r--test/tsohm.c28
1 files changed, 27 insertions, 1 deletions
diff --git a/test/tsohm.c b/test/tsohm.c
index e1a976c..f6f09aa 100644
--- a/test/tsohm.c
+++ b/test/tsohm.c
@@ -150,6 +150,7 @@ static hid_t make_dtype_1(void);
static hid_t make_dtype_2(void);
static hid_t close_reopen_file(hid_t file, const char* filename);
static void test_sohm_attrs(void);
+static void size2_dump_struct(size2_helper_struct *sizes);
static void size2_verify(void);
static void test_sohm_delete(void);
static void test_sohm_delete_revert(void);
@@ -1283,6 +1284,32 @@ static void size2_verify_plist2(hid_t plist)
}
/*-------------------------------------------------------------------------
+ * Function: size2_dump_struct
+ *
+ * Purpose: A debugging function to print the contents of a
+ * size2_helper_struct (which holds the various sizes for a
+ * given file during the size2_helper function).
+ *
+ * Programmer: James Laird
+ * Friday, January 26, 2007
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+size2_dump_struct(size2_helper_struct *sizes)
+{
+ printf(" empty size: %llu\n", sizes->empty_size);
+ printf("first dataset: %llu \tdelta: %llu\n", sizes->first_dset, sizes->first_dset - sizes->empty_size);
+ printf(" dsets 1: %llu \tdelta: %llu\n", sizes->dsets1, sizes->dsets1 - sizes->first_dset);
+ printf(" dsets 2: %llu \tdelta: %llu\n", sizes->dsets2, sizes->dsets2 - sizes->dsets1);
+ printf(" interleaved: %llu \tdelta: %llu\n", sizes->interleaved, sizes->interleaved - sizes->dsets2);
+ printf(" attributes: %llu \tdelta: %llu\n", sizes->attrs1, sizes->attrs1 - sizes->interleaved);
+ printf(" attributes 2: %llu \tdelta: %llu\n", sizes->attrs2, sizes->attrs2 - sizes->attrs1);
+}
+
+/*-------------------------------------------------------------------------
* Function: size2_helper
*
* Purpose: A helper functon for test_sohm_size2.
@@ -3065,7 +3092,6 @@ static void test_sohm_extend_dset_helper(hid_t fcpl_id)
hsize_t dims2[] = {5, 2};
hsize_t out_dims[2];
hsize_t out_maxdims[2];
- long data[10] = {0};
int x;
herr_t ret;