summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-01-30 04:33:04 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-01-30 04:33:04 (GMT)
commitfa1f33701da4489a4626a057844fa799878feddf (patch)
treebfb0efbe3f126b46fbf0bf9bd8516bf1076ab8a4 /test
parente3c80277440ec153a180ef89f7867bdedb51b87a (diff)
downloadhdf5-fa1f33701da4489a4626a057844fa799878feddf.zip
hdf5-fa1f33701da4489a4626a057844fa799878feddf.tar.gz
hdf5-fa1f33701da4489a4626a057844fa799878feddf.tar.bz2
[svn-r18198] Description:
Trim trailing whitespace from source code files, with following command: find . \( -name "*.[ch]" -or -name "*.cpp" -or -name "*.f90" \) -print |xargs -n 1 sed -i "" 's/[[:blank:]]*$//' Tested on: None - eyeballed only
Diffstat (limited to 'test')
-rw-r--r--test/cache.c300
-rw-r--r--test/cache_common.c62
-rw-r--r--test/cache_common.h4
-rw-r--r--test/dsets.c62
-rw-r--r--test/dtypes.c16
-rw-r--r--test/error_test.c2
-rw-r--r--test/external.c4
-rw-r--r--test/gen_idx.c4
-rw-r--r--test/h5test.c16
-rw-r--r--test/h5test.h2
-rw-r--r--test/links.c2
-rw-r--r--test/mf.c18
-rw-r--r--test/ntypes.c12
-rwxr-xr-xtest/objcopy.c2
-rw-r--r--test/ohdr.c6
-rw-r--r--test/set_extent.c1266
-rw-r--r--test/tattr.c4
-rw-r--r--test/tconfig.c2
-rw-r--r--test/tfile.c4
-rw-r--r--test/tmisc.c2
-rw-r--r--test/tsohm.c16
-rw-r--r--test/vfd.c2
22 files changed, 904 insertions, 904 deletions
diff --git a/test/cache.c b/test/cache.c
index 6afe9e2..ad9f4ce 100644
--- a/test/cache.c
+++ b/test/cache.c
@@ -3007,7 +3007,7 @@ check_flush_cache(void)
if ( show_progress ) {
- HDfprintf(stdout, "%s: calling check_flush_cache__empty_cache().\n",
+ HDfprintf(stdout, "%s: calling check_flush_cache__empty_cache().\n",
fcn_name);
}
@@ -9259,7 +9259,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
if ( show_progress ) {
- HDfprintf(stdout, "%s:%d:%d: running sanity checks on entry(1).\n",
+ HDfprintf(stdout, "%s:%d:%d: running sanity checks on entry(1).\n",
fcn_name, test_num, (int)pass);
}
@@ -9292,7 +9292,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
if ( show_progress ) {
- HDfprintf(stdout, "%s:%d:%d: running sanity checks on entry(2).\n",
+ HDfprintf(stdout, "%s:%d:%d: running sanity checks on entry(2).\n",
fcn_name, test_num, (int)pass);
}
@@ -9320,7 +9320,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
if ( show_progress ) {
- HDfprintf(stdout, "%s:%d:%d: running sanity checks on entry(3).\n",
+ HDfprintf(stdout, "%s:%d:%d: running sanity checks on entry(3).\n",
fcn_name, test_num, (int)pass);
}
@@ -9363,7 +9363,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
if ( show_progress ) {
- HDfprintf(stdout, "%s:%d:%d: Setting up the test.\n",
+ HDfprintf(stdout, "%s:%d:%d: Setting up the test.\n",
fcn_name, test_num, (int)pass);
}
@@ -9374,7 +9374,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
if ( show_progress ) {
- HDfprintf(stdout,
+ HDfprintf(stdout,
"%s:%d: Inserting entry(%d,%d) with flags 0x%x.\n",
fcn_name, test_num,
(int)(spec[i].entry_type),
@@ -9389,7 +9389,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
if ( show_progress ) {
- HDfprintf(stdout,
+ HDfprintf(stdout,
"%s:%d: Protecting entry(%d,%d).\n",
fcn_name, test_num,
(int)(spec[i].entry_type),
@@ -9400,7 +9400,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
if ( show_progress ) {
- HDfprintf(stdout,
+ HDfprintf(stdout,
"%s:%d: Unprotecting entry(%d,%d) with flags 0x%x ns = %d.\n",
fcn_name, test_num,
(int)(spec[i].entry_type),
@@ -9452,7 +9452,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
if ( show_progress ) {
- HDfprintf(stdout, "%s:%d:%d: Running the test.\n",
+ HDfprintf(stdout, "%s:%d:%d: Running the test.\n",
fcn_name, test_num, (int)pass);
}
@@ -9473,7 +9473,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
if ( show_progress ) {
- HDfprintf(stdout, "%s:%d:%d: Checking test results(1).\n",
+ HDfprintf(stdout, "%s:%d:%d: Checking test results(1).\n",
fcn_name, test_num, (int)pass);
}
@@ -9516,7 +9516,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
if ( show_progress ) {
- HDfprintf(stdout, "%s:%d:%d: Checking test results(2).\n",
+ HDfprintf(stdout, "%s:%d:%d: Checking test results(2).\n",
fcn_name, test_num, (int)pass);
}
@@ -9640,7 +9640,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
if ( show_progress ) {
- HDfprintf(stdout, "%s:%d:%d: Checking test results(3).\n",
+ HDfprintf(stdout, "%s:%d:%d: Checking test results(3).\n",
fcn_name, test_num, (int)pass);
}
@@ -9675,7 +9675,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
if ( show_progress ) {
- HDfprintf(stdout, "%s:%d:%d: Cleaning up after test(1).\n",
+ HDfprintf(stdout, "%s:%d:%d: Cleaning up after test(1).\n",
fcn_name, test_num, (int)pass);
}
@@ -9718,7 +9718,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
if ( show_progress ) {
- HDfprintf(stdout, "%s:%d:%d: Cleaning up after test(2).\n",
+ HDfprintf(stdout, "%s:%d:%d: Cleaning up after test(2).\n",
fcn_name, test_num, (int)pass);
}
@@ -9740,7 +9740,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
if ( show_progress ) {
- HDfprintf(stdout, "%s:%d:%d: Cleaning up after test(3).\n",
+ HDfprintf(stdout, "%s:%d:%d: Cleaning up after test(3).\n",
fcn_name, test_num, (int)pass);
}
@@ -9881,7 +9881,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
( cache_ptr->min_clean_size != (1 * 1024 * 1024 ) ) ) {
pass = FALSE;
- failure_mssg =
+ failure_mssg =
"unexpected cache config at start of flush op eviction test.";
} else {
@@ -9917,39 +9917,39 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
*/
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 0);
- unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 0,
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 0,
H5C__DIRTIED_FLAG | H5C__SIZE_CHANGED_FLAG,
(VARIABLE_ENTRY_SIZE / 2));
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 1);
- unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 1,
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 1,
H5C__NO_FLAGS_SET, (size_t)0);
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 2);
- unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 2,
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 2,
H5C__NO_FLAGS_SET, (size_t)0);
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 3);
- unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 3,
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 3,
H5C__DIRTIED_FLAG | H5C__SIZE_CHANGED_FLAG,
(VARIABLE_ENTRY_SIZE / 2));
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 4);
- unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 4,
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 4,
H5C__DIRTIED_FLAG | H5C__SIZE_CHANGED_FLAG,
(VARIABLE_ENTRY_SIZE / 2));
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 5);
- unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 5,
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 5,
H5C__DIRTIED_FLAG | H5C__SIZE_CHANGED_FLAG,
(VARIABLE_ENTRY_SIZE / 2));
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 6);
- unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 6,
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 6,
H5C__NO_FLAGS_SET, (size_t)0);
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 7);
- unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 7,
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 7,
H5C__NO_FLAGS_SET, (size_t)0);
if ( ( cache_ptr->index_len != 8 ) ||
@@ -10052,14 +10052,14 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
for ( i = 0; i < 31; i++ )
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
- unprotect_entry_with_size_change(file_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry_with_size_change(file_ptr, MONSTER_ENTRY_TYPE, i,
H5C__DIRTIED_FLAG, (size_t)0);
}
for ( i = 0; i < 1; i++ )
{
protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
- unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i,
+ unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i,
H5C__DIRTIED_FLAG, (size_t)0);
}
@@ -10127,7 +10127,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
num_large_entries = 2;
protect_entry(file_ptr, LARGE_ENTRY_TYPE, 1);
- unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, 1,
+ unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, 1,
H5C__DIRTIED_FLAG, (size_t)0);
if ( ( cache_ptr->index_len != 40 ) ||
@@ -10193,7 +10193,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
num_large_entries = 3;
protect_entry(file_ptr, LARGE_ENTRY_TYPE, 2);
- unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, 2,
+ unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, 2,
H5C__DIRTIED_FLAG, (size_t)0);
if ( ( cache_ptr->index_len != 40 ) ||
@@ -10266,11 +10266,11 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
num_large_entries = 5;
protect_entry(file_ptr, LARGE_ENTRY_TYPE, 3);
- unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, 3,
+ unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, 3,
H5C__DIRTIED_FLAG, (size_t)0);
protect_entry(file_ptr, LARGE_ENTRY_TYPE, 4);
- unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, 4,
+ unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, 4,
H5C__DIRTIED_FLAG, (size_t)0);
/* verify cache size */
@@ -10307,14 +10307,14 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
for ( i = 0; i < 31; i++ )
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
- unprotect_entry_with_size_change(file_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry_with_size_change(file_ptr, MONSTER_ENTRY_TYPE, i,
H5C__DIRTIED_FLAG, (size_t)0);
}
for ( i = 0; i < 5; i++ )
{
protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
- unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i,
+ unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i,
H5C__DIRTIED_FLAG, (size_t)0);
}
@@ -10374,7 +10374,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
for ( i = 5; i < 8; i++ )
{
protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
- unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i,
+ unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i,
H5C__DIRTIED_FLAG, (size_t)0);
}
@@ -10436,7 +10436,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
for ( i = 8; i < 9; i++ )
{
protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
- unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i,
+ unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i,
H5C__DIRTIED_FLAG, (size_t)0);
}
@@ -10502,7 +10502,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
for ( i = 9; i < 10; i++ )
{
protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
- unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i,
+ unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i,
H5C__DIRTIED_FLAG, (size_t)0);
}
@@ -10538,14 +10538,14 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
for ( i = 0; i < 31; i++ )
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
- unprotect_entry_with_size_change(file_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry_with_size_change(file_ptr, MONSTER_ENTRY_TYPE, i,
H5C__DIRTIED_FLAG, (size_t)0);
}
for ( i = 0; i < 10; i++ )
{
protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
- unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i,
+ unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i,
H5C__DIRTIED_FLAG, (size_t)0);
}
@@ -10649,7 +10649,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
for ( i = 10; i < 12; i++ )
{
protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
- unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i,
+ unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i,
H5C__DIRTIED_FLAG, (size_t)0);
}
@@ -10682,14 +10682,14 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
for ( i = 0; i < num_monster_entries; i++ )
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
- unprotect_entry_with_size_change(file_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry_with_size_change(file_ptr, MONSTER_ENTRY_TYPE, i,
H5C__DIRTIED_FLAG, (size_t)0);
}
for ( i = 0; i < num_large_entries; i++ )
{
protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
- unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i,
+ unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i,
H5C__DIRTIED_FLAG, (size_t)0);
}
@@ -10776,7 +10776,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
for ( i = 12; i < 14; i++ )
{
protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
- unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i,
+ unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i,
H5C__DIRTIED_FLAG, (size_t)0);
}
@@ -14929,7 +14929,7 @@ check_resize_entry(void)
if ( pass ) {
result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
- &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr, (void *)entry_ptr,
+ &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr, (void *)entry_ptr,
H5C__SIZE_CHANGED_FLAG | H5C__DIRTIED_FLAG, (LARGE_ENTRY_SIZE / 2));
if ( result < 0 ) {
@@ -15000,7 +15000,7 @@ check_resize_entry(void)
if ( pass ) {
result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
- &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr, (void *)entry_ptr,
+ &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr, (void *)entry_ptr,
(H5C__DIRTIED_FLAG | H5C__SIZE_CHANGED_FLAG), LARGE_ENTRY_SIZE);
if ( result < 0 ) {
@@ -15100,8 +15100,8 @@ check_resize_entry(void)
if ( pass ) {
- result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
- &reported_entry_size, &in_cache,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
+ &reported_entry_size, &in_cache,
&is_dirty, &is_protected, &is_pinned);
if ( result < 0 ) {
@@ -15192,7 +15192,7 @@ check_resize_entry(void)
protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0);
- unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0, FALSE,
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0, FALSE,
H5C__UNPIN_ENTRY_FLAG | H5C__DELETED_FLAG);
if ( pass ) {
@@ -15335,7 +15335,7 @@ check_resize_entry(void)
if ( pass ) {
result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
- &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr, (void *)entry_ptr,
+ &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr, (void *)entry_ptr,
H5C__SIZE_CHANGED_FLAG | H5C__DIRTIED_FLAG, (LARGE_ENTRY_SIZE / 2));
if ( result < 0 ) {
@@ -15408,7 +15408,7 @@ check_resize_entry(void)
if ( pass ) {
result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
- &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr, (void *)entry_ptr,
+ &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr, (void *)entry_ptr,
(H5C__DIRTIED_FLAG | H5C__SIZE_CHANGED_FLAG), LARGE_ENTRY_SIZE);
if ( result < 0 ) {
@@ -15602,7 +15602,7 @@ check_resize_entry(void)
protect_entry(file_ptr, LARGE_ENTRY_TYPE, 3);
- unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 3, FALSE,
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 3, FALSE,
H5C__UNPIN_ENTRY_FLAG | H5C__DELETED_FLAG);
if ( pass ) {
@@ -15826,7 +15826,7 @@ check_evictions_enabled(void)
for ( i = 0; i < 16 ; i++ )
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
- unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
FALSE, H5C__NO_FLAGS_SET);
}
@@ -15857,7 +15857,7 @@ check_evictions_enabled(void)
/* protect and unprotect another entry */
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 16);
- unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 16,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 16,
FALSE, H5C__NO_FLAGS_SET);
if ( show_progress ) /* 7 */
@@ -16022,7 +16022,7 @@ check_evictions_enabled(void)
/* protect and unprotect another entry */
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 18);
- unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 18,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 18,
FALSE, H5C__NO_FLAGS_SET);
if ( show_progress ) /* 15 */
@@ -16095,7 +16095,7 @@ check_evictions_enabled(void)
/* protect and unprotect an entry that is in the cache */
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 19);
- unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 19,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 19,
FALSE, H5C__NO_FLAGS_SET);
if ( show_progress ) /* 20 */
@@ -16124,7 +16124,7 @@ check_evictions_enabled(void)
/* protect and unprotect an entry that isn't in the cache */
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 20);
- unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 20,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 20,
FALSE, H5C__NO_FLAGS_SET);
if ( show_progress ) /* 22 */
@@ -16247,7 +16247,7 @@ check_evictions_enabled(void)
* the cache to grow.
*/
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 21);
- unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 21,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 21,
FALSE, H5C__NO_FLAGS_SET);
@@ -21619,11 +21619,11 @@ check_auto_cache_resize(void)
if ( pass ) {
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
- unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE,
+ unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE,
H5C__NO_FLAGS_SET);
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11);
- unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE,
+ unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE,
H5C__NO_FLAGS_SET);
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12);
@@ -21792,7 +21792,7 @@ check_auto_cache_resize(void)
if ( pass ) {
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
- unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE,
+ unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE,
H5C__PIN_ENTRY_FLAG);
resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, 2 * 1024, TRUE);
@@ -21831,7 +21831,7 @@ check_auto_cache_resize(void)
if ( pass ) {
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11);
- unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE,
+ unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE,
H5C__PIN_ENTRY_FLAG);
resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, 10 * 1024, TRUE);
@@ -21852,7 +21852,7 @@ check_auto_cache_resize(void)
if ( pass ) {
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12);
- unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE,
+ unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE,
H5C__PIN_ENTRY_FLAG);
resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, 10 * 1024, TRUE);
@@ -21876,15 +21876,15 @@ check_auto_cache_resize(void)
if ( pass ) {
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
- unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE,
+ unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE,
H5C__UNPIN_ENTRY_FLAG);
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11);
- unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE,
+ unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE,
H5C__UNPIN_ENTRY_FLAG);
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12);
- unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE,
+ unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE,
H5C__UNPIN_ENTRY_FLAG);
if ( ( pass ) &&
@@ -21944,7 +21944,7 @@ check_auto_cache_resize(void)
if ( pass ) {
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
- unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE,
+ unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE,
H5C__PIN_ENTRY_FLAG);
resize_pinned_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10, 2 * 1024);
@@ -21983,7 +21983,7 @@ check_auto_cache_resize(void)
if ( pass ) {
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11);
- unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE,
+ unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE,
H5C__PIN_ENTRY_FLAG);
resize_pinned_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11, 10 * 1024);
@@ -22004,7 +22004,7 @@ check_auto_cache_resize(void)
if ( pass ) {
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12);
- unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE,
+ unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE,
H5C__PIN_ENTRY_FLAG);
resize_pinned_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12, 10 * 1024);
@@ -22028,15 +22028,15 @@ check_auto_cache_resize(void)
if ( pass ) {
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
- unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE,
+ unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE,
H5C__UNPIN_ENTRY_FLAG);
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11);
- unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE,
+ unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE,
H5C__UNPIN_ENTRY_FLAG);
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12);
- unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE,
+ unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE,
H5C__UNPIN_ENTRY_FLAG);
if ( ( pass ) &&
@@ -22157,7 +22157,7 @@ check_auto_cache_resize(void)
rpt_fcn_called = FALSE;
protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0);
- unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0, NO_CHANGE,
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0, NO_CHANGE,
H5C__NO_FLAGS_SET);
if ( ( pass ) &&
@@ -22184,7 +22184,7 @@ check_auto_cache_resize(void)
rpt_fcn_called = FALSE;
protect_entry(file_ptr, LARGE_ENTRY_TYPE, 1);
- unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 1, NO_CHANGE,
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 1, NO_CHANGE,
H5C__NO_FLAGS_SET);
if ( ( pass ) &&
@@ -22210,10 +22210,10 @@ check_auto_cache_resize(void)
rpt_fcn_called = FALSE;
protect_entry(file_ptr, LARGE_ENTRY_TYPE, 2);
- unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 2, NO_CHANGE,
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 2, NO_CHANGE,
H5C__NO_FLAGS_SET);
protect_entry(file_ptr, LARGE_ENTRY_TYPE, 3);
- unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 3, NO_CHANGE,
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 3, NO_CHANGE,
H5C__NO_FLAGS_SET);
if ( ( pass ) &&
@@ -22267,7 +22267,7 @@ check_auto_cache_resize(void)
rpt_fcn_called = FALSE;
protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0);
- unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0, NO_CHANGE,
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0, NO_CHANGE,
H5C__NO_FLAGS_SET);
if ( ( pass ) &&
@@ -28742,7 +28742,7 @@ check_auto_cache_resize_aux_fcns(void)
failure_mssg =
"H5C_get_cache_size reports unexpected cur_size 5.\n";
- }
+ }
}
if ( pass ) {
@@ -28792,13 +28792,13 @@ check_auto_cache_resize_aux_fcns(void)
*
* A 'metadata blizzard' in this context occurs when the cache
* gets completely filled with all dirty entries. Upon needing
- * to make space in the cache, the cache then has no clean
+ * to make space in the cache, the cache then has no clean
* entries ready to evict, and must clean every dirty entry
* in the cache first, due to the second chance replacement
* policy. (i.e. after cleaning an entry, it is bumped to the
* top of the LRU to make a second pass before eviction).
- * The massive amount of sequential writes to disk while
- * flushing the entire cache is what constitutes a 'metadata
+ * The massive amount of sequential writes to disk while
+ * flushing the entire cache is what constitutes a 'metadata
* blizzard'.
*
* Return: void
@@ -28821,11 +28821,11 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
H5F_t * file_ptr = NULL;
H5C_t * cache_ptr = NULL;
hbool_t show_progress = FALSE;
- int32_t checkpoint = 0;
+ int32_t checkpoint = 0;
int32_t entry_idx = 0;
int32_t i;
- /* Expected loaded status of entries depends on how they get into
+ /* Expected loaded status of entries depends on how they get into
* the cache. Insertions = not loaded, protect/unprotect = loaded.
*/
hbool_t loaded = (hbool_t)!(fill_via_insertion);
@@ -29001,19 +29001,19 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
}
if ( show_progress) /* 0 */
- HDfprintf(stdout, "\n%s: check point %d -- pass %d\n",
+ HDfprintf(stdout, "\n%s: check point %d -- pass %d\n",
fcn_name, checkpoint++, pass);
if ( pass ) {
-
+
/* Set up the cache.
*
- * The max_cache_size should have room for 50 entries.
- * The min_clean_size is half of that, or 25 entries.
+ * The max_cache_size should have room for 50 entries.
+ * The min_clean_size is half of that, or 25 entries.
*/
file_ptr = setup_cache((size_t)(50 * entry_size), /* max_cache_size */
(size_t)(25 * entry_size)); /* min_clean_size */
-
+
if ( file_ptr == NULL) {
pass = FALSE;
@@ -29022,37 +29022,37 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
}
else
cache_ptr = file_ptr->shared->cache;
- }
+ }
if ( show_progress) /* 1 */
- HDfprintf(stdout, "%s: check point %d -- pass %d\n",
+ HDfprintf(stdout, "%s: check point %d -- pass %d\n",
fcn_name, checkpoint++, pass);
/* ========================================================================
* ========================================================================
* Phase 1:
- *
- * Inserting dirty entries into an empty cache, until the cache
+ *
+ * Inserting dirty entries into an empty cache, until the cache
* violates the min_clean_size requirement. The expected result is
* that none of the inserted entries during this phase will get
* flushed or evicted.
- *
+ *
* This verifies that while maintaining min_clean_size, we don't go
* overboard and flush entries that we don't need to flush.
- *
+ *
* ========================================================================
* ========================================================================
*/
if ( pass ) {
- /* Insert 26 entries (indexes 0 through 25) into the cache.
+ /* Insert 26 entries (indexes 0 through 25) into the cache.
*
- * Note that we are inserting 26 entries, and not 25, because the cache
- * will only try to adhere to the min_clean_size if it's currently
- * being violated. Thus, on insertion of the 26th entry, since the
- * min_clean_size will not be violated, it will accept the insertion
- * without having to make clean space.
+ * Note that we are inserting 26 entries, and not 25, because the cache
+ * will only try to adhere to the min_clean_size if it's currently
+ * being violated. Thus, on insertion of the 26th entry, since the
+ * min_clean_size will not be violated, it will accept the insertion
+ * without having to make clean space.
*/
for (entry_idx = 0; entry_idx < 26; entry_idx++) {
@@ -29076,8 +29076,8 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
H5C__NO_FLAGS_SET); /* unsigned int flags */
}
- /* Change expected values, and verify the status of the entries
- * after each insertion
+ /* Change expected values, and verify the status of the entries
+ * after each insertion
*/
expected[entry_idx].in_cache = TRUE;
expected[entry_idx].is_dirty = TRUE;
@@ -29091,30 +29091,30 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
}
if ( show_progress) /* 2 */
- HDfprintf(stdout, "%s: check point %d -- pass %d\n",
+ HDfprintf(stdout, "%s: check point %d -- pass %d\n",
fcn_name, checkpoint++, pass);
/* ========================================================================
* ========================================================================
* Phase 2:
- *
+ *
* Inserting entries into a cache that violates the min_clean_size,
* until the cache is full. The expected result is that each insertion
- * will result in the flushing of a dirty entry in the cache.
+ * will result in the flushing of a dirty entry in the cache.
*
* This verifies that we maintain the min_clean_size. By doing so, we
* prevent building the situation in which a 'metadata blizzard' would
* occur (i.e., the cache being completely filled with dirty entries).
- *
+ *
* ========================================================================
* ========================================================================
*/
-
+
if ( pass ) {
/* Insert the 27th entry (index = 26) into the cache.
- *
- * This should cause the cache to flush its least recently used entry
+ *
+ * This should cause the cache to flush its least recently used entry
* before the insertion because it doesn't satisfy the min_clean_size
* constraint.
*/
@@ -29137,15 +29137,15 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
}
/* Verify the status of the entries.
- *
+ *
* Expected status is that there are 27 entries in the cache, and
* entry number 0 has been cleaned.
- *
+ *
* Changes from last entry verification:
* - entry w/ index 0 has now been flushed and is now clean.
* - entry w/ index 26 is now in the cache and dirty.
*/
-
+
/* entry w/ index 0 has now been flushed and is now clean. */
expected[0].flushed = TRUE;
expected[0].is_dirty = FALSE;
@@ -29163,7 +29163,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
}
if ( show_progress) /* 3 */
- HDfprintf(stdout, "%s: check point %d -- pass %d\n",
+ HDfprintf(stdout, "%s: check point %d -- pass %d\n",
fcn_name, checkpoint++, pass);
if ( pass ) {
@@ -29193,10 +29193,10 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
}
/* Verify the status of the entries.
- *
+ *
* Expected status is that there are 28 entries in the cache, and
* entry numbers 0 and 1 have been cleaned.
- *
+ *
* Changes from last entry verification:
* - entry w/ index 1 has now been flushed and is now clean.
* - entry w/ index 27 is now in the cache and dirty.
@@ -29219,7 +29219,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
}
if ( show_progress) /* 4 */
- HDfprintf(stdout, "%s: check point %d -- pass %d\n",
+ HDfprintf(stdout, "%s: check point %d -- pass %d\n",
fcn_name, checkpoint++, pass);
if ( pass ) {
@@ -29247,7 +29247,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
}
/* Expected staus is that after each insertion, the entry
- * inserted 26 insertions ago has been flushed, and the
+ * inserted 26 insertions ago has been flushed, and the
* entry currently getting inserted is now in the cache and
* dirty.
*/
@@ -29257,7 +29257,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
expected[entry_idx].in_cache = TRUE;
expected[entry_idx].is_dirty = TRUE;
expected[entry_idx].loaded = (unsigned char)loaded;
-
+
/* verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
entry_idx, /* int tag */
@@ -29274,23 +29274,23 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
}
if ( show_progress) /* 5 */
- HDfprintf(stdout, "%s: check point %d -- pass %d\n",
+ HDfprintf(stdout, "%s: check point %d -- pass %d\n",
fcn_name, checkpoint++, pass);
/* ========================================================================
* ========================================================================
* Phase 3:
- *
- * Inserting entries into a cache that is completely full. Insertions
+ *
+ * Inserting entries into a cache that is completely full. Insertions
* of new entries will force evictions of old entries, but since the
- * min_clean_size has been maintained, doing so will not result in
+ * min_clean_size has been maintained, doing so will not result in
* the entire cache getting flushed in order to evict a single entry,
* as a clean entry will be available to flush reasonably close to
* the bottom of the LRU.
- *
+ *
* This verifies that with a maintained min_clean_size, a metadata
* blizzard does not occur on insertion.
- *
+ *
* ========================================================================
* ========================================================================
*/
@@ -29298,7 +29298,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
if ( pass ) {
/* Insert the 51st entry (index = 50) into the cache.
- *
+ *
* The cache is full prior to the insertion, so it will
* have to evict in order to make room for the new entry.
*/
@@ -29321,13 +29321,13 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
}
/* Verify the status of the entries.
- *
+ *
* Changes from last entry verification:
* - entry w/ index 0 has been evicted.
* - entries w/ indices 24,25 have now been flushed and are clean.
* - entry w/ index 50 is now in the cache and dirty.
*/
-
+
/* entry w/ index 0 has been evicted. */
expected[0].in_cache = FALSE;
expected[0].destroyed = TRUE;
@@ -29351,16 +29351,16 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
}
if ( show_progress) /* 6 */
- HDfprintf(stdout, "%s: check point %d -- pass %d\n",
+ HDfprintf(stdout, "%s: check point %d -- pass %d\n",
fcn_name, checkpoint++, pass);
if ( pass ) {
/* Insert 49 more entries (indices 51-99) into the cache.
- *
- * The cache will be flushing an entry on each insertion, and
- * evicting an entry on each insertion.
+ *
+ * The cache will be flushing an entry on each insertion, and
+ * evicting an entry on each insertion.
*
* After each insertion, verify the expected status of the
* entries in the cache.
@@ -29377,7 +29377,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
protect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
entry_idx); /* int32-t idx */
-
+
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
entry_idx, /* int32_t idx */
@@ -29394,21 +29394,21 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
expected[entry_idx - 50].in_cache = FALSE;
expected[entry_idx - 50].destroyed = TRUE;
- /* If the newly inserted entry is among the first 24
+ /* If the newly inserted entry is among the first 24
* insertions in this loop, then the insertion will
* have resulted in a flush of the entry inserted
* 25 insertions ago. */
if (entry_idx < 75) {
-
+
expected[entry_idx - 25].flushed = TRUE;
expected[entry_idx - 25].is_dirty = FALSE;
}
/* If the newly inserted entry is among the last
* 25 insertions in this loop, then the insertion will
* have resulted in a flush of the entry inserted 26
- * insertions ago. This switch is because there was two
+ * insertions ago. This switch is because there was two
* consecutive clean entries in the cache (due to 51/49
- * dirty/clean ratio when full), so instead of
+ * dirty/clean ratio when full), so instead of
* flush-then-evict, it switches to evict-then-flush. */
else {
@@ -29425,13 +29425,13 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
}
if ( show_progress) /* 7 */
- HDfprintf(stdout, "%s: check point %d -- pass %d\n",
+ HDfprintf(stdout, "%s: check point %d -- pass %d\n",
fcn_name, checkpoint++, pass);
/* ========================================================================
* ========================================================================
* Phase 4:
- *
+ *
* Flushing the entire cache, and then inserting entries into a cache
* that is completely full, but all clean.
*
@@ -29439,18 +29439,18 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
* into an empty cache, we're inserting into a full cache that's all
* clean, thus an eviction occurs before each insertion.
*
- * When the cache finally hits the point of violating the
+ * When the cache finally hits the point of violating the
* min_clean_size, the bottom half of the LRU will be filled with
* clean entries and the top half will be filled with recently inserted
* dirty entries. We'll then verify that an insertion will only evict
* one entry and flush one entry, and no more.
- *
+ *
* ========================================================================
* ========================================================================
*/
if ( pass ) {
-
+
/* Flush the cache.
*
* We're doing this so we can repeat the above insertions, but
@@ -29462,12 +29462,12 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
FALSE, /* hbool_t destory_entries */
FALSE, /* hbool_t dump_stats */
FALSE); /* hbool_t dump_detailed_stats */
-
+
/* Verify that the cache is clean */
verify_clean();
/* Verify the status of the entries.
- *
+ *
* Changes from last entry verification:
* - entries w/ indices 74-99 have been flushed.
*/
@@ -29485,7 +29485,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
}
if ( show_progress) /* 8 */
- HDfprintf(stdout, "%s: check point %d -- pass %d\n",
+ HDfprintf(stdout, "%s: check point %d -- pass %d\n",
fcn_name, checkpoint++, pass);
if ( pass ) {
@@ -29536,7 +29536,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
}
if ( show_progress) /* 9 */
- HDfprintf(stdout, "%s: check point %d -- pass %d\n",
+ HDfprintf(stdout, "%s: check point %d -- pass %d\n",
fcn_name, checkpoint++, pass);
if ( pass ) {
@@ -29561,7 +29561,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
}
/* Verify the status of the entries.
- *
+ *
* Changes from last entry verification:
* - entry w/ index 76 is evicted.
* - entry w/ index 100 is cleaned.
@@ -29571,7 +29571,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
/* entry w/ index 76 has been evicted. */
expected[76].in_cache = FALSE;
expected[76].destroyed = TRUE;
-
+
/* entry w/ index 100 has now been flushed and is now clean. */
expected[100].flushed = TRUE;
expected[100].is_dirty = FALSE;
@@ -29589,7 +29589,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
}
if ( show_progress) /* 10 */
- HDfprintf(stdout, "%s: check point %d -- pass %d\n",
+ HDfprintf(stdout, "%s: check point %d -- pass %d\n",
fcn_name, checkpoint++, pass);
if ( pass ) {
@@ -29639,18 +29639,18 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
}
if ( show_progress) /* 11 */
- HDfprintf(stdout, "%s: check point %d -- pass %d\n",
+ HDfprintf(stdout, "%s: check point %d -- pass %d\n",
fcn_name, checkpoint++, pass);
if ( pass ) {
-
+
/* We're done with testing. We can take down the cache. */
takedown_cache(file_ptr, FALSE, FALSE);
reset_entries();
}
if ( show_progress) /* 12 */
- HDfprintf(stdout, "%s: check point %d -- pass %d\n",
+ HDfprintf(stdout, "%s: check point %d -- pass %d\n",
fcn_name, checkpoint++, pass);
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -29734,8 +29734,8 @@ main(void)
nerrs += check_auto_cache_resize_epoch_markers();
nerrs += check_auto_cache_resize_input_errs();
nerrs += check_auto_cache_resize_aux_fcns();
- nerrs += check_metadata_blizzard_absence(TRUE);
- nerrs += check_metadata_blizzard_absence(FALSE);
+ nerrs += check_metadata_blizzard_absence(TRUE);
+ nerrs += check_metadata_blizzard_absence(FALSE);
return(nerrs > 0);
}
diff --git a/test/cache_common.c b/test/cache_common.c
index b9dcd66..eb40a0e 100644
--- a/test/cache_common.c
+++ b/test/cache_common.c
@@ -35,20 +35,20 @@ const char *FILENAME[] = {
NULL
};
-hid_t saved_fapl_id = H5P_DEFAULT; /* store the fapl id here between
- * cache setup and takedown. Note
+hid_t saved_fapl_id = H5P_DEFAULT; /* store the fapl id here between
+ * cache setup and takedown. Note
* that if saved_fapl_id == H5P_DEFAULT,
- * we assume that there is no fapl to
+ * we assume that there is no fapl to
* close.
*/
-hid_t saved_fid = -1; /* store the file id here between cache setup
+hid_t saved_fid = -1; /* store the file id here between cache setup
* and takedown.
*/
-H5C_t * saved_cache = NULL; /* store the pointer to the instance of
- * of H5C_t created by H5Fcreate()
- * here between test cache setup and
+H5C_t * saved_cache = NULL; /* store the pointer to the instance of
+ * of H5C_t created by H5Fcreate()
+ * here between test cache setup and
* shutdown.
*/
@@ -1500,7 +1500,7 @@ execute_flush_op(H5F_t * file_ptr,
/* change the size of some other entry */
- resize_entry(file_ptr, op_ptr->type, op_ptr->idx,
+ resize_entry(file_ptr, op_ptr->type, op_ptr->idx,
op_ptr->size, op_ptr->flag);
}
break;
@@ -1866,7 +1866,7 @@ resize_pinned_entry(H5C_t * cache_ptr,
entry_ptr->size = new_size;
- result = H5C_resize_pinned_entry((void *)entry_ptr,
+ result = H5C_resize_pinned_entry((void *)entry_ptr,
new_size);
if ( result != SUCCEED ) {
@@ -2321,13 +2321,13 @@ setup_cache(size_t max_cache_size,
< 0 ) {
core_file_driver_failed = TRUE;
-
+
if ( verbose ) {
HDfprintf(stdout, "%s: H5Fcreate() with CFD failed.\n", fcn_name);
}
} else {
-
+
saved_fapl_id = fapl_id;
}
}
@@ -2336,12 +2336,12 @@ setup_cache(size_t max_cache_size,
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- /* if we either aren't using the core file driver, or a create
+ /* if we either aren't using the core file driver, or a create
* with the core file driver failed, try again with a regular file.
* If this fails, we are cooked.
*/
if ( ( pass ) && ( fid < 0 ) ) {
-
+
fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id);
saved_fid = fid;
@@ -2350,7 +2350,7 @@ setup_cache(size_t max_cache_size,
pass = FALSE;
failure_mssg = "H5Fcreate() failed.";
-
+
if ( verbose ) {
HDfprintf(stdout, "%s: H5Fcreate() failed.\n", fcn_name);
}
@@ -2371,7 +2371,7 @@ setup_cache(size_t max_cache_size,
pass = FALSE;
failure_mssg = "H5Fflush() failed.";
-
+
if ( verbose ) {
HDfprintf(stdout, "%s: H5Fflush() failed.\n", fcn_name);
}
@@ -2384,7 +2384,7 @@ setup_cache(size_t max_cache_size,
pass = FALSE;
failure_mssg = "Can't get file_ptr.";
-
+
if ( verbose ) {
HDfprintf(stdout, "%s: H5Fflush() failed.\n", fcn_name);
}
@@ -2414,15 +2414,15 @@ setup_cache(size_t max_cache_size,
* and we have modified many cache routines to use a file
* pointer to look up the target cache.
*
- * Thus we now make note of the address of the instance of
- * H5C_t created by the call to H5Fcreate(), set
+ * Thus we now make note of the address of the instance of
+ * H5C_t created by the call to H5Fcreate(), set
* file_ptr->shared->cache to NULL, call H5C_create()
* to allocate a new instance of H5C_t for test purposes,
- * and store than new instance's address in
+ * and store than new instance's address in
* file_ptr->shared->cache.
*
* On shut down, we call H5C_dest on our instance of H5C_t,
- * set file_ptr->shared->cache to point to the original
+ * set file_ptr->shared->cache to point to the original
* instance, and then close the file normally.
*/
@@ -2449,7 +2449,7 @@ setup_cache(size_t max_cache_size,
fcn_name, mile_stone++, (int)pass);
if ( pass ) {
-
+
if ( cache_ptr == NULL ) {
pass = FALSE;
@@ -2476,14 +2476,14 @@ setup_cache(size_t max_cache_size,
if ( pass ) { /* allocate space for test entries */
- actual_base_addr = H5MF_alloc(file_ptr, H5FD_MEM_DEFAULT, H5P_DEFAULT,
+ actual_base_addr = H5MF_alloc(file_ptr, H5FD_MEM_DEFAULT, H5P_DEFAULT,
(hsize_t)(ADDR_SPACE_SIZE + BASE_ADDR));
if ( actual_base_addr == HADDR_UNDEF ) {
pass = FALSE;
failure_mssg = "H5MF_alloc() failed.";
-
+
if ( verbose ) {
HDfprintf(stdout, "%s: H5MF_alloc() failed.\n", fcn_name);
}
@@ -2498,7 +2498,7 @@ setup_cache(size_t max_cache_size,
failure_mssg = "actual_base_addr > BASE_ADDR";
if ( verbose ) {
- HDfprintf(stdout, "%s: actual_base_addr > BASE_ADDR.\n",
+ HDfprintf(stdout, "%s: actual_base_addr > BASE_ADDR.\n",
fcn_name);
}
}
@@ -2555,7 +2555,7 @@ takedown_cache(H5F_t * file_ptr,
H5C_stats(cache_ptr, "test cache", dump_detailed_stats);
}
-
+
flush_cache(file_ptr, TRUE, FALSE, FALSE);
H5C_dest(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT);
@@ -2581,7 +2581,7 @@ takedown_cache(H5F_t * file_ptr,
if ( NULL == file_ptr ) {
file_ptr = (H5F_t *)H5I_object_verify(saved_fid, H5I_FILE);
HDassert ( file_ptr );
- }
+ }
H5MF_xfree(file_ptr, H5FD_MEM_DEFAULT, H5P_DEFAULT, saved_actual_base_addr,
(hsize_t)(ADDR_SPACE_SIZE + BASE_ADDR));
@@ -2753,7 +2753,7 @@ flush_cache(H5F_t * file_ptr,
( cache_ptr->dirty_index_size != 0 ) ) ) {
if ( verbose ) {
- HDfprintf(stdout,
+ HDfprintf(stdout,
"%s: unexpected il/is/cis/dis = %lld/%lld/%lld/%lld.\n",
fcn_name,
(long long)(cache_ptr->index_len),
@@ -2762,7 +2762,7 @@ flush_cache(H5F_t * file_ptr,
(long long)(cache_ptr->dirty_index_size));
}
pass = FALSE;
- failure_mssg =
+ failure_mssg =
"non zero index len/sizes after H5C_flush_cache() with invalidate.";
}
@@ -3687,7 +3687,7 @@ unprotect_entry_with_size_change(H5F_t * file_ptr,
if ( result < 0 )
HDfprintf(stdout, "%s: H5C_unprotect() failed.\n", fcn_name);
- if ( entry_ptr->header.is_protected )
+ if ( entry_ptr->header.is_protected )
HDfprintf(stdout, "%s: entry still protected?!?.\n", fcn_name);
if ( entry_ptr->header.type != &(types[type]) )
@@ -4214,7 +4214,7 @@ row_major_scan_backward(H5F_t * file_ptr,
if ( pass ) {
cache_ptr = file_ptr->shared->cache;
-
+
HDassert( cache_ptr != NULL );
HDassert( lag >= 10 );
@@ -4989,7 +4989,7 @@ hl_col_major_scan_backward(H5F_t * file_ptr,
if ( pass ) {
cache_ptr = file_ptr->shared->cache;
-
+
HDassert( cache_ptr != NULL );
HDassert( lag > 5 );
HDassert( max_index >= 500 );
diff --git a/test/cache_common.h b/test/cache_common.h
index 0009ab3..eb24964 100644
--- a/test/cache_common.h
+++ b/test/cache_common.h
@@ -75,10 +75,10 @@
#define MAX_ENTRIES (10 * 1024)
-/* The choice of the BASE_ADDR below is arbitrary -- it just has to be
+/* The choice of the BASE_ADDR below is arbitrary -- it just has to be
* larger than the superblock.
*/
-#define BASE_ADDR (haddr_t)1024
+#define BASE_ADDR (haddr_t)1024
#define PICO_BASE_ADDR BASE_ADDR
#define NANO_BASE_ADDR (haddr_t)(PICO_BASE_ADDR + \
(PICO_ENTRY_SIZE * NUM_PICO_ENTRIES))
diff --git a/test/dsets.c b/test/dsets.c
index 2ec2a68..1b2aca4 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -183,7 +183,7 @@ const char *FILENAME[] = {
#define BYPASS_DIM 1000
#define BYPASS_CHUNK_DIM 500
#define BYPASS_FILL_VALUE 7
-
+
/* Declarations for test_idx_compatible() */
#define FIXED_IDX_FILE "fixed_idx.h5"
#define DSET "dset"
@@ -818,7 +818,7 @@ error:
HDfree(wbuf);
if(rbuf)
HDfree(rbuf);
-
+
H5E_BEGIN_TRY {
/* Close file */
H5Sclose(space);
@@ -1056,16 +1056,16 @@ test_tconv(hid_t file)
return 0;
error:
- if(out)
+ if(out)
HDfree(out);
- if(in)
+ if(in)
HDfree(in);
-
+
H5E_BEGIN_TRY {
H5Dclose(dataset);
H5Sclose(space);
} H5E_END_TRY;
-
+
return -1;
}
@@ -1735,7 +1735,7 @@ error:
*
* Modifications:
* Make copy of data file since the test writes to the file.
- * Larry Knox, October 14, 2009
+ * Larry Knox, October 14, 2009
*
*-------------------------------------------------------------------------
*/
@@ -1753,12 +1753,12 @@ test_filter_noencoder(const char *dset_name)
int test_ints[10] = { 12 };
int read_buf[10];
int i;
-
+
/* Make a local copy of the file since this test writes to the data file
- from svn. */
- if (h5_make_local_copy(NOENCODER_FILENAME, NOENCODER_COPY_FILENAME) < 0)
+ from svn. */
+ if (h5_make_local_copy(NOENCODER_FILENAME, NOENCODER_COPY_FILENAME) < 0)
goto error;
-
+
/* Open file */
file_id = H5Fopen(NOENCODER_COPY_FILENAME, H5F_ACC_RDWR, H5P_DEFAULT);
if(file_id < 0) goto error;
@@ -5566,9 +5566,9 @@ error:
/*-------------------------------------------------------------------------
* Function: test_copy_dcpl
*
- * Purpose: Verifies whether the copy of dataset creation property
+ * Purpose: Verifies whether the copy of dataset creation property
* list works. It tests the DCPL for chunked layout with
- * filter and for contiguous layout with external storage.
+ * filter and for contiguous layout with external storage.
* (Please see #1608 in Bugzilla)
*
* Return: Success: 0
@@ -5604,7 +5604,7 @@ test_copy_dcpl(hid_t file, hid_t fapl)
if(H5Pset_fletcher32(dcpl) < 0) TEST_ERROR
/* Create first dataset of chunking with filter */
- if((dsid1 = H5Dcreate2(file, DSET_COPY_DCPL_NAME_1, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl,
+ if((dsid1 = H5Dcreate2(file, DSET_COPY_DCPL_NAME_1, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl,
H5P_DEFAULT)) < 0) TEST_ERROR
/* Close dataset */
@@ -5629,7 +5629,7 @@ test_copy_dcpl(hid_t file, hid_t fapl)
if(H5Pset_external(dcpl, COPY_DCPL_EXTFILE_NAME, 0, 500*4096*sizeof(int)) < 0) TEST_ERROR
/* Create second dataset of contiguous layout with external storage */
- if((dsid2 = H5Dcreate2(file, DSET_COPY_DCPL_NAME_2, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl,
+ if((dsid2 = H5Dcreate2(file, DSET_COPY_DCPL_NAME_2, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl,
H5P_DEFAULT)) < 0) TEST_ERROR
/* Close dataset */
@@ -5646,7 +5646,7 @@ test_copy_dcpl(hid_t file, hid_t fapl)
if(H5Dclose (dsid2) < 0) TEST_ERROR
/* Create a second file and create 2 datasets with the copies of the DCPLs in the first
- * file. Test whether the copies of DCPLs work. */
+ * file. Test whether the copies of DCPLs work. */
h5_fixname(FILENAME[11], fapl, filename, sizeof filename);
if((new_file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
@@ -5662,10 +5662,10 @@ test_copy_dcpl(hid_t file, hid_t fapl)
/* Close datasets */
if(H5Dclose (new_dsid1) < 0) TEST_ERROR
- if(H5Dclose (new_dsid2) < 0) TEST_ERROR
+ if(H5Dclose (new_dsid2) < 0) TEST_ERROR
/* Close the second file */
- if(H5Fclose (new_file) < 0) TEST_ERROR
+ if(H5Fclose (new_file) < 0) TEST_ERROR
/* Close dataset creation property lists */
if(H5Pclose(dcpl) < 0) TEST_ERROR
@@ -6911,7 +6911,7 @@ error:
*
* Purpose: When the chunk size is bigger than the cache size and the
* chunk isn't on disk, this test verifies that the library
- * bypasses the cache.
+ * bypasses the cache.
*
* Note: This test is not very conclusive - it doesn't actually check
* if the chunks bypass the cache... :-( -QAK
@@ -6937,7 +6937,7 @@ test_big_chunks_bypass_cache(hid_t fapl)
size_t rdcc_nelmts, rdcc_nbytes;
int fvalue = BYPASS_FILL_VALUE;
hsize_t count, stride, offset, block;
- static int wdata[BYPASS_CHUNK_DIM/2], rdata1[BYPASS_DIM],
+ static int wdata[BYPASS_CHUNK_DIM/2], rdata1[BYPASS_DIM],
rdata2[BYPASS_CHUNK_DIM/2];
int i, j;
@@ -6981,7 +6981,7 @@ test_big_chunks_bypass_cache(hid_t fapl)
count = 1;
stride = 1;
block = BYPASS_CHUNK_DIM / 2;
- if(H5Sselect_hyperslab(sid, H5S_SELECT_SET, &offset, &stride, &count, &block) < 0)
+ if(H5Sselect_hyperslab(sid, H5S_SELECT_SET, &offset, &stride, &count, &block) < 0)
FAIL_STACK_ERROR
/* Initialize data to write */
@@ -6997,9 +6997,9 @@ test_big_chunks_bypass_cache(hid_t fapl)
/* Reopen the dataset */
if((dsid = H5Dopen2(fid, BYPASS_DATASET1, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
- /* Reads both 2 chunks. Reading the second chunk should bypass the cache because the
+ /* Reads both 2 chunks. Reading the second chunk should bypass the cache because the
* chunk is bigger than the cache size and it isn't allocated on disk. */
- if(H5Dread(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata1) < 0)
+ if(H5Dread(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata1) < 0)
FAIL_STACK_ERROR
for(i = 0; i < BYPASS_CHUNK_DIM / 2; i++)
@@ -7018,9 +7018,9 @@ test_big_chunks_bypass_cache(hid_t fapl)
/* Close the first dataset */
if(H5Dclose(dsid) < 0) FAIL_STACK_ERROR
-
+
/* Create a second dataset without fill value. This time, both write
- * and read should bypass the cache because the chunk is bigger than the
+ * and read should bypass the cache because the chunk is bigger than the
* cache size and it's not allocated on disk. */
if(H5Pset_fill_time(dcpl, H5D_FILL_TIME_NEVER) < 0) FAIL_STACK_ERROR
@@ -7035,10 +7035,10 @@ test_big_chunks_bypass_cache(hid_t fapl)
/* Reopen the dataset */
if((dsid = H5Dopen2(fid, BYPASS_DATASET2, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
- /* Read back only the part that was written to the file. Reading the
+ /* Read back only the part that was written to the file. Reading the
* half chunk should bypass the cache because the chunk is bigger than
* the cache size. */
- if(H5Dread(dsid, H5T_NATIVE_INT, H5S_ALL, sid, H5P_DEFAULT, rdata2) < 0)
+ if(H5Dread(dsid, H5T_NATIVE_INT, H5S_ALL, sid, H5P_DEFAULT, rdata2) < 0)
for(i = 0; i < BYPASS_CHUNK_DIM / 2; i++)
if(rdata2[i] != i) {
@@ -7416,13 +7416,13 @@ error:
/*-------------------------------------------------------------------------
*
- * test_idx_compatible():
+ * test_idx_compatible():
* Verify that the 1.8 branch cannot read datasets that use
* Fixed Array indexing method.
*
*-------------------------------------------------------------------------
*/
-static herr_t
+static herr_t
test_idx_compatible(void)
{
hid_t fid = -1; /* File id */
@@ -7456,7 +7456,7 @@ test_idx_compatible(void)
TEST_ERROR
} H5E_END_TRY;
- if(H5Fclose(fid) < 0)
+ if(H5Fclose(fid) < 0)
FAIL_STACK_ERROR
PASSED();
@@ -7609,7 +7609,7 @@ main(void)
printf("All dataset tests passed.\n");
#ifdef H5_HAVE_FILTER_SZIP
if (GetTestCleanup())
- HDremove(NOENCODER_COPY_FILENAME);
+ HDremove(NOENCODER_COPY_FILENAME);
#endif /* H5_HAVE_FILTER_SZIP */
h5_cleanup(FILENAME, fapl);
diff --git a/test/dtypes.c b/test/dtypes.c
index 4549eaf..3751841 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -327,7 +327,7 @@ test_copy(void)
* Modifications:
* Raymond Lu
* 8 December 2009
- * I added a field of VL string in the compound type to test
+ * I added a field of VL string in the compound type to test
* H5Tdetect_class correctly detect it as string type.
*-------------------------------------------------------------------------
*/
@@ -523,7 +523,7 @@ test_compound_1(void)
TESTING("compound datatypes");
/* Create the empty type */
- if ((complex_id = H5Tcreate(H5T_COMPOUND, sizeof(complex_t))) < 0)
+ if ((complex_id = H5Tcreate(H5T_COMPOUND, sizeof(complex_t))) < 0)
goto error;
/* Attempt to add the new compound datatype as a field within itself */
@@ -626,7 +626,7 @@ test_compound_1(void)
FAIL_PUTS_ERROR("Operation not allowed for this type.");
} /* end if */
- if (H5Tclose (complex_id) < 0)
+ if (H5Tclose (complex_id) < 0)
goto error;
PASSED();
@@ -2430,7 +2430,7 @@ test_compound_14(void)
char c2;
char* str;
} cmpd_struct_1;
-
+
typedef struct cmpd_struct_2 {
char c1;
char c2;
@@ -2442,7 +2442,7 @@ test_compound_14(void)
} cmpd_struct_2;
cmpd_struct_1 wdata1 = {'A', 'B', "variable-length string"};
-
+
cmpd_struct_1 rdata1;
cmpd_struct_2 wdata2 = {'C', 'D', "another vlen!", 1, 2, -1, 9001};
cmpd_struct_2 rdata2;
@@ -4193,9 +4193,9 @@ test_conv_str_3(void)
ret_value = 0;
error:
- if(buf)
+ if(buf)
HDfree(buf);
- if(tag)
+ if(tag)
HDfree(tag);
reset_hdf5();
return ret_value; /* Number of errors */
@@ -5017,7 +5017,7 @@ test_encode(void)
printf("Can't copy a string type\n");
goto error;
} /* end if */
- if(H5Tset_size(tid3, H5T_VARIABLE) < 0) {
+ if(H5Tset_size(tid3, H5T_VARIABLE) < 0) {
H5_FAILED();
printf("Can't the string type to be variable-length\n");
goto error;
diff --git a/test/error_test.c b/test/error_test.c
index 89a81a3..21a3e58 100644
--- a/test/error_test.c
+++ b/test/error_test.c
@@ -586,7 +586,7 @@ main(void)
/* Delete an error from the top of error stack */
H5Epop(ERR_STACK, 1);
- /* Make sure we can use other class's major or minor errors. */
+ /* Make sure we can use other class's major or minor errors. */
H5Epush(ERR_STACK, __FILE__, FUNC_main, __LINE__, ERR_CLS2, ERR_MAJ_TEST, ERR_MIN_ERRSTACK,
"Error stack test failed");
diff --git a/test/external.c b/test/external.c
index 7b412c5..c2614d5 100644
--- a/test/external.c
+++ b/test/external.c
@@ -60,14 +60,14 @@ same_contents (const char *name1, const char *name2)
fd2 = HDopen(name2, O_RDONLY, 0666);
assert(fd1 >= 0 && fd2 >= 0);
- while(1) {
+ while(1) {
/* Asserts will catch negative return values */
n1 = HDread(fd1, buf1, sizeof(buf1));
n2 = HDread(fd2, buf2, sizeof(buf2));
assert(n1 >= 0 && (size_t)n1 <= sizeof(buf1));
assert(n2 >= 0 && (size_t)n2 <= sizeof(buf2));
assert(n1 == n2);
-
+
if(n1 == 0 && n2 == 0)
break;
if(HDmemcmp(buf1, buf2, (size_t)n1)) {
diff --git a/test/gen_idx.c b/test/gen_idx.c
index 6282574..0513e1b 100644
--- a/test/gen_idx.c
+++ b/test/gen_idx.c
@@ -27,7 +27,7 @@
const char *FILENAME[1] = {
"btree_idx_1_8.h5" /* file with datasets that use B-tree indexing method */
-};
+};
#define DSET "dset"
#define DSET_FILTER "dset_filter"
@@ -82,7 +82,7 @@ static void gen_idx_file(void)
/* Create a 1D dataset */
did = H5Dcreate2(fid, DSET, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT);
assert(did >= 0);
-
+
/* Write to the dataset */
status = H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf);
assert(status >= 0);
diff --git a/test/h5test.c b/test/h5test.c
index a5b50d3..b9f3221 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -72,7 +72,7 @@ MPI_Info h5_io_info_g=MPI_INFO_NULL;/* MPI INFO object for IO */
#endif
#define FILENAME_BUF_SIZE 1024
-#define READ_BUF_SIZE 4096
+#define READ_BUF_SIZE 4096
/*
* These are the letters that are appended to the file name when generating
@@ -872,10 +872,10 @@ h5_get_file_size(const char *filename, hid_t fapl)
driver == H5FD_MPIO || driver == H5FD_MPIPOSIX ||
#endif /* H5_HAVE_PARALLEL */
#ifdef H5_HAVE_WINDOWS
- driver == H5FD_WINDOWS ||
+ driver == H5FD_WINDOWS ||
#endif /* H5_HAVE_WINDOWS */
#ifdef H5_HAVE_DIRECT
- driver == H5FD_DIRECT ||
+ driver == H5FD_DIRECT ||
#endif /* H5_HAVE_DIRECT */
driver == H5FD_LOG) {
/* Get the file's statistics */
@@ -1096,9 +1096,9 @@ getenv_all(MPI_Comm comm, int root, const char* name)
*
* Purpose: Make copy of file. Some tests write to data files under that
* are under version control. Those tests should make a copy of
- * the versioned file and write to the copy. This function
+ * the versioned file and write to the copy. This function
* prepends srcdir to the name of the file to be copied and uses
- * the name of the copy as is.
+ * the name of the copy as is.
*
* Return: Success: 0
*
@@ -1129,7 +1129,7 @@ h5_make_local_copy(char *origfilename, char *local_copy_name)
/* Copy old file into temporary file */
if((fd_old = HDopen(filename, O_RDONLY, 0666)) < 0) return -1;
- if((fd_new = HDopen(local_copy_name, O_RDWR|O_CREAT|O_TRUNC, 0666))
+ if((fd_new = HDopen(local_copy_name, O_RDWR|O_CREAT|O_TRUNC, 0666))
< 0) return -1;
/* Copy data */
@@ -1139,7 +1139,7 @@ h5_make_local_copy(char *origfilename, char *local_copy_name)
/* Close files */
if(HDclose(fd_old) < 0) return -1;
if(HDclose(fd_new) < 0) return -1;
-
- return 0;
+
+ return 0;
}
diff --git a/test/h5test.h b/test/h5test.h
index 61e7d95..f984751 100644
--- a/test/h5test.h
+++ b/test/h5test.h
@@ -157,7 +157,7 @@ H5TEST_DLL void h5_reset(void);
H5TEST_DLL void h5_show_hostname(void);
H5TEST_DLL h5_stat_size_t h5_get_file_size(const char *filename, hid_t fapl);
H5TEST_DLL int print_func(const char *format, ...);
-H5TEST_DLL int h5_make_local_copy(char *origfilename, char *local_copy_name);
+H5TEST_DLL int h5_make_local_copy(char *origfilename, char *local_copy_name);
/* Routines for operating on the list of tests (for the "all in one" tests) */
H5TEST_DLL void TestUsage(void);
diff --git a/test/links.c b/test/links.c
index c2d9249..bdc6572 100644
--- a/test/links.c
+++ b/test/links.c
@@ -327,7 +327,7 @@ typedef struct {
* 14 Jan. 2009
*-------------------------------------------------------------------------
*/
-static void
+static void
fix_ext_filename(char *path_name, char *cwd, const char *file_name)
{
HDstrcpy(path_name, cwd);
diff --git a/test/mf.c b/test/mf.c
index 3c88501..cdc7de5 100644
--- a/test/mf.c
+++ b/test/mf.c
@@ -3669,7 +3669,7 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Skip test when using VFDs that have their own 'alloc' callback, which
* don't push mis-aligned space fragments on the file free space list
*/
- have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio")
+ have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio")
&& HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
if(have_alloc_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
@@ -4108,7 +4108,7 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Skip test when using VFDs that have their own 'alloc' callback, which
* don't push mis-aligned space fragments on the file free space list
*/
- have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio")
+ have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio")
&& HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
if(have_alloc_vfd) {
if((file_size = h5_get_file_size(filename, new_fapl)) < 0)
@@ -4316,7 +4316,7 @@ test_mf_align_alloc1(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Skip test when using VFDs that have their own 'alloc' callback, which
* don't push mis-aligned space fragments on the file free space list
*/
- have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio")
+ have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio")
&& HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
if(have_alloc_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
@@ -4573,7 +4573,7 @@ test_mf_align_alloc2(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Skip test when using VFDs that have their own 'alloc' callback, which
* don't push mis-aligned space fragments on the file free space list
*/
- have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio")
+ have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio")
&& HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
if(have_alloc_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
@@ -4902,7 +4902,7 @@ test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Skip test when using VFDs that have their own 'alloc' callback, which
* don't push mis-aligned space fragments on the file free space list
*/
- have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio")
+ have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio")
&& HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
if(have_alloc_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
@@ -5198,7 +5198,7 @@ test_mf_align_alloc4(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Skip test when using VFDs that have their own 'alloc' callback, which
* don't push mis-aligned space fragments on the file free space list
*/
- have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio")
+ have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio")
&& HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
if(have_alloc_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
@@ -5405,7 +5405,7 @@ test_mf_align_alloc5(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Skip test when using VFDs that have their own 'alloc' callback, which
* don't push mis-aligned space fragments on the file free space list
*/
- have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio")
+ have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio")
&& HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
if(have_alloc_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
@@ -5674,7 +5674,7 @@ test_mf_align_alloc6(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Skip test when using VFDs that have their own 'alloc' callback, which
* don't push mis-aligned space fragments on the file free space list
*/
- have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio")
+ have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio")
&& HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
if(have_alloc_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
@@ -5930,7 +5930,7 @@ main(void)
nerrors += test_mf_align_alloc6(env_h5_drvr, fapl, new_fapl);
} /* end if */
- if (H5Pclose(new_fapl) < 0)
+ if (H5Pclose(new_fapl) < 0)
FAIL_STACK_ERROR
h5_cleanup(FILENAME, fapl);
diff --git a/test/ntypes.c b/test/ntypes.c
index 6efabc6..781dfef 100644
--- a/test/ntypes.c
+++ b/test/ntypes.c
@@ -2401,7 +2401,7 @@ test_refer_dtype2(hid_t file)
PASSED();
return 0;
-error:
+error:
/* Free memory buffers */
if(dwbuf)
HDfree(dwbuf);
@@ -2546,7 +2546,7 @@ test_bitfield_dtype(hid_t file)
if((space = H5Screate_simple(1, &nelmts, NULL)) < 0) TEST_ERROR;
/* Create and write to dataset1 with a unsigned char buffer */
- if((dset1 = H5Dcreate2(file, DSET1_BITFIELD_NAME, type, space, H5P_DEFAULT, H5P_DEFAULT,
+ if((dset1 = H5Dcreate2(file, DSET1_BITFIELD_NAME, type, space, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) TEST_ERROR;
for(i = 0; i < BITFIELD_ENUMB*sizeof(int); i++)
@@ -2556,7 +2556,7 @@ test_bitfield_dtype(hid_t file)
if(H5Dclose(dset1) < 0) TEST_ERROR;
/* Create and write to dataset2 with a unsigned int buffer */
- if((dset2 = H5Dcreate2(file, DSET2_BITFIELD_NAME, type, space, H5P_DEFAULT, H5P_DEFAULT,
+ if((dset2 = H5Dcreate2(file, DSET2_BITFIELD_NAME, type, space, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) TEST_ERROR;
for(i = 0; i < BITFIELD_ENUMB; i++)
@@ -2587,7 +2587,7 @@ test_bitfield_dtype(hid_t file)
H5_FAILED();
printf(" Read different values than written.\n");
printf(" At index %d\n", i);
- TEST_ERROR;
+ TEST_ERROR;
}
p++;
}
@@ -2612,14 +2612,14 @@ test_bitfield_dtype(hid_t file)
H5_FAILED();
printf(" Read different values than written.\n");
printf(" At index %d\n", i);
- TEST_ERROR;
+ TEST_ERROR;
}
}
if(H5Tclose(dtype) < 0) TEST_ERROR;
if(H5Tclose(native_type) < 0) TEST_ERROR;
if(H5Dclose(dataset2) < 0) TEST_ERROR;
-
+
PASSED();
return 0;
diff --git a/test/objcopy.c b/test/objcopy.c
index 00cc5bf..05da5dd 100755
--- a/test/objcopy.c
+++ b/test/objcopy.c
@@ -7249,7 +7249,7 @@ static int
test_copy_dataset_contig_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
{
hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1; /* Datatype ID */
+ hid_t tid = -1; /* Datatype ID */
hid_t tid2 = -1; /* Datatype ID */
hid_t sid = -1; /* Dataspace ID */
hid_t did = -1; /* Dataset ID */
diff --git a/test/ohdr.c b/test/ohdr.c
index f59dace..c3b8f8b 100644
--- a/test/ohdr.c
+++ b/test/ohdr.c
@@ -48,7 +48,7 @@ const char *FILENAME[] = {
* Create an object header with several continuation chunks
* Remove a message in the last chunk
* The remaining message(s) in the last chunk should be moved forward into the continuation message
- * The process will repeat when the continuation message is big enough to hold all the
+ * The process will repeat when the continuation message is big enough to hold all the
* messages in the last chunk.
* Result: the number of chunks should be reduced
*/
@@ -57,7 +57,7 @@ test_cont(char *filename, hid_t fapl)
{
hid_t file=-1;
H5F_t *f = NULL;
- H5O_hdr_info_t hdr_info;
+ H5O_hdr_info_t hdr_info;
H5O_loc_t oh_locA, oh_locB;
time_t time_new;
const char *short_name = "T";
@@ -181,7 +181,7 @@ main(void)
/* Display info about testing */
if(b)
HDputs("Using new file format:");
- else
+ else
HDputs("Using default file format:");
/* Set the format to use for the file */
diff --git a/test/set_extent.c b/test/set_extent.c
index b4e61b4..c65e7d0 100644
--- a/test/set_extent.c
+++ b/test/set_extent.c
@@ -60,18 +60,18 @@ const char *FILENAME[] = {
static int do_ranks( hid_t fapl );
static int do_layouts( hid_t fapl );
-static int test_rank1( hbool_t do_compress,
- hbool_t do_fill_value,
+static int test_rank1( hbool_t do_compress,
+ hbool_t do_fill_value,
hbool_t set_istore_k,
H5D_fill_time_t fill_time,
hid_t fapl);
-static int test_rank2( hbool_t do_compress,
- hbool_t do_fill_value,
+static int test_rank2( hbool_t do_compress,
+ hbool_t do_fill_value,
hbool_t set_istore_k,
H5D_fill_time_t fill_time,
hid_t fapl);
-static int test_rank3( hbool_t do_compress,
- hbool_t do_fill_value,
+static int test_rank3( hbool_t do_compress,
+ hbool_t do_fill_value,
hbool_t set_istore_k,
H5D_fill_time_t fill_time,
hid_t fapl);
@@ -152,7 +152,7 @@ int main( void )
if(H5Pclose(fapl2) < 0) TEST_ERROR
h5_cleanup(FILENAME, fapl);
-
+
HDremove(EXT_FILE_NAME1);
HDremove(EXT_FILE_NAME2);
@@ -180,8 +180,8 @@ static int do_ranks( hid_t fapl )
hbool_t do_compress = 0;
hbool_t do_fillvalue = 0;
hbool_t set_istore_k = 0;
-
-
+
+
TESTING_2("with fill value, no compression");
do_fillvalue = 1;
@@ -189,28 +189,28 @@ static int do_ranks( hid_t fapl )
if (test_rank1( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_ALLOC, fapl ) < 0)
{
goto error;
- }
+ }
if (test_rank1( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_IFSET, fapl ) < 0)
{
goto error;
- }
+ }
if (test_rank2( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_ALLOC, fapl ) < 0)
{
goto error;
- }
+ }
if (test_rank2( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_IFSET, fapl ) < 0)
{
goto error;
- }
+ }
if (test_rank3( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_ALLOC, fapl ) < 0)
{
goto error;
- }
+ }
if (test_rank3( do_compress, do_fillvalue, set_istore_k, H5D_FILL_TIME_IFSET, fapl ) < 0)
{
goto error;
- }
-
+ }
+
PASSED();
@@ -232,11 +232,11 @@ static int do_ranks( hid_t fapl )
{
goto error;
}
-
-
+
+
PASSED();
-
+
TESTING_2("with fill value, with compression");
#ifdef H5_HAVE_FILTER_DEFLATE
@@ -268,8 +268,8 @@ static int do_ranks( hid_t fapl )
{
goto error;
}
-
-
+
+
PASSED();
#else
SKIPPED();
@@ -293,7 +293,7 @@ static int do_ranks( hid_t fapl )
{
goto error;
}
-
+
PASSED();
#else
SKIPPED();
@@ -308,14 +308,14 @@ static int do_ranks( hid_t fapl )
{
goto error;
}
-
+
PASSED();
-
-
+
+
return 0;
-
-
+
+
error:
return -1;
}
@@ -327,23 +327,23 @@ error:
*/
static int do_layouts( hid_t fapl )
{
-
+
TESTING_2("storage layout use");
-
+
if (test_layouts( H5D_COMPACT, fapl ) < 0)
{
goto error;
- }
-
+ }
+
if (test_layouts( H5D_CONTIGUOUS, fapl ) < 0)
{
goto error;
- }
-
+ }
+
PASSED();
-
+
return 0;
-
+
error:
return -1;
}
@@ -353,33 +353,33 @@ error:
*-------------------------------------------------------------------------
*/
-static int test_rank1( hbool_t do_compress,
- hbool_t do_fill_value,
+static int test_rank1( hbool_t do_compress,
+ hbool_t do_fill_value,
hbool_t set_istore_k,
H5D_fill_time_t fill_time,
hid_t fapl)
{
- hid_t fid=-1;
+ hid_t fid=-1;
hid_t did=-1;
hid_t sid=-1;
hid_t dcpl=-1;
hid_t fcpl;
- hsize_t dims_o[RANK1] = {DIM0}; /* original dimensions */
- hsize_t dims_s[RANK1] = {DIMS0}; /* shrinking dimensions */
- hsize_t dims_e[RANK1] = {DIME0}; /* extended dimensions */
- hsize_t dims_c[RANK1] = {2}; /* chunk dimensions */
- hsize_t dims_r[RANK1]; /* read dimensions */
+ hsize_t dims_o[RANK1] = {DIM0}; /* original dimensions */
+ hsize_t dims_s[RANK1] = {DIMS0}; /* shrinking dimensions */
+ hsize_t dims_e[RANK1] = {DIME0}; /* extended dimensions */
+ hsize_t dims_c[RANK1] = {2}; /* chunk dimensions */
+ hsize_t dims_r[RANK1]; /* read dimensions */
hsize_t maxdims[RANK1] = {H5S_UNLIMITED};
int buf_o[DIM0];
int buf_s[DIMS0];
int buf_e[DIME0];
int buf_r[DIM0];
int i;
- int fillvalue = 1;
- int comp_value;
+ int fillvalue = 1;
+ int comp_value;
char filename[NAME_BUF_SIZE];
-
+
if ( do_fill_value )
{
comp_value = fillvalue;
@@ -389,47 +389,47 @@ static int test_rank1( hbool_t do_compress,
comp_value = 0;
}
-
+
for( i = 0; i < DIM0; i++ )
{
-
+
buf_o[i] = 2;
}
/* create a file creation property list */
- if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
+ if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
{
goto error;
}
-
+
if ( set_istore_k )
{
/* set non-default indexed storage B-tree internal 'K' value */
- if (H5Pset_istore_k(fcpl,ISTORE_IK) < 0)
+ if (H5Pset_istore_k(fcpl,ISTORE_IK) < 0)
{
goto error;
}
-
+
}
/* create a new file */
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
- if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl)) < 0)
+ if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl)) < 0)
{
goto error;
}
/* close property list */
- if(H5Pclose(fcpl) < 0)
+ if(H5Pclose(fcpl) < 0)
{
goto error;
}
-
+
/* create the data space with unlimited dimensions. */
- if ((sid = H5Screate_simple(RANK1, dims_o, maxdims)) < 0)
+ if ((sid = H5Screate_simple(RANK1, dims_o, maxdims)) < 0)
{
goto error;
}
-
+
/* modify dataset creation properties, i.e. enable chunking. */
if ((dcpl = H5Pcreate (H5P_DATASET_CREATE)) < 0)
{
@@ -446,176 +446,176 @@ static int test_rank1( hbool_t do_compress,
goto error;
}
- if(H5Pset_fill_time(dcpl, fill_time) < 0)
+ if(H5Pset_fill_time(dcpl, fill_time) < 0)
{
goto error;
}
}
else
{
-
- if(H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC) < 0)
+
+ if(H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC) < 0)
{
goto error;
}
-
+
}
if (do_compress)
{
- if(H5Pset_deflate(dcpl, 9) < 0)
+ if(H5Pset_deflate(dcpl, 9) < 0)
{
goto error;
}
}
-
+
/*-------------------------------------------------------------------------
* create, write dataset
*-------------------------------------------------------------------------
*/
-
+
/* create a dataset */
- if ((did = H5Dcreate2(fid , "dset1", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ if ((did = H5Dcreate2(fid , "dset1", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
{
goto error;
}
-
+
/* write */
- if (H5Dwrite(did , H5T_NATIVE_INT, sid, H5S_ALL, H5P_DEFAULT, buf_o) < 0)
+ if (H5Dwrite(did , H5T_NATIVE_INT, sid, H5S_ALL, H5P_DEFAULT, buf_o) < 0)
{
goto error;
}
-
-
+
+
#if defined (H5_SET_EXTENT_DEBUG)
printf("\n");
for (i = 0; i < (int)dims_o[0]; i++ )
{
-
+
printf("%d ", buf_o[i]);
-
+
}
printf("\n");
-#endif
+#endif
+
-
if (H5Sclose(sid) < 0)
{
goto error;
}
-
+
/*-------------------------------------------------------------------------
* set new dimensions for the array; expand it
*-------------------------------------------------------------------------
*/
-
+
/* set new dimensions for the array. */
if (H5Dset_extent(did , dims_e) < 0)
{
goto error;
}
-
+
/* get the space */
if ((sid = H5Dget_space(did)) < 0)
{
goto error;
}
-
+
/* get dimensions */
- if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0)
+ if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0)
{
goto error;
}
-
+
if (H5Sclose(sid) < 0)
{
goto error;
}
-
-
+
+
/* check dimensions */
for( i = 0; i < RANK1; i++ )
{
- if (dims_r[i] != dims_e[i])
+ if (dims_r[i] != dims_e[i])
goto error;
}
-
+
/* read */
- if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_e) < 0)
+ if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_e) < 0)
goto error;
-
-
+
+
#if defined (H5_SET_EXTENT_DEBUG)
printf("\n");
for (i = 0; i < (int)dims_r[0]; i++ )
{
-
+
printf("%d ", buf_e[i]);
-
+
}
printf("\n");
-#endif
+#endif
+
+
+
-
-
-
/* compare the read array with the expanded array */
for (i = 0; i < (int)dims_r[0]; i++ )
{
-
- if ( i >= DIM0 )
+
+ if ( i >= DIM0 )
{
- if(buf_e[i] != comp_value)
+ if(buf_e[i] != comp_value)
{
printf("buf_e[%d] = %d\n", i, buf_e[i]);
printf("value = %d\n", comp_value);
goto error;
- }
- }
- else
+ }
+ }
+ else
{
- if(buf_e[i] != buf_o[i])
+ if(buf_e[i] != buf_o[i])
goto error;
}
}
-
-
-
-
+
+
+
+
/*-------------------------------------------------------------------------
- * shrink
+ * shrink
*
*-------------------------------------------------------------------------
*/
-
+
/* set new dimensions for the array. */
if (H5Dset_extent(did , dims_s) < 0)
{
goto error;
}
-
+
/* get the space */
if ((sid = H5Dget_space(did)) < 0)
{
goto error;
}
-
+
/* get dimensions */
- if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0)
+ if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0)
{
goto error;
}
-
+
if (H5Sclose(sid) < 0)
{
goto error;
}
-
+
/* check dimensions */
for( i = 0; i < RANK1; i++ )
{
- if (dims_r[i] != dims_s[i])
+ if (dims_r[i] != dims_s[i])
goto error;
}
@@ -624,8 +624,8 @@ static int test_rank1( hbool_t do_compress,
/* for this case we close and reopen file */
if ( set_istore_k )
{
-
- if (H5Dclose(did) < 0)
+
+ if (H5Dclose(did) < 0)
{
goto error;
}
@@ -634,76 +634,76 @@ static int test_rank1( hbool_t do_compress,
goto error;
}
- if ((fid = H5Fopen( filename, H5F_ACC_RDWR, fapl ))<0)
+ if ((fid = H5Fopen( filename, H5F_ACC_RDWR, fapl ))<0)
{
goto error;
}
-
- if ((did = H5Dopen2( fid , "dset1", H5P_DEFAULT ))<0)
+
+ if ((did = H5Dopen2( fid , "dset1", H5P_DEFAULT ))<0)
{
goto error;
}
-
-
-
+
+
+
}
-
-
+
+
/*-------------------------------------------------------------------------
* read
*-------------------------------------------------------------------------
*/
-
+
/* read */
- if (H5Dread( did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_s ) < 0)
+ if (H5Dread( did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_s ) < 0)
{
goto error;
}
-
+
#if defined (H5_SET_EXTENT_DEBUG)
printf("\n");
for (i = 0; i < (int)dims_r[0]; i++ )
{
-
+
printf("%d ", buf_s[i]);
}
printf("\n");
-#endif
+#endif
+
+
-
-
/* compare the read array with the shrinked array */
for( i = 0; i < (int)dims_r[0]; i++ )
{
-
- if ( buf_s[i] != buf_o[i] )
+
+ if ( buf_s[i] != buf_o[i] )
{
printf("buf_s[%d] = %d\n", i, buf_s[i]);
printf("buf_o[%d] = %d\n", i, buf_o[i]);
goto error;
- }
+ }
}
-
-
+
+
/*-------------------------------------------------------------------------
* expand it back to original size
*-------------------------------------------------------------------------
*/
-
+
/* set new dimensions for the array */
if (H5Dset_extent(did, dims_o) < 0)
{
goto error;
}
-
+
/* get the space */
- if ((sid = H5Dget_space(did)) < 0)
+ if ((sid = H5Dget_space(did)) < 0)
{
goto error;
}
-
+
/* get dimensions. */
if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0)
{
@@ -714,53 +714,53 @@ static int test_rank1( hbool_t do_compress,
{
goto error;
}
-
-
+
+
/* check dimensions */
for( i = 0; i < RANK1; i++ )
{
- if (dims_r[i] != dims_o[i])
+ if (dims_r[i] != dims_o[i])
goto error;
}
-
-
+
+
/* read */
- if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_r) < 0)
+ if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_r) < 0)
goto error;
-
+
#if defined (H5_SET_EXTENT_DEBUG)
printf("\n");
for (i = 0; i < (int)dims_r[0]; i++ )
{
-
+
printf("%d ", buf_r[i]);
-
+
}
printf("\n");
-#endif
+#endif
+
-
/* compare the read array with the original array */
for (i = 0; i < (int)dims_r[0]; i++ )
{
-
- if (i >= DIMS0 )
+
+ if (i >= DIMS0 )
{
- if(buf_r[i] != comp_value)
+ if(buf_r[i] != comp_value)
{
printf("buf_r[%d] = %d\n", i, buf_r[i] );
printf("value = %d\n", comp_value);
goto error;
- }
- }
- else
+ }
+ }
+ else
{
- if(buf_r[i] != buf_o[i])
+ if(buf_r[i] != buf_o[i])
goto error;
}
}
-
+
/*-------------------------------------------------------------------------
* shrink to 0
@@ -769,75 +769,75 @@ static int test_rank1( hbool_t do_compress,
*/
dims_s[0] = 0;
-
+
/* set new dimensions for the array. */
if (H5Dset_extent(did , dims_s) < 0)
{
goto error;
}
-
+
/* get the space */
if ((sid = H5Dget_space(did)) < 0)
{
goto error;
}
-
+
/* get dimensions */
- if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0)
+ if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0)
{
goto error;
}
-
+
if (H5Sclose(sid) < 0)
{
goto error;
}
-
+
/* check dimensions */
for( i = 0; i < RANK1; i++ )
{
- if (dims_r[i] != dims_s[i])
+ if (dims_r[i] != dims_s[i])
goto error;
- }
-
+ }
+
/*-------------------------------------------------------------------------
* close dataset
*-------------------------------------------------------------------------
*/
-
- if (H5Dclose(did) < 0)
+
+ if (H5Dclose(did) < 0)
{
goto error;
}
-
-
-
-
-
+
+
+
+
+
/*-------------------------------------------------------------------------
* test a dataset with non initialized chunks
*-------------------------------------------------------------------------
*/
-
-
- if ((sid = H5Screate_simple(RANK1, dims_o, maxdims)) < 0)
+
+
+ if ((sid = H5Screate_simple(RANK1, dims_o, maxdims)) < 0)
{
goto error;
}
- if ((did = H5Dcreate2(fid , "dset3", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ if ((did = H5Dcreate2(fid , "dset3", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
{
goto error;
}
/* set new dimensions for the array */
dims_o[ 0 ] = 0;
- if (H5Dset_extent( did , dims_o ) < 0)
+ if (H5Dset_extent( did , dims_o ) < 0)
{
goto error;
}
- if (H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
{
goto error;
}
@@ -846,16 +846,16 @@ static int test_rank1( hbool_t do_compress,
goto error;
}
-
-
-
+
+
+
/*-------------------------------------------------------------------------
* close property list
*-------------------------------------------------------------------------
*/
-
-
- if (H5Pclose(dcpl) < 0)
+
+
+ if (H5Pclose(dcpl) < 0)
{
goto error;
}
@@ -867,12 +867,12 @@ static int test_rank1( hbool_t do_compress,
return 0;
-
-
-
+
+
+
error:
-
- H5E_BEGIN_TRY
+
+ H5E_BEGIN_TRY
{
H5Dclose( did );
H5Sclose( sid );
@@ -881,7 +881,7 @@ error:
H5Fclose( fid );
} H5E_END_TRY;
return -1;
-
+
}
/*-------------------------------------------------------------------------
@@ -889,33 +889,33 @@ error:
*-------------------------------------------------------------------------
*/
-static int test_rank2( hbool_t do_compress,
- hbool_t do_fill_value,
+static int test_rank2( hbool_t do_compress,
+ hbool_t do_fill_value,
hbool_t set_istore_k,
H5D_fill_time_t fill_time,
hid_t fapl)
{
- hid_t fid=-1;
+ hid_t fid=-1;
hid_t did=-1;
hid_t sid=-1;
hid_t dcpl=-1;
hid_t fcpl;
- hsize_t dims_o[RANK2] = {DIM0,DIM1}; /* original dimensions */
- hsize_t dims_s[RANK2] = {DIMS0,DIMS1}; /* shrinking dimensions */
- hsize_t dims_e[RANK2] = {DIME0,DIME1}; /* extended dimensions */
- hsize_t dims_c[RANK2] = {2,2}; /* chunk dimensions */
- hsize_t dims_r[RANK2]; /* read dimensions */
+ hsize_t dims_o[RANK2] = {DIM0,DIM1}; /* original dimensions */
+ hsize_t dims_s[RANK2] = {DIMS0,DIMS1}; /* shrinking dimensions */
+ hsize_t dims_e[RANK2] = {DIME0,DIME1}; /* extended dimensions */
+ hsize_t dims_c[RANK2] = {2,2}; /* chunk dimensions */
+ hsize_t dims_r[RANK2]; /* read dimensions */
hsize_t maxdims[RANK2] = {H5S_UNLIMITED,H5S_UNLIMITED};
int buf_o[DIM0][DIM1];
int buf_s[DIMS0][DIMS1];
int buf_e[DIME0][DIME1];
int buf_r[DIM0][DIM1];
int i, j;
- int fillvalue = 1;
- int comp_value;
+ int fillvalue = 1;
+ int comp_value;
char filename[NAME_BUF_SIZE];
-
+
if ( do_fill_value )
{
comp_value = fillvalue;
@@ -925,7 +925,7 @@ static int test_rank2( hbool_t do_compress,
comp_value = 0;
}
-
+
for( i = 0; i < DIM0; i++ )
{
for( j = 0; j < DIM1; j++ )
@@ -935,36 +935,36 @@ static int test_rank2( hbool_t do_compress,
}
/* create a file creation property list */
- if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
+ if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
{
goto error;
}
-
+
if ( set_istore_k )
{
/* set non-default indexed storage B-tree internal 'K' value */
- if (H5Pset_istore_k(fcpl,ISTORE_IK) < 0)
+ if (H5Pset_istore_k(fcpl,ISTORE_IK) < 0)
{
goto error;
}
-
+
}
-
+
/* create a new file */
h5_fixname(FILENAME[1], fapl, filename, sizeof filename);
- if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl)) < 0)
+ if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl)) < 0)
{
goto error;
}
-
-
+
+
/* create the data space with unlimited dimensions. */
- if ((sid = H5Screate_simple(RANK2, dims_o, maxdims)) < 0)
+ if ((sid = H5Screate_simple(RANK2, dims_o, maxdims)) < 0)
{
goto error;
}
-
+
/* modify dataset creation properties, i.e. enable chunking. */
if ((dcpl = H5Pcreate (H5P_DATASET_CREATE)) < 0)
{
@@ -981,33 +981,33 @@ static int test_rank2( hbool_t do_compress,
goto error;
}
- if(H5Pset_fill_time(dcpl, fill_time) < 0)
+ if(H5Pset_fill_time(dcpl, fill_time) < 0)
{
goto error;
}
}
else
{
-
- if(H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC) < 0)
+
+ if(H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC) < 0)
{
goto error;
}
-
+
}
if (do_compress)
{
- if(H5Pset_deflate(dcpl, 9) < 0)
+ if(H5Pset_deflate(dcpl, 9) < 0)
{
goto error;
}
}
-
+
/*-------------------------------------------------------------------------
* Procedure 1
* a. Write an array AxB. These are the dimensions for creating the dataset
* b. Define a greater array CxD where C > A and D > B
- * c. Read data back
+ * c. Read data back
* d. Verify if new dimensions are C and D
* e. Verify if data from A to C and B to D is what it is to be expected
*
@@ -1020,20 +1020,20 @@ static int test_rank2( hbool_t do_compress,
*
*-------------------------------------------------------------------------
*/
-
+
/* create a dataset */
- if ((did = H5Dcreate2(fid , "dset1", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ if ((did = H5Dcreate2(fid , "dset1", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
{
goto error;
}
-
+
/* write */
- if (H5Dwrite(did , H5T_NATIVE_INT, sid, H5S_ALL, H5P_DEFAULT, buf_o) < 0)
+ if (H5Dwrite(did , H5T_NATIVE_INT, sid, H5S_ALL, H5P_DEFAULT, buf_o) < 0)
{
goto error;
}
-
-
+
+
#if defined (H5_SET_EXTENT_DEBUG2)
printf("\n");
for (i = 0; i < (int)dims_o[0]; i++ )
@@ -1044,15 +1044,15 @@ static int test_rank2( hbool_t do_compress,
}
printf("\n");
}
-#endif
+#endif
+
-
if (H5Sclose(sid) < 0)
{
goto error;
}
-
+
/*-------------------------------------------------------------------------
* set new dimensions for the array; expand it
* data is now, extended space was initialized with fill value or default value
@@ -1067,44 +1067,44 @@ static int test_rank2( hbool_t do_compress,
*
*-------------------------------------------------------------------------
*/
-
+
/* set new dimensions for the array. */
if (H5Dset_extent(did , dims_e) < 0)
{
goto error;
}
-
+
/* get the space */
if ((sid = H5Dget_space(did)) < 0)
{
goto error;
}
-
+
/* get dimensions */
- if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0)
+ if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0)
{
goto error;
}
-
+
if (H5Sclose(sid) < 0)
{
goto error;
}
-
-
+
+
/* check dimensions */
for( i = 0; i < RANK2; i++ )
{
- if (dims_r[i] != dims_e[i])
+ if (dims_r[i] != dims_e[i])
goto error;
}
-
+
/* read */
- if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_e) < 0)
+ if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_e) < 0)
goto error;
-
-
+
+
#if defined (H5_SET_EXTENT_DEBUG2)
printf("\n");
for (i = 0; i < (int)dims_r[0]; i++ )
@@ -1115,41 +1115,41 @@ static int test_rank2( hbool_t do_compress,
}
printf("\n");
}
-#endif
+#endif
+
+
+
-
-
-
/* compare the read array with the expanded array */
for (i = 0; i < (int)dims_r[0]; i++ )
{
for (j = 0; j < (int)dims_r[1]; j++ )
{
- if ( i >= DIM0 || j >= DIM1 )
+ if ( i >= DIM0 || j >= DIM1 )
{
- if(buf_e[i][j] != comp_value)
+ if(buf_e[i][j] != comp_value)
{
printf("buf_e[%d][%d] = %d\n", i, j, buf_e[i][j]);
printf("value = %d\n", comp_value);
goto error;
- }
- }
- else
+ }
+ }
+ else
{
- if(buf_e[i][j] != buf_o[i][j])
+ if(buf_e[i][j] != buf_o[i][j])
goto error;
}
}
}
-
-
-
-
+
+
+
+
/*-------------------------------------------------------------------------
*
* Procedure 2
* a. Define a smaller array ExF where E < A and F < B
- * b. Read data back
+ * b. Read data back
* c. Verify if new dimensions are E and F
* d. Verify if data up until E and F is what to be expected
*
@@ -1160,34 +1160,34 @@ static int test_rank2( hbool_t do_compress,
*
*-------------------------------------------------------------------------
*/
-
+
/* set new dimensions for the array. */
if (H5Dset_extent(did , dims_s) < 0)
{
goto error;
}
-
+
/* get the space */
if ((sid = H5Dget_space(did)) < 0)
{
goto error;
}
-
+
/* get dimensions */
- if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0)
+ if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0)
{
goto error;
}
-
+
if (H5Sclose(sid) < 0)
{
goto error;
}
-
+
/* check dimensions */
for( i = 0; i < RANK2; i++ )
{
- if (dims_r[i] != dims_s[i])
+ if (dims_r[i] != dims_s[i])
goto error;
}
@@ -1196,8 +1196,8 @@ static int test_rank2( hbool_t do_compress,
/* for this case we close and reopen file */
if ( set_istore_k )
{
-
- if (H5Dclose(did) < 0)
+
+ if (H5Dclose(did) < 0)
{
goto error;
}
@@ -1206,32 +1206,32 @@ static int test_rank2( hbool_t do_compress,
goto error;
}
- if ((fid = H5Fopen( filename, H5F_ACC_RDWR, fapl ))<0)
+ if ((fid = H5Fopen( filename, H5F_ACC_RDWR, fapl ))<0)
{
goto error;
}
-
- if ((did = H5Dopen2( fid , "dset1", H5P_DEFAULT ))<0)
+
+ if ((did = H5Dopen2( fid , "dset1", H5P_DEFAULT ))<0)
{
goto error;
}
-
-
-
+
+
+
}
-
-
+
+
/*-------------------------------------------------------------------------
* read
*-------------------------------------------------------------------------
*/
-
+
/* read */
- if (H5Dread( did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_s ) < 0)
+ if (H5Dread( did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_s ) < 0)
{
goto error;
}
-
+
#if defined (H5_SET_EXTENT_DEBUG2)
printf("\n");
for (i = 0; i < (int)dims_r[0]; i++ )
@@ -1242,26 +1242,26 @@ static int test_rank2( hbool_t do_compress,
}
printf("\n");
}
-#endif
+#endif
+
+
-
-
/* compare the read array with the shrinked array */
for( i = 0; i < (int)dims_r[0]; i++ )
{
for( j = 0; j < (int)dims_r[1]; j++ )
{
- if ( buf_s[i][j] != buf_o[i][j] )
+ if ( buf_s[i][j] != buf_o[i][j] )
{
printf("buf_s[%d][%d] = %d\n", i, j, buf_s[i][j]);
printf("buf_o[%d][%d] = %d\n", i, j, buf_o[i][j]);
goto error;
- }
+ }
}
}
-
-
+
+
/*-------------------------------------------------------------------------
* set new dimensions for the array; expand it back to original size
* data is now, extended space was initialized with fill value or default value
@@ -1273,19 +1273,19 @@ static int test_rank2( hbool_t do_compress,
*
*-------------------------------------------------------------------------
*/
-
+
/* set new dimensions for the array */
if (H5Dset_extent(did, dims_o) < 0)
{
goto error;
}
-
+
/* get the space */
- if ((sid = H5Dget_space(did)) < 0)
+ if ((sid = H5Dget_space(did)) < 0)
{
goto error;
}
-
+
/* get dimensions. */
if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0)
{
@@ -1296,24 +1296,24 @@ static int test_rank2( hbool_t do_compress,
{
goto error;
}
-
+
/* check dimensions */
for( i = 0; i < RANK2; i++ )
{
- if (dims_r[i] != dims_o[i])
+ if (dims_r[i] != dims_o[i])
goto error;
}
-
-
+
+
/*-------------------------------------------------------------------------
* read
*-------------------------------------------------------------------------
*/
-
+
/* read */
- if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_r) < 0)
+ if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_r) < 0)
goto error;
-
+
#if defined (H5_SET_EXTENT_DEBUG2)
printf("\n");
for (i = 0; i < (int)dims_r[0]; i++ )
@@ -1324,27 +1324,27 @@ static int test_rank2( hbool_t do_compress,
}
printf("\n");
}
-#endif
+#endif
+
-
/* compare the read array with the original array */
for (i = 0; i < (int)dims_r[0]; i++ )
{
for (j = 0; j < (int)dims_r[1]; j++ )
{
- if (i >= DIMS0 || j >= DIMS1)
+ if (i >= DIMS0 || j >= DIMS1)
{
- if(buf_r[i][j] != comp_value)
+ if(buf_r[i][j] != comp_value)
{
printf("buf_r[%d][%d] = %d\n", i, j, buf_r[i][j]);
printf("value = %d\n", comp_value);
goto error;
- }
- }
- else
+ }
+ }
+ else
{
- if(buf_r[i][j] != buf_o[i][j])
+ if(buf_r[i][j] != buf_o[i][j])
goto error;
}
}
@@ -1358,74 +1358,74 @@ static int test_rank2( hbool_t do_compress,
dims_s[0] = 0;
dims_s[1] = 0;
-
+
/* set new dimensions for the array. */
if (H5Dset_extent(did , dims_s) < 0)
{
goto error;
}
-
+
/* get the space */
if ((sid = H5Dget_space(did)) < 0)
{
goto error;
}
-
+
/* get dimensions */
- if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0)
+ if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0)
{
goto error;
}
-
+
if (H5Sclose(sid) < 0)
{
goto error;
}
-
+
/* check dimensions */
for( i = 0; i < RANK2; i++ )
{
- if (dims_r[i] != dims_s[i])
+ if (dims_r[i] != dims_s[i])
goto error;
- }
-
-
+ }
+
+
/*-------------------------------------------------------------------------
- * close dataset
+ * close dataset
*-------------------------------------------------------------------------
*/
-
- if (H5Dclose(did) < 0)
+
+ if (H5Dclose(did) < 0)
{
goto error;
}
-
-
+
+
/*-------------------------------------------------------------------------
* test a dataset with non initialized chunks
*-------------------------------------------------------------------------
*/
-
-
- if ((sid = H5Screate_simple(RANK2, dims_o, maxdims)) < 0)
+
+
+ if ((sid = H5Screate_simple(RANK2, dims_o, maxdims)) < 0)
{
goto error;
}
- if ((did = H5Dcreate2(fid , "dset3", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ if ((did = H5Dcreate2(fid , "dset3", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
{
goto error;
}
/* set new dimensions for the array */
dims_o[ 0 ] = 0;
dims_o[ 1 ] = 0;
- if (H5Dset_extent( did , dims_o ) < 0)
+ if (H5Dset_extent( did , dims_o ) < 0)
{
goto error;
}
- if (H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
{
goto error;
}
@@ -1434,22 +1434,22 @@ static int test_rank2( hbool_t do_compress,
goto error;
}
-
-
-
+
+
+
/*-------------------------------------------------------------------------
* close property list
*-------------------------------------------------------------------------
*/
-
-
- if (H5Pclose(dcpl) < 0)
+
+
+ if (H5Pclose(dcpl) < 0)
{
goto error;
}
/* close file creation property list */
- if(H5Pclose(fcpl) < 0)
+ if(H5Pclose(fcpl) < 0)
{
goto error;
}
@@ -1461,12 +1461,12 @@ static int test_rank2( hbool_t do_compress,
return 0;
-
-
-
+
+
+
error:
-
- H5E_BEGIN_TRY
+
+ H5E_BEGIN_TRY
{
H5Dclose( did );
H5Sclose( sid );
@@ -1475,7 +1475,7 @@ error:
H5Fclose( fid );
} H5E_END_TRY;
return -1;
-
+
}
@@ -1486,33 +1486,33 @@ error:
*-------------------------------------------------------------------------
*/
-static int test_rank3( hbool_t do_compress,
- hbool_t do_fill_value,
+static int test_rank3( hbool_t do_compress,
+ hbool_t do_fill_value,
hbool_t set_istore_k,
H5D_fill_time_t fill_time,
hid_t fapl)
{
- hid_t fid=-1;
+ hid_t fid=-1;
hid_t did=-1;
hid_t sid=-1;
hid_t dcpl=-1;
hid_t fcpl;
- hsize_t dims_o[RANK3] = {DIM0,DIM1,DIM2}; /* original dimensions */
- hsize_t dims_s[RANK3] = {DIMS0,DIMS1,DIMS2}; /* shrinking dimensions */
- hsize_t dims_e[RANK3] = {DIME0,DIME1,DIME2}; /* extended dimensions */
- hsize_t dims_c[RANK3] = {2,2,2}; /* chunk dimensions */
- hsize_t dims_r[RANK3]; /* read dimensions */
+ hsize_t dims_o[RANK3] = {DIM0,DIM1,DIM2}; /* original dimensions */
+ hsize_t dims_s[RANK3] = {DIMS0,DIMS1,DIMS2}; /* shrinking dimensions */
+ hsize_t dims_e[RANK3] = {DIME0,DIME1,DIME2}; /* extended dimensions */
+ hsize_t dims_c[RANK3] = {2,2,2}; /* chunk dimensions */
+ hsize_t dims_r[RANK3]; /* read dimensions */
hsize_t maxdims[RANK3] = {H5S_UNLIMITED,H5S_UNLIMITED,H5S_UNLIMITED};
int buf_o[DIM0][DIM1][DIM2];
int buf_s[DIMS0][DIMS1][DIMS2];
int buf_e[DIME0][DIME1][DIME2];
int buf_r[DIM0][DIM1][DIM2];
int i, j, k;
- int fillvalue = 1;
- int comp_value;
+ int fillvalue = 1;
+ int comp_value;
char filename[NAME_BUF_SIZE];
-
+
if ( do_fill_value )
{
comp_value = fillvalue;
@@ -1522,7 +1522,7 @@ static int test_rank3( hbool_t do_compress,
comp_value = 0;
}
-
+
for( i = 0; i < DIM0; i++ )
{
for( j = 0; j < DIM1; j++ )
@@ -1535,39 +1535,39 @@ static int test_rank3( hbool_t do_compress,
}
/* create a file creation property list */
- if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
+ if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
{
goto error;
}
-
+
if ( set_istore_k )
{
/* set non-default indexed storage B-tree internal 'K' value */
- if (H5Pset_istore_k(fcpl,ISTORE_IK) < 0)
+ if (H5Pset_istore_k(fcpl,ISTORE_IK) < 0)
{
goto error;
}
-
+
}
/* create a new file */
h5_fixname(FILENAME[2], fapl, filename, sizeof filename);
- if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl)) < 0)
+ if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl)) < 0)
{
goto error;
}
/* close property list */
- if(H5Pclose(fcpl) < 0)
+ if(H5Pclose(fcpl) < 0)
{
goto error;
}
-
+
/* create the data space with unlimited dimensions. */
- if ((sid = H5Screate_simple(RANK3, dims_o, maxdims)) < 0)
+ if ((sid = H5Screate_simple(RANK3, dims_o, maxdims)) < 0)
{
goto error;
}
-
+
/* modify dataset creation properties, i.e. enable chunking. */
if ((dcpl = H5Pcreate (H5P_DATASET_CREATE)) < 0)
{
@@ -1584,46 +1584,46 @@ static int test_rank3( hbool_t do_compress,
goto error;
}
- if(H5Pset_fill_time(dcpl, fill_time) < 0)
+ if(H5Pset_fill_time(dcpl, fill_time) < 0)
{
goto error;
}
}
else
{
-
- if(H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC) < 0)
+
+ if(H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC) < 0)
{
goto error;
}
-
+
}
if (do_compress)
{
- if(H5Pset_deflate(dcpl, 9) < 0)
+ if(H5Pset_deflate(dcpl, 9) < 0)
{
goto error;
}
}
-
+
/*-------------------------------------------------------------------------
* create, write array
*-------------------------------------------------------------------------
*/
-
+
/* create a dataset */
- if ((did = H5Dcreate2(fid , "dset1", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ if ((did = H5Dcreate2(fid , "dset1", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
{
goto error;
}
-
+
/* write */
- if (H5Dwrite(did , H5T_NATIVE_INT, sid, H5S_ALL, H5P_DEFAULT, buf_o) < 0)
+ if (H5Dwrite(did , H5T_NATIVE_INT, sid, H5S_ALL, H5P_DEFAULT, buf_o) < 0)
{
goto error;
}
-
-
+
+
#if defined (H5_SET_EXTENT_DEBUG3)
printf("\n");
for (i = 0; i < (int)dims_o[0]; i++ )
@@ -1637,61 +1637,61 @@ static int test_rank3( hbool_t do_compress,
printf("[%d] ", j);
}
printf("\n");
-
+
}
printf("\n");
-#endif
+#endif
+
-
if (H5Sclose(sid) < 0)
{
goto error;
}
-
+
/*-------------------------------------------------------------------------
* set new dimensions for the array; expand it
*
*-------------------------------------------------------------------------
*/
-
+
/* set new dimensions for the array. */
if (H5Dset_extent(did , dims_e) < 0)
{
goto error;
}
-
+
/* get the space */
if ((sid = H5Dget_space(did)) < 0)
{
goto error;
}
-
+
/* get dimensions */
- if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0)
+ if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0)
{
goto error;
}
-
+
if (H5Sclose(sid) < 0)
{
goto error;
}
-
-
+
+
/* check dimensions */
for( i = 0; i < RANK3; i++ )
{
- if (dims_r[i] != dims_e[i])
+ if (dims_r[i] != dims_e[i])
goto error;
}
-
+
/* read */
- if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_e) < 0)
+ if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_e) < 0)
goto error;
-
-
+
+
#if defined (H5_SET_EXTENT_DEBUG3)
printf("\n");
for (i = 0; i < (int)dims_r[0]; i++ )
@@ -1705,14 +1705,14 @@ static int test_rank3( hbool_t do_compress,
printf("[%d] ", j);
}
printf("\n");
-
+
}
printf("\n");
-#endif
+#endif
+
+
+
-
-
-
/* compare the read array with the expanded array */
for (i = 0; i < (int)dims_r[0]; i++ )
{
@@ -1720,59 +1720,59 @@ static int test_rank3( hbool_t do_compress,
{
for( k = 0; k < (int)dims_r[2]; k++ )
{
- if ( i >= DIM0 || j >= DIM1 || k >= DIM2 )
+ if ( i >= DIM0 || j >= DIM1 || k >= DIM2 )
{
- if(buf_e[i][j][k] != comp_value)
+ if(buf_e[i][j][k] != comp_value)
{
printf("buf_e[%d][%d][%d] = %d\n", i, j, k, buf_e[i][j][k] );
printf("value = %d\n", comp_value);
goto error;
- }
- }
- else
+ }
+ }
+ else
{
- if(buf_e[i][j][k] != buf_o[i][j][k] )
+ if(buf_e[i][j][k] != buf_o[i][j][k] )
goto error;
}
}
}
}
-
-
-
-
+
+
+
+
/*-------------------------------------------------------------------------
* shrink
*-------------------------------------------------------------------------
*/
-
+
/* set new dimensions for the array. */
if (H5Dset_extent(did , dims_s) < 0)
{
goto error;
}
-
+
/* get the space */
if ((sid = H5Dget_space(did)) < 0)
{
goto error;
}
-
+
/* get dimensions */
- if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0)
+ if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0)
{
goto error;
}
-
+
if (H5Sclose(sid) < 0)
{
goto error;
}
-
+
/* check dimensions */
for( i = 0; i < RANK3; i++ )
{
- if (dims_r[i] != dims_s[i])
+ if (dims_r[i] != dims_s[i])
goto error;
}
@@ -1781,8 +1781,8 @@ static int test_rank3( hbool_t do_compress,
/* for this case we close and reopen file */
if ( set_istore_k )
{
-
- if (H5Dclose(did) < 0)
+
+ if (H5Dclose(did) < 0)
{
goto error;
}
@@ -1791,32 +1791,32 @@ static int test_rank3( hbool_t do_compress,
goto error;
}
- if ((fid = H5Fopen( filename, H5F_ACC_RDWR, fapl ))<0)
+ if ((fid = H5Fopen( filename, H5F_ACC_RDWR, fapl ))<0)
{
goto error;
}
-
- if ((did = H5Dopen2( fid , "dset1", H5P_DEFAULT ))<0)
+
+ if ((did = H5Dopen2( fid , "dset1", H5P_DEFAULT ))<0)
{
goto error;
}
-
-
-
+
+
+
}
-
-
+
+
/*-------------------------------------------------------------------------
* read
*-------------------------------------------------------------------------
*/
-
+
/* read */
- if (H5Dread( did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_s ) < 0)
+ if (H5Dread( did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_s ) < 0)
{
goto error;
}
-
+
#if defined (H5_SET_EXTENT_DEBUG3)
printf("\n");
for (i = 0; i < (int)dims_r[0]; i++ )
@@ -1830,14 +1830,14 @@ static int test_rank3( hbool_t do_compress,
printf("[%d] ", j);
}
printf("\n");
-
+
}
printf("\n");
-#endif
+#endif
+
+
-
-
/* compare the read array with the shrinked array */
for( i = 0; i < (int)dims_r[0]; i++ )
{
@@ -1845,34 +1845,34 @@ static int test_rank3( hbool_t do_compress,
{
for( k = 0; k < (int)dims_r[2]; k++ )
{
- if ( buf_s[i][j][k] != buf_o[i][j][k] )
+ if ( buf_s[i][j][k] != buf_o[i][j][k] )
{
printf("buf_s[%d][%d][%d] = %d\n", i, j, k, buf_s[i][j][k] );
printf("buf_o[%d][%d][%d] = %d\n", i, j, k, buf_o[i][j][k] );
goto error;
- }
+ }
}
}
}
-
-
+
+
/*-------------------------------------------------------------------------
* set new dimensions for the array; expand it back to original size
*-------------------------------------------------------------------------
*/
-
+
/* set new dimensions for the array */
if (H5Dset_extent(did, dims_o) < 0)
{
goto error;
}
-
+
/* get the space */
- if ((sid = H5Dget_space(did)) < 0)
+ if ((sid = H5Dget_space(did)) < 0)
{
goto error;
}
-
+
/* get dimensions. */
if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0)
{
@@ -1883,18 +1883,18 @@ static int test_rank3( hbool_t do_compress,
{
goto error;
}
-
+
/* check dimensions */
for( i = 0; i < RANK3; i++ )
{
- if (dims_r[i] != dims_o[i])
+ if (dims_r[i] != dims_o[i])
goto error;
}
-
+
/* read */
- if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_r) < 0)
+ if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_r) < 0)
goto error;
-
+
#if defined (H5_SET_EXTENT_DEBUG3)
printf("\n");
for (i = 0; i < (int)dims_r[0]; i++ )
@@ -1903,19 +1903,19 @@ static int test_rank3( hbool_t do_compress,
{
for( k = 0; k < (int)dims_r[2]; k++ )
{
-
+
printf("%d ", buf_r[i][j][k]);
}
printf("[%d] ", j);
}
printf("\n");
-
+
}
printf("\n");
-#endif
+#endif
+
-
/* compare the read array with the original array */
for (i = 0; i < (int)dims_r[0]; i++ )
{
@@ -1923,24 +1923,24 @@ static int test_rank3( hbool_t do_compress,
{
for( k = 0; k < (int)dims_r[2]; k++ )
{
- if (i >= DIMS0 || j >= DIMS1 || k >= DIMS2 )
+ if (i >= DIMS0 || j >= DIMS1 || k >= DIMS2 )
{
- if( buf_r[i][j][k] != comp_value )
+ if( buf_r[i][j][k] != comp_value )
{
printf("buf_r[%d][%d][%d] = %d\n", i, j, k, buf_r[i][j][k] );
printf("value = %d\n", comp_value);
goto error;
- }
- }
- else
+ }
+ }
+ else
{
- if(buf_r[i][j][k] != buf_o[i][j][k])
+ if(buf_r[i][j][k] != buf_o[i][j][k])
goto error;
}
}
}
}
-
+
/*-------------------------------------------------------------------------
* shrink to 0
@@ -1951,61 +1951,61 @@ static int test_rank3( hbool_t do_compress,
dims_s[0] = 0;
dims_s[1] = 0;
dims_s[2] = 0;
-
+
/* set new dimensions for the array. */
if (H5Dset_extent(did , dims_s) < 0)
{
goto error;
}
-
+
/* get the space */
if ((sid = H5Dget_space(did)) < 0)
{
goto error;
}
-
+
/* get dimensions */
- if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0)
+ if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0)
{
goto error;
}
-
+
if (H5Sclose(sid) < 0)
{
goto error;
}
-
+
/* check dimensions */
for( i = 0; i < RANK3; i++ )
{
- if (dims_r[i] != dims_s[i])
+ if (dims_r[i] != dims_s[i])
goto error;
- }
-
-
-
+ }
+
+
+
/*-------------------------------------------------------------------------
- * close dataset
+ * close dataset
*-------------------------------------------------------------------------
*/
-
- if (H5Dclose(did) < 0)
+
+ if (H5Dclose(did) < 0)
{
goto error;
}
-
-
+
+
/*-------------------------------------------------------------------------
* test a dataset with non initialized chunks
*-------------------------------------------------------------------------
*/
-
-
- if ((sid = H5Screate_simple(RANK3, dims_o, maxdims)) < 0)
+
+
+ if ((sid = H5Screate_simple(RANK3, dims_o, maxdims)) < 0)
{
goto error;
}
- if ((did = H5Dcreate2(fid , "dset3", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ if ((did = H5Dcreate2(fid , "dset3", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
{
goto error;
}
@@ -2013,14 +2013,14 @@ static int test_rank3( hbool_t do_compress,
dims_o[ 0 ] = 0;
dims_o[ 1 ] = 0;
dims_o[ 2 ] = 0;
- if (H5Dset_extent( did , dims_o ) < 0)
+ if (H5Dset_extent( did , dims_o ) < 0)
{
goto error;
}
- if (H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
{
goto error;
}
@@ -2029,16 +2029,16 @@ static int test_rank3( hbool_t do_compress,
goto error;
}
-
-
-
+
+
+
/*-------------------------------------------------------------------------
* close property list
*-------------------------------------------------------------------------
*/
-
-
- if (H5Pclose(dcpl) < 0)
+
+
+ if (H5Pclose(dcpl) < 0)
{
goto error;
}
@@ -2050,12 +2050,12 @@ static int test_rank3( hbool_t do_compress,
return 0;
-
-
-
+
+
+
error:
-
- H5E_BEGIN_TRY
+
+ H5E_BEGIN_TRY
{
H5Dclose( did );
H5Sclose( sid );
@@ -2064,7 +2064,7 @@ error:
H5Fclose( fid );
} H5E_END_TRY;
return -1;
-
+
}
@@ -2075,32 +2075,32 @@ error:
static int test_external( hid_t fapl )
{
- hid_t fid=-1;
+ hid_t fid=-1;
hid_t did=-1;
hid_t sid=-1;
hid_t dcpl=-1;
- hsize_t dims_o[RANK2] = {DIM0,DIM1}; /* original dimensions */
- hsize_t dims_s[RANK2] = {DIMS0,DIMS1}; /* shrinking dimensions */
- hsize_t dims_e[RANK2] = {DIME0,DIM1}; /* extended dimensions, dimension 1 is the original */
- hsize_t dims_r[RANK2]; /* read dimensions */
+ hsize_t dims_o[RANK2] = {DIM0,DIM1}; /* original dimensions */
+ hsize_t dims_s[RANK2] = {DIMS0,DIMS1}; /* shrinking dimensions */
+ hsize_t dims_e[RANK2] = {DIME0,DIM1}; /* extended dimensions, dimension 1 is the original */
+ hsize_t dims_r[RANK2]; /* read dimensions */
hsize_t maxdims[RANK2] = {DIME0,DIM1}; /* only the first dimension can be extendible */
- int buf_o[DIM0][DIM1]; /* original buffer, for writing */
- int buf_s[DIMS0][DIMS1]; /* shrinked buffer, for reading */
- int buf_e[DIME0][DIM1]; /* extended buffer, for writing, dimension 1 is the original */
- int buf_ro[DIM0][DIM1]; /* original buffer for reading */
+ int buf_o[DIM0][DIM1]; /* original buffer, for writing */
+ int buf_s[DIMS0][DIMS1]; /* shrinked buffer, for reading */
+ int buf_e[DIME0][DIM1]; /* extended buffer, for writing, dimension 1 is the original */
+ int buf_ro[DIM0][DIM1]; /* original buffer for reading */
int i, j;
int comp_value = 0;
char filename[NAME_BUF_SIZE];
-
+
hsize_t size; /* number of bytes reserved in the file for the data */
- hsize_t max_size[2];
-
+ hsize_t max_size[2];
+
max_size[0] = dims_e[0];
max_size[1] = dims_e[1];
size = max_size[0] * max_size[1] * sizeof(int) / 2;
-
-
+
+
for( i = 0; i < DIM0; i++ )
{
for( j = 0; j < DIM1; j++ )
@@ -2110,32 +2110,32 @@ static int test_external( hid_t fapl )
}
TESTING_2("external file use");
-
+
/* create a new file */
h5_fixname(FILENAME[3], fapl, filename, sizeof filename);
- if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
FAIL_STACK_ERROR
-
+
/* modify dataset creation properties */
if ((dcpl = H5Pcreate (H5P_DATASET_CREATE)) < 0)
FAIL_STACK_ERROR
-
+
if(H5Pset_external(dcpl, EXT_FILE_NAME1, (off_t)0, size) < 0)
FAIL_STACK_ERROR
if(H5Pset_external(dcpl, EXT_FILE_NAME2, (off_t)0, size) < 0)
FAIL_STACK_ERROR
-
+
{
-
+
char name[256]; /*external file name */
off_t file_offset; /*external file offset */
hsize_t file_size; /*sizeof external file segment */
-
+
if(H5Pget_external(dcpl, 0, sizeof(name), name, &file_offset,
&file_size) < 0)
FAIL_STACK_ERROR
-
+
}
@@ -2155,11 +2155,11 @@ static int test_external( hid_t fapl )
/* create the data space with unlimited dimensions. */
- if ((sid = H5Screate_simple(RANK2, dims_o, maxdims)) < 0)
+ if ((sid = H5Screate_simple(RANK2, dims_o, maxdims)) < 0)
FAIL_STACK_ERROR
- if ((did = H5Dcreate2(fid , "dset1", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ if ((did = H5Dcreate2(fid , "dset1", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR
- if (H5Dwrite(did , H5T_NATIVE_INT, sid, H5S_ALL, H5P_DEFAULT, buf_o) < 0)
+ if (H5Dwrite(did , H5T_NATIVE_INT, sid, H5S_ALL, H5P_DEFAULT, buf_o) < 0)
FAIL_STACK_ERROR
if (H5Sclose(sid) < 0)
FAIL_STACK_ERROR
@@ -2171,9 +2171,9 @@ static int test_external( hid_t fapl )
*/
/* read */
- if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_ro) < 0)
+ if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_ro) < 0)
FAIL_STACK_ERROR
-
+
#if defined (H5_SET_EXTENT_DEBUG)
printf("\n");
for (i = 0; i < (int)dims_o[0]; i++ )
@@ -2184,10 +2184,10 @@ static int test_external( hid_t fapl )
}
printf("\n");
}
-#endif
+#endif
+
-
/*-------------------------------------------------------------------------
* expand
*-------------------------------------------------------------------------
@@ -2197,13 +2197,13 @@ static int test_external( hid_t fapl )
* set new dimensions for the array; expand it
* data is now, extended space was initialized with default value
*
- * 2 2 2 2
- * 2 2 2 2
- * 2 2 2 2
- * 2 2 2 2
- * 0 0 0 0
- * 0 0 0 0
- * 0 0 0 0
+ * 2 2 2 2
+ * 2 2 2 2
+ * 2 2 2 2
+ * 2 2 2 2
+ * 0 0 0 0
+ * 0 0 0 0
+ * 0 0 0 0
*
*-------------------------------------------------------------------------
*/
@@ -2215,28 +2215,28 @@ static int test_external( hid_t fapl )
/* get the space */
if ((sid = H5Dget_space(did)) < 0)
FAIL_STACK_ERROR
-
+
/* get dimensions */
- if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0)
+ if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0)
FAIL_STACK_ERROR
-
+
if (H5Sclose(sid) < 0)
FAIL_STACK_ERROR
-
-
+
+
/* check dimensions */
for( i = 0; i < RANK2; i++ )
{
- if (dims_r[i] != dims_e[i])
+ if (dims_r[i] != dims_e[i])
TEST_ERROR
}
-
+
/* read */
- if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_e) < 0)
+ if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_e) < 0)
FAIL_STACK_ERROR
-
-
+
+
#if defined (H5_SET_EXTENT_DEBUG)
printf("\n");
for (i = 0; i < (int)dims_r[0]; i++ )
@@ -2247,33 +2247,33 @@ static int test_external( hid_t fapl )
}
printf("\n");
}
-#endif
+#endif
+
+
+
-
-
-
/* compare the read array with the expanded array */
for (i = 0; i < (int)dims_r[0]; i++ )
{
for (j = 0; j < (int)dims_r[1]; j++ )
{
- if ( i >= DIM0 || j >= DIM1 )
+ if ( i >= DIM0 || j >= DIM1 )
{
- if(buf_e[i][j] != comp_value)
+ if(buf_e[i][j] != comp_value)
{
printf("buf_e[%d][%d] = %d\n", i, j, buf_e[i][j]);
printf("value = %d\n", comp_value);
TEST_ERROR
- }
- }
- else
+ }
+ }
+ else
{
- if(buf_e[i][j] != buf_o[i][j])
+ if(buf_e[i][j] != buf_o[i][j])
TEST_ERROR
}
}
}
-
+
/*-------------------------------------------------------------------------
@@ -2286,41 +2286,41 @@ static int test_external( hid_t fapl )
*
*-------------------------------------------------------------------------
*/
-
+
/* set new dimensions for the array. */
if (H5Dset_extent(did , dims_s) < 0)
FAIL_STACK_ERROR
-
+
/* get the space */
if ((sid = H5Dget_space(did)) < 0)
FAIL_STACK_ERROR
-
+
/* get dimensions */
- if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0)
+ if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0)
FAIL_STACK_ERROR
-
+
if (H5Sclose(sid) < 0)
FAIL_STACK_ERROR
-
+
/* check dimensions */
for( i = 0; i < RANK2; i++ )
{
- if (dims_r[i] != dims_s[i])
+ if (dims_r[i] != dims_s[i])
TEST_ERROR
}
-
-
+
+
/*-------------------------------------------------------------------------
* read
*-------------------------------------------------------------------------
*/
-
+
/* read */
- if (H5Dread( did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_s ) < 0)
+ if (H5Dread( did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_s ) < 0)
FAIL_STACK_ERROR
-
+
#if defined (H5_SET_EXTENT_DEBUG)
printf("\n");
for (i = 0; i < (int)dims_r[0]; i++ )
@@ -2331,22 +2331,22 @@ static int test_external( hid_t fapl )
}
printf("\n");
}
-#endif
+#endif
+
+
-
-
/* compare the read array with the shrinked array */
for( i = 0; i < (int)dims_r[0]; i++ )
{
for( j = 0; j < (int)dims_r[1]; j++ )
{
- if ( buf_s[i][j] != buf_o[i][j] )
+ if ( buf_s[i][j] != buf_o[i][j] )
{
printf("buf_s[%d][%d] = %d\n", i, j, buf_s[i][j]);
printf("buf_o[%d][%d] = %d\n", i, j, buf_o[i][j]);
TEST_ERROR
- }
+ }
}
}
@@ -2361,16 +2361,16 @@ static int test_external( hid_t fapl )
dims_e[1] = DIME1;
- H5E_BEGIN_TRY
+ H5E_BEGIN_TRY
{
-
-
+
+
/* set new dimensions for the array. */
if (H5Dset_extent(did , dims_e) == SUCCEED)
{
TEST_ERROR
}
-
+
} H5E_END_TRY;
@@ -2379,9 +2379,9 @@ static int test_external( hid_t fapl )
* close property list
*-------------------------------------------------------------------------
*/
-
-
- if (H5Pclose(dcpl) < 0)
+
+
+ if (H5Pclose(dcpl) < 0)
FAIL_STACK_ERROR
if (H5Dclose( did ) < 0)
@@ -2393,10 +2393,10 @@ static int test_external( hid_t fapl )
PASSED();
return 0;
-
+
error:
-
- H5E_BEGIN_TRY
+
+ H5E_BEGIN_TRY
{
H5Dclose( did );
H5Sclose( sid );
@@ -2414,19 +2414,19 @@ error:
static int test_layouts( H5D_layout_t layout, hid_t fapl )
{
- hid_t fid=-1;
+ hid_t fid=-1;
hid_t did=-1;
hid_t sid=-1;
hid_t dcpl=-1;
- hsize_t dims_o[RANK2] = {DIM0,DIM1}; /* original dimensions */
- hsize_t dims_s[RANK2] = {DIMS0,DIMS1}; /* shrinking dimensions */
- hsize_t dims_e[RANK2] = {DIME0,DIME1}; /* extended dimensions */
- hsize_t dims_r[RANK2]; /* read dimensions */
+ hsize_t dims_o[RANK2] = {DIM0,DIM1}; /* original dimensions */
+ hsize_t dims_s[RANK2] = {DIMS0,DIMS1}; /* shrinking dimensions */
+ hsize_t dims_e[RANK2] = {DIME0,DIME1}; /* extended dimensions */
+ hsize_t dims_r[RANK2]; /* read dimensions */
int buf_o[DIM0][DIM1];
int buf_r[DIM0][DIM1];
- int i, j;
+ int i, j;
char filename[NAME_BUF_SIZE];
-
+
for( i = 0; i < DIM0; i++ )
{
for( j = 0; j < DIM1; j++ )
@@ -2435,44 +2435,44 @@ static int test_layouts( H5D_layout_t layout, hid_t fapl )
}
}
-
+
/* create a new file */
h5_fixname(FILENAME[4], fapl, filename, sizeof filename);
- if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
{
goto error;
}
/* create the data space with unlimited dimensions. */
- if ((sid = H5Screate_simple(RANK2, dims_o, NULL)) < 0)
+ if ((sid = H5Screate_simple(RANK2, dims_o, NULL)) < 0)
{
goto error;
}
-
+
/* modify dataset creation properties */
if ((dcpl = H5Pcreate (H5P_DATASET_CREATE)) < 0)
{
goto error;
}
-
+
if (H5Pset_layout (dcpl, layout) < 0)
{
goto error;
}
-
+
/* create a dataset */
- if ((did = H5Dcreate2(fid , "dset1", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ if ((did = H5Dcreate2(fid , "dset1", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
{
goto error;
}
-
+
/* write */
- if (H5Dwrite(did , H5T_NATIVE_INT, sid, H5S_ALL, H5P_DEFAULT, buf_o) < 0)
+ if (H5Dwrite(did , H5T_NATIVE_INT, sid, H5S_ALL, H5P_DEFAULT, buf_o) < 0)
{
goto error;
}
-
-
+
+
#if defined (H5_SET_EXTENT_DEBUG4)
printf("\n");
for (i = 0; i < (int)dims_o[0]; i++ )
@@ -2483,65 +2483,65 @@ static int test_layouts( H5D_layout_t layout, hid_t fapl )
}
printf("\n");
}
-#endif
+#endif
+
-
if (H5Sclose(sid) < 0)
{
goto error;
}
-
+
/*-------------------------------------------------------------------------
* negative test
- * try to extend dimension
+ * try to extend dimension
*-------------------------------------------------------------------------
*/
- H5E_BEGIN_TRY
+ H5E_BEGIN_TRY
{
-
+
if (H5Dset_extent(did , dims_e) == SUCCEED)
{
goto error;
}
-
+
} H5E_END_TRY;
-
-
-
+
+
+
/* get the space */
if ((sid = H5Dget_space(did)) < 0)
{
goto error;
}
-
+
/* get dimensions */
- if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0)
+ if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0)
{
goto error;
}
-
+
if (H5Sclose(sid) < 0)
{
goto error;
}
-
-
+
+
/* check dimensions */
for( i = 0; i < RANK2; i++ )
{
- if (dims_r[i] != dims_o[i])
+ if (dims_r[i] != dims_o[i])
goto error;
}
-
+
/* read */
- if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_r) < 0)
+ if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_r) < 0)
goto error;
-
-
+
+
#if defined (H5_SET_EXTENT_DEBUG4)
printf("\n");
for (i = 0; i < (int)dims_r[0]; i++ )
@@ -2552,63 +2552,63 @@ static int test_layouts( H5D_layout_t layout, hid_t fapl )
}
printf("\n");
}
-#endif
+#endif
+
+
-
-
/*-------------------------------------------------------------------------
* negative test
- * try to shrink dimension
+ * try to shrink dimension
*-------------------------------------------------------------------------
*/
- H5E_BEGIN_TRY
+ H5E_BEGIN_TRY
{
-
+
if (H5Dset_extent(did , dims_s) == SUCCEED)
{
goto error;
}
-
+
} H5E_END_TRY;
-
+
/* get the space */
if ((sid = H5Dget_space(did)) < 0)
{
goto error;
}
-
+
/* get dimensions */
- if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0)
+ if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0)
{
goto error;
}
-
+
if (H5Sclose(sid) < 0)
{
goto error;
}
-
+
/* check dimensions */
for( i = 0; i < RANK2; i++ )
{
- if (dims_r[i] != dims_o[i])
+ if (dims_r[i] != dims_o[i])
goto error;
}
-
+
/*-------------------------------------------------------------------------
* read
*-------------------------------------------------------------------------
*/
-
+
/* read */
- if (H5Dread( did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_r ) < 0)
+ if (H5Dread( did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_r ) < 0)
{
goto error;
}
-
+
#if defined (H5_SET_EXTENT_DEBUG4)
printf("\n");
for (i = 0; i < (int)dims_r[0]; i++ )
@@ -2619,21 +2619,21 @@ static int test_layouts( H5D_layout_t layout, hid_t fapl )
}
printf("\n");
}
-#endif
+#endif
+
-
/*-------------------------------------------------------------------------
- * close
+ * close
*-------------------------------------------------------------------------
*/
-
- if (H5Dclose(did) < 0)
+
+ if (H5Dclose(did) < 0)
{
goto error;
}
-
- if (H5Pclose(dcpl) < 0)
+
+ if (H5Pclose(dcpl) < 0)
{
goto error;
}
@@ -2645,12 +2645,12 @@ static int test_layouts( H5D_layout_t layout, hid_t fapl )
return 0;
-
-
-
+
+
+
error:
-
- H5E_BEGIN_TRY
+
+ H5E_BEGIN_TRY
{
H5Dclose( did );
H5Sclose( sid );
@@ -2658,6 +2658,6 @@ error:
H5Fclose( fid );
} H5E_END_TRY;
return -1;
-
+
}
diff --git a/test/tattr.c b/test/tattr.c
index d84231e..a926cfd 100644
--- a/test/tattr.c
+++ b/test/tattr.c
@@ -10347,7 +10347,7 @@ test_attr(void)
test_attr_bug3(my_fcpl, my_fapl); /* Test "self referential" attributes */
test_attr_bug4(my_fcpl, my_fapl); /* Test attributes on named datatypes */
test_attr_bug5(my_fcpl, my_fapl); /* Test opening/closing attributes through different file handles */
- test_attr_bug6(my_fcpl, my_fapl); /* Test reading empty attribute */
+ test_attr_bug6(my_fcpl, my_fapl); /* Test reading empty attribute */
} /* end for */
} /* end if */
else {
@@ -10371,7 +10371,7 @@ test_attr(void)
test_attr_bug3(fcpl, my_fapl); /* Test "self referential" attributes */
test_attr_bug4(fcpl, my_fapl); /* Test attributes on named datatypes */
test_attr_bug5(fcpl, my_fapl); /* Test opening/closing attributes through different file handles */
- test_attr_bug6(fcpl, my_fapl); /* Test reading empty attribute */
+ test_attr_bug6(fcpl, my_fapl); /* Test reading empty attribute */
} /* end else */
} /* end for */
diff --git a/test/tconfig.c b/test/tconfig.c
index 189b7ba..7978727 100644
--- a/test/tconfig.c
+++ b/test/tconfig.c
@@ -65,7 +65,7 @@ void test_exit_definitions(void);
* 16 Dec 2009
* On Boeing's OpenVMS, the value of EXIT_FAILURE is 268435458.
* (The test is in test_exit_definitions.) Their document says
- * it's supposed to be 2. I commented it out for further
+ * it's supposed to be 2. I commented it out for further
* consideration.
*-------------------------------------------------------------------------
*/
diff --git a/test/tfile.c b/test/tfile.c
index 8103881..d080b4a 100644
--- a/test/tfile.c
+++ b/test/tfile.c
@@ -2066,8 +2066,8 @@ test_cached_stab_info(void)
/****************************************************************
**
** test_rw_noupdate(): low-level file test routine.
-** This test checks to ensure that opening and closing a file
-** with read/write permissions does not write anything to the
+** This test checks to ensure that opening and closing a file
+** with read/write permissions does not write anything to the
** file if the file does not change.
**
** Programmer: Mike McGreevy
diff --git a/test/tmisc.c b/test/tmisc.c
index d6c10b0..3a009c5 100644
--- a/test/tmisc.c
+++ b/test/tmisc.c
@@ -5144,7 +5144,7 @@ test_misc29(void)
CHECK(ret, -1, "h5_make_local_copy");
/* Open the copied file */
- fid = H5Fopen(MISC29_COPY_FILE, H5F_ACC_RDWR, H5P_DEFAULT);
+ fid = H5Fopen(MISC29_COPY_FILE, H5F_ACC_RDWR, H5P_DEFAULT);
CHECK(fid, FAIL, "H5Fopen");
/* Delete the last dataset */
diff --git a/test/tsohm.c b/test/tsohm.c
index b5b489b..28854e2 100644
--- a/test/tsohm.c
+++ b/test/tsohm.c
@@ -3793,7 +3793,7 @@ test_sohm_extend_dset(void)
* Function: test_sohm_external_dtype
*
* Purpose: When a datatype is a SOHM type in one file, test that the
- * second file using the same datatype actually save it in
+ * second file using the same datatype actually save it in
* the file, too.
*
* Programmer: Raymond Lu
@@ -3814,9 +3814,9 @@ test_sohm_external_dtype(void)
hid_t fcpl, file1, file2;
hid_t dataset1, dataset2;
hid_t s1_tid, dset1_tid, dset2_tid, space;
- hsize_t dims[2] = {NX, NY};
+ hsize_t dims[2] = {NX, NY};
H5T_class_t dtype_class;
- size_t dmsg_count;
+ size_t dmsg_count;
unsigned x, i;
herr_t ret;
@@ -3843,7 +3843,7 @@ test_sohm_external_dtype(void)
/* Create a data type for s1_t */
s1_tid = H5Tcreate(H5T_COMPOUND, sizeof(s1_t));
CHECK_I(s1_tid, "H5Tcreate");
-
+
ret = H5Tinsert(s1_tid, "a", HOFFSET(s1_t,a), H5T_NATIVE_INT);
CHECK_I(ret, "H5Tinsert");
@@ -3860,7 +3860,7 @@ test_sohm_external_dtype(void)
VERIFY(dmsg_count, 0, "H5F_get_sohm_mesg_count_test");
/* Create data set */
- dataset1 = H5Dcreate2(file1, "dataset_1", s1_tid, space, H5P_DEFAULT, H5P_DEFAULT,
+ dataset1 = H5Dcreate2(file1, "dataset_1", s1_tid, space, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT);
CHECK_I(dataset1, "H5Dcreate2");
@@ -3880,7 +3880,7 @@ test_sohm_external_dtype(void)
s_ptr->a = i*3 + 1;
s_ptr->b = i*3 + 2;
}
-
+
/* Write the data to the dataset1 */
ret = H5Dwrite(dataset1, s1_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, orig);
CHECK_I(ret, "H5Dwrite");
@@ -3898,7 +3898,7 @@ test_sohm_external_dtype(void)
VERIFY(dmsg_count, 0, "H5F_get_sohm_mesg_count_test");
/* Create a data set using the datatype of the dataset in the first file. */
- dataset2 = H5Dcreate2(file2, "dataset_2", dset1_tid, space, H5P_DEFAULT, H5P_DEFAULT,
+ dataset2 = H5Dcreate2(file2, "dataset_2", dset1_tid, space, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT);
CHECK_I(dataset2, "H5Dcreate2");
@@ -3914,7 +3914,7 @@ test_sohm_external_dtype(void)
ret = H5Dclose(dataset2);
CHECK_I(ret, "H5Dclose");
- /* Close file 1 and the dataset's datatype in file 1. Verify that the datatype in
+ /* Close file 1 and the dataset's datatype in file 1. Verify that the datatype in
* file 2 is still accessible. */
ret = H5Tclose(dset1_tid);
CHECK_I(ret, "H5Tclose");
diff --git a/test/vfd.c b/test/vfd.c
index bd642be..12ce04e 100644
--- a/test/vfd.c
+++ b/test/vfd.c
@@ -873,7 +873,7 @@ test_family_compat(void)
error:
H5E_BEGIN_TRY {
H5Fclose(file);
- H5Pclose(fapl);
+ H5Pclose(fapl);
} H5E_END_TRY;
return -1;