diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2005-03-11 04:01:49 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2005-03-11 04:01:49 (GMT) |
commit | 330a3f1fcb16bcc61c525bb81aa2d4db907974c7 (patch) | |
tree | e8ba6b064af994f3b64534b18c8246b0ac420d59 /test/blocktrack.c | |
parent | da3eeee908eb6f6432b7fb15ce211c890d097dd5 (diff) | |
download | hdf5-330a3f1fcb16bcc61c525bb81aa2d4db907974c7.zip hdf5-330a3f1fcb16bcc61c525bb81aa2d4db907974c7.tar.gz hdf5-330a3f1fcb16bcc61c525bb81aa2d4db907974c7.tar.bz2 |
[svn-r10190] Purpose:
New feature
Description:
Add query for the total size of blocks tracked
Platforms tested:
FreeBSD 4.11 (sleipnir)
Solaris 2.9 (shanti)
Diffstat (limited to 'test/blocktrack.c')
-rw-r--r-- | test/blocktrack.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/blocktrack.c b/test/blocktrack.c index 8929bfc..c297bca 100644 --- a/test/blocktrack.c +++ b/test/blocktrack.c @@ -57,6 +57,7 @@ test_create(hid_t fapl) char filename[1024]; H5F_t *f=NULL; haddr_t bt_addr; /* Address of block tracker created */ + hsize_t tot_size; /* Total size of blocks tracked */ h5_fixname(FILENAME[0], fapl, filename, sizeof filename); @@ -78,6 +79,16 @@ test_create(hid_t fapl) H5Eprint_stack(H5E_DEFAULT, stdout); goto error; } /* end if */ + + if (H5BT_get_total_size(f, H5P_DATASET_XFER_DEFAULT, bt_addr, &tot_size)<0) { + H5_FAILED(); + H5Eprint_stack(H5E_DEFAULT, stdout); + goto error; + } /* end if */ + /* Make certain that the size is correct */ + if(tot_size != 0) TEST_ERROR; + + PASSED(); if (H5Fclose(file)<0) TEST_ERROR; @@ -115,6 +126,7 @@ test_insert_one(hid_t fapl) char filename[1024]; H5F_t *f=NULL; haddr_t bt_addr; /* Address of block tracker created */ + hsize_t tot_size; /* Total size of blocks tracked */ h5_fixname(FILENAME[0], fapl, filename, sizeof filename); @@ -143,6 +155,14 @@ test_insert_one(hid_t fapl) goto error; } /* end if */ + if (H5BT_get_total_size(f, H5P_DATASET_XFER_DEFAULT, bt_addr, &tot_size)<0) { + H5_FAILED(); + H5Eprint_stack(H5E_DEFAULT, stdout); + goto error; + } /* end if */ + /* Make certain that the size is correct */ + if(tot_size != 20) TEST_ERROR; + PASSED(); if (H5Fclose(file)<0) TEST_ERROR; @@ -181,6 +201,7 @@ test_insert_many(hid_t fapl) H5F_t *f=NULL; haddr_t bt_addr; /* Address of block tracker created */ unsigned u; /* Local index variable */ + hsize_t tot_size; /* Total size of blocks tracked */ h5_fixname(FILENAME[0], fapl, filename, sizeof filename); @@ -209,6 +230,15 @@ test_insert_many(hid_t fapl) H5Eprint_stack(H5E_DEFAULT, stdout); goto error; } /* end if */ + + if (H5BT_get_total_size(f, H5P_DATASET_XFER_DEFAULT, bt_addr, &tot_size)<0) { + H5_FAILED(); + H5Eprint_stack(H5E_DEFAULT, stdout); + goto error; + } /* end if */ + /* Make certain that the size is correct */ + if(tot_size != ((u+1)*20)) TEST_ERROR; + } /* end for */ PASSED(); |