diff options
author | Quincey Koziol <koziol@koziol.gov> | 2020-04-20 23:12:00 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@koziol.gov> | 2020-04-20 23:12:00 (GMT) |
commit | 9e5dbf69062d4d2cb40ba8f68edb355477fc9b67 (patch) | |
tree | ab184e76824e8b4250ad9bf38286a65227fe2407 /test | |
parent | 7ba692badf9a1bafb9d3b2f72efbbdf773b5932a (diff) | |
download | hdf5-9e5dbf69062d4d2cb40ba8f68edb355477fc9b67.zip hdf5-9e5dbf69062d4d2cb40ba8f68edb355477fc9b67.tar.gz hdf5-9e5dbf69062d4d2cb40ba8f68edb355477fc9b67.tar.bz2 |
Trim trailing whitespace
Diffstat (limited to 'test')
67 files changed, 517 insertions, 517 deletions
diff --git a/test/SWMR_UseCase_UG.txt b/test/SWMR_UseCase_UG.txt index e29944a..18d4927 100644 --- a/test/SWMR_UseCase_UG.txt +++ b/test/SWMR_UseCase_UG.txt @@ -11,7 +11,7 @@ %%%%Use Case 1.7%%%% - + 3. Use Case [1.7]: Appending a single chunk diff --git a/test/accum.c b/test/accum.c index f7d02fd..548a04d 100644 --- a/test/accum.c +++ b/test/accum.c @@ -77,12 +77,12 @@ void accum_printf(const H5F_t *f); /*------------------------------------------------------------------------- * Function: main - * + * * Purpose: Test the metadata accumulator code - * + * * Return: Success: SUCCEED * Failure: FAIL - * + * * Programmer: Mike McGreevy * October 7, 2010 * @@ -157,7 +157,7 @@ main(void) return 0; -error: +error: if(api_ctx_pushed) H5CX_pop(); HDputs("*** TESTS FAILED ***"); @@ -171,12 +171,12 @@ error: /*------------------------------------------------------------------------- * Function: test_write_read - * + * * Purpose: Simple test to write to then read from metadata accumulator. - * + * * Return: Success: SUCCEED * Failure: FAIL - * + * * Programmer: Mike McGreevy * October 7, 2010 * @@ -222,17 +222,17 @@ error: HDfree(read_buf); return 1; -} /* test_write_read */ +} /* test_write_read */ /*------------------------------------------------------------------------- * Function: test_write_read_nonacc_front - * + * * Purpose: Simple test to write to then read from before metadata accumulator. - * + * * Return: Success: SUCCEED * Failure: FAIL - * + * * Programmer: Allen Byrne * October 8, 2010 * @@ -281,17 +281,17 @@ error: HDfree(read_buf); return 1; -} /* test_write_read */ +} /* test_write_read */ /*------------------------------------------------------------------------- * Function: test_write_read_nonacc_end - * + * * Purpose: Simple test to write to then read from after metadata accumulator. - * + * * Return: Success: SUCCEED * Failure: FAIL - * + * * Programmer: Allen Byrne * October 8, 2010 * @@ -340,17 +340,17 @@ error: HDfree(read_buf); return 1; -} /* test_write_read */ +} /* test_write_read */ /*------------------------------------------------------------------------- * Function: test_free * * Purpose: Simple test to free metadata accumulator. - * + * * Return: Success: SUCCEED * Failure: FAIL - * + * * Programmer: Raymond Lu * October 8, 2010 * @@ -366,7 +366,7 @@ test_free(H5F_t *f) TESTING("simple freeing metadata accumulator"); - /* Write and free the whole accumulator. */ + /* Write and free the whole accumulator. */ wbuf = (int32_t *)HDmalloc(256 * sizeof(int32_t)); HDassert(wbuf); rbuf = (int32_t *)HDmalloc(256 * sizeof(int32_t)); @@ -388,12 +388,12 @@ test_free(H5F_t *f) /* Write second quarter of the accumulator */ if(accum_write(64 * sizeof(int32_t), 64 * sizeof(int32_t), wbuf) < 0) FAIL_STACK_ERROR; - /* Free the second quarter of the accumulator, the requested area + /* Free the second quarter of the accumulator, the requested area * is bigger than the data region on the right side. */ if(accum_free(f, 64 * sizeof(int32_t), 65 * sizeof(int32_t)) < 0) FAIL_STACK_ERROR; - /* Write half of the accumulator. */ + /* Write half of the accumulator. */ if(accum_write(0, 128 * sizeof(int32_t), wbuf) < 0) FAIL_STACK_ERROR; /* Free the first block of 4B */ @@ -525,19 +525,19 @@ error: HDfree(expect); return 1; -} /* test_free */ +} /* test_free */ /*------------------------------------------------------------------------- * Function: test_accum_overlap - * + * * Purpose: This test will write a series of pieces of data * to the accumulator with the goal of overlapping * the writes in various different ways. - * + * * Return: Success: SUCCEED * Failure: FAIL - * + * * Programmer: Mike McGreevy * October 7, 2010 * @@ -629,9 +629,9 @@ test_accum_overlap(H5F_t *f) if(accum_write(96, 3 * sizeof(int32_t), wbuf) < 0) FAIL_STACK_ERROR; if(accum_read(96, 3 * sizeof(int32_t), rbuf) < 0) FAIL_STACK_ERROR; if(HDmemcmp(wbuf, rbuf, 3 * sizeof(int32_t)) != 0) TEST_ERROR; - + /* Set up expected data buffer and verify contents of - accumulator as constructed by cases 1-8, above */ + accumulator as constructed by cases 1-8, above */ for(i = 0; i < 5; i++) wbuf[i] = 4; for(i = 5; i < 6; i++) @@ -881,14 +881,14 @@ error: /*------------------------------------------------------------------------- * Function: test_accum_non_overlap_size - * + * * Purpose: This test will write a series of pieces of data * to the accumulator with the goal of not overlapping * the writes with a data size larger then the accum size. - * + * * Return: Success: SUCCEED * Failure: FAIL - * + * * Programmer: Allen Byrne * October 8, 2010 * @@ -950,7 +950,7 @@ error: * * Purpose: This test will write a series of pieces of data * to the accumulator with the goal of overlapping - * the writes with a data size completely overlapping + * the writes with a data size completely overlapping * the accumulator at both ends. * * Return: Success: SUCCEED @@ -1015,25 +1015,25 @@ error: /*------------------------------------------------------------------------- * Function: test_accum_adjust - * + * * Purpose: This test examines the various ways the accumulator might * adjust itself as a result of data appending or prepending * to it. * - * This test program covers all the code in H5F_accum_adjust, + * This test program covers all the code in H5F_accum_adjust, * but NOT all possible paths through said code. It only covers * six potential paths through the function. (Again, though, each * piece of code within an if/else statement in H5F_accum_adjust is - * covered by one of the paths in this test function). Since there - * are a ridiculous number of total possible paths through this + * covered by one of the paths in this test function). Since there + * are a ridiculous number of total possible paths through this * function due to its large number of embedded if/else statements, - * that's certainly a lot of different test cases to write by hand. - * (Though if someone comes across this code and has some free + * that's certainly a lot of different test cases to write by hand. + * (Though if someone comes across this code and has some free * time, go for it). - * + * * Return: Success: SUCCEED * Failure: FAIL - * + * * Programmer: Mike McGreevy * October 11, 2010 * @@ -1068,7 +1068,7 @@ test_accum_adjust(H5F_t *f) * an increase in size because it's already at it's maximum size */ if(accum_write((1024 * 1024), (1024 * 1024) - 1, wbuf) < 0) FAIL_STACK_ERROR; - /* Write a small (1KB) block that prepends to the front of the accumulator. */ + /* Write a small (1KB) block that prepends to the front of the accumulator. */ /* ==> Accumulator will need more buffer space */ /* ==> Accumulator will try to resize, but see that it's getting too big */ /* ==> Size of new block is less than half maximum size of accumulator */ @@ -1084,7 +1084,7 @@ test_accum_adjust(H5F_t *f) /* Read back and verify second write */ if(accum_read((1024 * 1024) - 1024, 1024, rbuf) < 0) FAIL_STACK_ERROR; if(HDmemcmp(wbuf, rbuf, (size_t)1024) != 0) TEST_ERROR; - + /* Reset accumulator for next case */ if(accum_reset(f) < 0) FAIL_STACK_ERROR; @@ -1144,7 +1144,7 @@ test_accum_adjust(H5F_t *f) to disk */ if(accum_write(0, 1, wbuf) < 0) FAIL_STACK_ERROR; - /* Read in the piece we wrote to disk above, and then verify that + /* Read in the piece we wrote to disk above, and then verify that the data is as expected */ if(accum_read((1024 * 1024) - 1, 1024, rbuf) < 0) FAIL_STACK_ERROR; if(HDmemcmp(wbuf, rbuf, (size_t)1024) != 0) TEST_ERROR; @@ -1175,7 +1175,7 @@ test_accum_adjust(H5F_t *f) /* ==> Size of new block is less than than half maximum size of accumulator */ /* ==> New block being appended to accumulator */ /* ==> We can slide the dirty region down, to accomodate the request */ - /* ==> Max Buffer Size - (dirty offset + adjust size) >= 2 * size) */ + /* ==> Max Buffer Size - (dirty offset + adjust size) >= 2 * size) */ /* ==> Need to adjust location of accumulator while appending */ /* ==> Accumulator will need to be reallocated */ if(accum_write(1048571, 349523, wbuf) < 0) FAIL_STACK_ERROR; @@ -1184,7 +1184,7 @@ test_accum_adjust(H5F_t *f) to disk */ if(accum_write(1398900, 1, wbuf) < 0) FAIL_STACK_ERROR; - /* Read in the piece we wrote to disk above, and then verify that + /* Read in the piece we wrote to disk above, and then verify that the data is as expected */ if(accum_read(1048571, 349523, rbuf) < 0) FAIL_STACK_ERROR; if(HDmemcmp(wbuf, rbuf, (size_t)349523) != 0) TEST_ERROR; @@ -1213,7 +1213,7 @@ test_accum_adjust(H5F_t *f) /* ==> Size of new block is less than than half maximum size of accumulator */ /* ==> New block being appended to accumulator */ /* ==> We can slide the dirty region down, to accomodate the request */ - /* ==> Max Buffer Size - (dirty offset + adjust size) < 2 * size) */ + /* ==> Max Buffer Size - (dirty offset + adjust size) < 2 * size) */ /* ==> Need to adjust location of accumulator while appending */ if(accum_write((1024 * 1024) - 5, 10, wbuf) < 0) FAIL_STACK_ERROR; @@ -1221,7 +1221,7 @@ test_accum_adjust(H5F_t *f) to disk */ if(accum_write(0, 1, wbuf) < 0) FAIL_STACK_ERROR; - /* Read in the piece we wrote to disk above, and then verify that + /* Read in the piece we wrote to disk above, and then verify that the data is as expected */ if(accum_read((1024 * 1024) - 5, 10, rbuf) < 0) FAIL_STACK_ERROR; if(HDmemcmp(wbuf, rbuf, (size_t)10) != 0) TEST_ERROR; @@ -1253,7 +1253,7 @@ test_accum_adjust(H5F_t *f) to disk */ if(accum_write(1398900, 1, wbuf) < 0) FAIL_STACK_ERROR; - /* Read in the piece we wrote to disk above, and then verify that + /* Read in the piece we wrote to disk above, and then verify that the data is as expected */ if(accum_read(1048571, 349523, rbuf) < 0) FAIL_STACK_ERROR; if(HDmemcmp(wbuf, rbuf, (size_t)349523) != 0) TEST_ERROR; @@ -1279,23 +1279,23 @@ error: /*------------------------------------------------------------------------- * Function: test_read_after - * - * Purpose: This test will verify the case when metadata is read partly - * from the accumulator and partly from disk. The test will + * + * Purpose: This test will verify the case when metadata is read partly + * from the accumulator and partly from disk. The test will * write a block of data at address 512, force the data to be - * written to disk, write new data partially overlapping the - * original block from below, then read data at address 512. - * The data read should be partly new and partly original. - * + * written to disk, write new data partially overlapping the + * original block from below, then read data at address 512. + * The data read should be partly new and partly original. + * * Return: Success: SUCCEED * Failure: FAIL - * + * * Programmer: Larry Knox * October 8, 2010 * *------------------------------------------------------------------------- */ -unsigned +unsigned test_read_after(H5F_t *f) { int i = 0; @@ -1329,14 +1329,14 @@ test_read_after(H5F_t *f) of the original block */ if(accum_write(256, 512, wbuf) < 0) FAIL_STACK_ERROR; - /* Read 128 bytes at the original address, and then */ + /* Read 128 bytes at the original address, and then */ if(accum_read(512, 512, rbuf) < 0) FAIL_STACK_ERROR; - /* Set the second half of wbuf back to 1s */ + /* Set the second half of wbuf back to 1s */ for(i = 64; i < s; i++) wbuf[i] = 1; - /* Read in the piece we wrote to disk above, and then verify that + /* Read in the piece we wrote to disk above, and then verify that the data is as expected */ if(accum_read(512, 512, rbuf) < 0) FAIL_STACK_ERROR; if(HDmemcmp(wbuf, rbuf, (size_t)128) != 0) TEST_ERROR; @@ -1362,19 +1362,19 @@ error: /*------------------------------------------------------------------------- * Function: test_big - * + * * Purpose: This test exercises writing large pieces of metadata to the * file. - * + * * Return: Success: SUCCEED * Failure: FAIL - * + * * Programmer: Quincey Koziol * October 12, 2010 * *------------------------------------------------------------------------- */ -unsigned +unsigned test_big(H5F_t *f) { uint8_t *wbuf, *wbuf2, *rbuf, *zbuf; /* Buffers for reading & writing, etc */ @@ -1670,19 +1670,19 @@ error: /*------------------------------------------------------------------------- * Function: test_random_write - * + * * Purpose: This test writes random pieces of data to the file and * then reads it all back. - * + * * Return: Success: SUCCEED * Failure: FAIL - * + * * Programmer: Quincey Koziol * October 11, 2010 * *------------------------------------------------------------------------- */ -unsigned +unsigned test_random_write(H5F_t *f) { uint8_t *wbuf, *rbuf; /* Buffers for reading & writing */ @@ -1808,23 +1808,23 @@ error: /*------------------------------------------------------------------------- * Function: test_swmr_write_big - * + * * Purpose: A SWMR test: verifies that writing "large" metadata to a file - * opened with SWMR_WRITE will flush the existing metadata in the + * opened with SWMR_WRITE will flush the existing metadata in the * accumulator to disk first before writing the "large" metadata - * to disk. + * to disk. * This test will fork and exec a reader "accum_swmr_reader" which * opens the same file with SWMR_READ and verifies that the correct * metadata is read from disk. - * + * * Return: Success: 0 * Failure: 1 - * + * * Programmer: Vailin Choi; April 2013 * *------------------------------------------------------------------------- */ -unsigned +unsigned test_swmr_write_big(hbool_t newest_format) { hid_t fid = -1; /* File ID */ @@ -1991,11 +1991,11 @@ test_swmr_write_big(hbool_t newest_format) FAIL_STACK_ERROR; /* Close and remove the file */ - if(H5Fclose(fid) < 0) + if(H5Fclose(fid) < 0) FAIL_STACK_ERROR; /* Close the property list */ - if(H5Pclose(fapl) < 0) + if(H5Pclose(fapl) < 0) FAIL_STACK_ERROR; /* Pop API context */ @@ -2034,12 +2034,12 @@ error: /*------------------------------------------------------------------------- * Function: accum_printf - * + * * Purpose: Debug function to print some stats about the accumulator - * + * * Return: Success: SUCCEED * Failure: FAIL - * + * * Programmer: Mike McGreevy * October 7, 2010 * diff --git a/test/accum_swmr_reader.c b/test/accum_swmr_reader.c index ac48a13..c3be09a 100644 --- a/test/accum_swmr_reader.c +++ b/test/accum_swmr_reader.c @@ -33,15 +33,15 @@ const char *FILENAME[] = { /*------------------------------------------------------------------------- * Function: main - * - * Purpose: This is the reader forked/execved by "test_swmr_write_big()" + * + * Purpose: This is the reader forked/execved by "test_swmr_write_big()" * test in accum.c. The reader reads at address 1024 from the file * and verifies that the metadata in the accumulator at address * 1024 does get written to disk. - * + * * Return: Success: EXIT_SUCCESS * Failure: EXIT_FAILURE - * + * * Programmer: Vailin Choi; June 2013 * *------------------------------------------------------------------------- @@ -85,7 +85,7 @@ main(void) api_ctx_pushed = TRUE; /* Get H5F_t * to internal file structure */ - if(NULL == (f = (H5F_t *)H5VL_object(fid))) + if(NULL == (f = (H5F_t *)H5VL_object(fid))) FAIL_STACK_ERROR /* Should read in [1024, 2024] with buf data */ @@ -93,7 +93,7 @@ main(void) FAIL_STACK_ERROR; /* Verify the data read is correct */ - if(HDmemcmp(buf, rbuf, (size_t)1024) != 0) + if(HDmemcmp(buf, rbuf, (size_t)1024) != 0) TEST_ERROR; /* CLose the file */ @@ -69,7 +69,7 @@ # define GB8LL 0 /*cannot do the test*/ #endif -/* Define Small, Large, Extra Large, Huge File which +/* Define Small, Large, Extra Large, Huge File which * corrspond to less than 2GB, 2GB, 4GB, and tens of GB file size. * NO_FILE stands for "no file" to be tested. */ @@ -633,7 +633,7 @@ error: return 1; } /* end test_sec2() */ -static int +static int test_stdio(hid_t fapl) { char filename[1024]; diff --git a/test/cache_common.c b/test/cache_common.c index 038a0ed..1dc13a1 100644 --- a/test/cache_common.c +++ b/test/cache_common.c @@ -724,7 +724,7 @@ variable_get_final_load_size(const void *image, size_t image_len, */ static htri_t -verify_chksum(const void H5_ATTR_UNUSED *image, size_t H5_ATTR_UNUSED len, void *udata, +verify_chksum(const void H5_ATTR_UNUSED *image, size_t H5_ATTR_UNUSED len, void *udata, int32_t H5_ATTR_NDEBUG_UNUSED entry_type) { test_entry_t *entry; diff --git a/test/cross_read.c b/test/cross_read.c index 5444aae..c16ddbc 100644 --- a/test/cross_read.c +++ b/test/cross_read.c @@ -213,7 +213,7 @@ error: * Purpose: Handle each dataset from the data file. * * Return: Success: 0 - * Failure: Number of failures + * Failure: Number of failures * * Programmer: Raymond Lu * 21 January 2011 @@ -242,46 +242,46 @@ check_file(char *filename) TESTING("dataset of LE FLOAT with scale-offset filter"); nerrors += check_data_f(DATASETNAME2, fid); - + TESTING("dataset of BE FLOAT with scale-offset filter"); nerrors += check_data_f(DATASETNAME3, fid); TESTING("dataset of LE DOUBLE with scale-offset filter"); nerrors += check_data_f(DATASETNAME4, fid); - + TESTING("dataset of BE DOUBLE with scale-offset filter"); nerrors += check_data_f(DATASETNAME5, fid); - + TESTING("dataset of LE CHAR with scale-offset filter"); nerrors += check_data_i(DATASETNAME6, fid); - + TESTING("dataset of BE CHAR with scale-offset filter"); nerrors += check_data_i(DATASETNAME7, fid); - + TESTING("dataset of LE SHORT with scale-offset filter"); nerrors += check_data_i(DATASETNAME8, fid); - + TESTING("dataset of BE SHORT with scale-offset filter"); nerrors += check_data_i(DATASETNAME9, fid); TESTING("dataset of LE INT with scale-offset filter"); nerrors += check_data_i(DATASETNAME10, fid); - + TESTING("dataset of BE INT with scale-offset filter"); nerrors += check_data_i(DATASETNAME11, fid); TESTING("dataset of LE LONG LONG with scale-offset filter"); nerrors += check_data_i(DATASETNAME12, fid); - + TESTING("dataset of BE LONG LONG with scale-offset filter"); nerrors += check_data_i(DATASETNAME13, fid); TESTING("dataset of LE FLOAT with Fletcher32 filter"); nerrors += check_data_f(DATASETNAME14, fid); - + TESTING("dataset of BE FLOAT with Fletcher32 filter"); nerrors += check_data_f(DATASETNAME15, fid); - + TESTING("dataset of LE FLOAT with Deflate filter"); #ifdef H5_HAVE_FILTER_DEFLATE nerrors += check_data_f(DATASETNAME16, fid); diff --git a/test/del_many_dense_attrs.c b/test/del_many_dense_attrs.c index ada7a6f..4c1efae 100644 --- a/test/del_many_dense_attrs.c +++ b/test/del_many_dense_attrs.c @@ -13,7 +13,7 @@ /* * Purpose: Test to verify that the infinite loop closing library/abort failure - * is fixed when the application creates and removes dense attributes + * is fixed when the application creates and removes dense attributes * (See HDFFV-10659). */ @@ -22,7 +22,7 @@ /* The test file name */ const char *FILENAME[] = { - "del_many_dense_attrs", + "del_many_dense_attrs", NULL }; @@ -49,7 +49,7 @@ static void catch_signal(int H5_ATTR_UNUSED signo) * Function: main * * Purpose: Test to verify that the infinite loop closing library/abort failure - * is fixed when the application creates and removes dense attributes + * is fixed when the application creates and removes dense attributes * (See HDFFV-10659). * * Return: Success: exit(EXIT_SUCCESS) @@ -137,7 +137,7 @@ main(void) if(H5Aclose(aid) < 0) TEST_ERROR } - + /* Close the datatype */ if(H5Tclose(tid) < 0) TEST_ERROR diff --git a/test/dsets.c b/test/dsets.c index 2201d89..34108d6 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -5364,7 +5364,7 @@ test_types(hid_t file) (space=H5Screate_simple(1, &nelmts, NULL)) < 0 || (dset=H5Dcreate2(grp, "bitfield_1", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto error; - for(i=0; i<sizeof buf; i++) buf[i] = (unsigned char)(0xff ^ i); + for(i=0; i<sizeof buf; i++) buf[i] = (unsigned char)(0xff ^ i); if(H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) goto error; @@ -5378,7 +5378,7 @@ test_types(hid_t file) (space=H5Screate_simple(1, &nelmts, NULL)) < 0 || (dset=H5Dcreate2(grp, "bitfield_2", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto error; - for(i=0; i<sizeof buf; i++) buf[i] = (unsigned char)(0xff ^ i); + for(i=0; i<sizeof buf; i++) buf[i] = (unsigned char)(0xff ^ i); if(H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) goto error; if(H5Sclose(space) < 0) goto error; @@ -9610,15 +9610,15 @@ test_fixed_array(hid_t fapl) const hsize_t chunk_dim2[2] = {4, 3}; /* Chunk dimensions */ - int **chunks = NULL; /* # of chunks for dataset dimensions */ - int **chunks_big = NULL; /* # of chunks for big dataset dimensions */ + int **chunks = NULL; /* # of chunks for dataset dimensions */ + int **chunks_big = NULL; /* # of chunks for big dataset dimensions */ int *chunks_bytes = NULL; int *chunks_big_bytes = NULL; int chunk_row; /* chunk row index */ int chunk_col; /* chunk column index */ - hsize_t **coord = NULL; /* datdaset coordinates */ + hsize_t **coord = NULL; /* datdaset coordinates */ hsize_t **coord_big = NULL; /* big datdaset coordinates */ hsize_t *coord_bytes = NULL; hsize_t *coord_big_bytes = NULL; @@ -10014,7 +10014,7 @@ error: H5Sclose(mem_id); H5Fclose(fid); } H5E_END_TRY; - + HDfree(wbuf_big); HDfree(rbuf_big); HDfree(chunks); @@ -636,7 +636,7 @@ test_graph_nocycle(void) /* Test 3: Simple "inverted" tree. Two parent files share a child file, * which has its own child file. Verify that the child's child is not * closed until both parents' EFCs are released. First release through one - * parent, then reopen through that parent and release the other, then + * parent, then reopen through that parent and release the other, then * re-release the first parent. */ if(NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id))) @@ -867,7 +867,7 @@ test_graph_cycle(void) /* Test 1: File caches itself. Verify that closing the file causes it to be - * actually closed, and there is no other unexpected behavior. + * actually closed, and there is no other unexpected behavior. */ if(NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id))) diff --git a/test/enc_dec_plist_cross_platform.c b/test/enc_dec_plist_cross_platform.c index 15c7391..f54f675 100644 --- a/test/enc_dec_plist_cross_platform.c +++ b/test/enc_dec_plist_cross_platform.c @@ -157,7 +157,7 @@ error: } static int -test_plists(const char *filename_prefix) +test_plists(const char *filename_prefix) { unsigned config_1, config_2; int fd_1, fd_2; diff --git a/test/enum.c b/test/enum.c index 26e64fd..109f7c3 100644 --- a/test/enum.c +++ b/test/enum.c @@ -128,7 +128,7 @@ test_conv(hid_t file) { hid_t cwg=-1, type=-1, space=-1, dset=-1; c_e1 val; - /* Some values are out of range for testing. The library should accept them */ + /* Some values are out of range for testing. The library should accept them */ static c_e1 data1[]={E1_RED, E1_GREEN, E1_BLUE, E1_GREEN, E1_WHITE, E1_WHITE, E1_BLACK, E1_GREEN, E1_BLUE, E1_RED, E1_RED, E1_BLUE, E1_GREEN, E1_BLACK, E1_WHITE, diff --git a/test/evict_on_close.c b/test/evict_on_close.c index b7d30a9..9f6607a 100644 --- a/test/evict_on_close.c +++ b/test/evict_on_close.c @@ -744,7 +744,7 @@ check_dset_scheme(hid_t fid, const char *dset_name) TEST_ERROR; /* Record the number of cache entries */ - during = file_ptr->shared->cache->index_len; + during = file_ptr->shared->cache->index_len; #ifdef EOC_MANUAL_INSPECTION HDprintf("\nCACHE AFTER DATA READ (WHILE OPEN):\n"); diff --git a/test/external.c b/test/external.c index 4d9fef0..d29fb6b 100644 --- a/test/external.c +++ b/test/external.c @@ -1418,7 +1418,7 @@ main(void) nerrors += test_path_absolute(current_fapl_id); nerrors += test_path_relative(current_fapl_id); nerrors += test_path_relative_cwd(current_fapl_id); - + /* Verify symbol table messages are cached */ nerrors += (h5_verify_cached_stabs(EXT_FNAME, current_fapl_id) < 0 ? 1 : 0); diff --git a/test/external_common.c b/test/external_common.c index c9b6584..a9e600b 100644 --- a/test/external_common.c +++ b/test/external_common.c @@ -65,7 +65,7 @@ reset_raw_data_files(hbool_t is_env) HDsprintf(filename, "extern_%lur.raw", (unsigned long)i + 1); if((fd = HDopen(filename, O_RDWR|O_CREAT|O_TRUNC, H5_POSIX_CREATE_MODE_RW)) < 0) goto error; - + /* Write garbage data to the file. This allows us to test the * the ability to set an offset in the raw data file. */ @@ -102,7 +102,7 @@ reset_raw_data_files(hbool_t is_env) HDsprintf(filename, "extern_%luw.raw", (unsigned long)i + 1); if((fd = HDopen(filename, O_RDWR|O_CREAT|O_TRUNC, H5_POSIX_CREATE_MODE_RW)) < 0) goto error; - + /* Write garbage data to the file. This allows us to test the * the ability to set an offset in the raw data file. */ diff --git a/test/farray.c b/test/farray.c index 355ecbb..b647b51 100644 --- a/test/farray.c +++ b/test/farray.c @@ -143,7 +143,7 @@ init_cparam(H5FA_create_t *cparam, farray_test_param_t *tparam) * Purpose: Create file and retrieve pointer to internal file object * * Return: SUCCEED/FAIL - * + * *------------------------------------------------------------------------- */ static herr_t @@ -262,7 +262,7 @@ set_fa_state(const H5FA_create_t *cparam, farray_state_t *state) *------------------------------------------------------------------------- */ static int -reopen_file(hid_t *fid, H5F_t **f, hid_t fapl_id, +reopen_file(hid_t *fid, H5F_t **f, hid_t fapl_id, H5FA_t **fa, haddr_t fa_addr, const farray_test_param_t *tparam) { /* Check for closing & re-opening the array */ diff --git a/test/fheap.c b/test/fheap.c index 899c41f..b1a0db0 100644 --- a/test/fheap.c +++ b/test/fheap.c @@ -82,7 +82,7 @@ /* The number of settings for testing: page buffering, file space strategy and persisting free-space */ #define NUM_PB_FS 6 -#define PAGE_BUFFER_PAGE_SIZE 4096 +#define PAGE_BUFFER_PAGE_SIZE 4096 const char *FILENAME[] = { "fheap", @@ -7665,7 +7665,7 @@ test_man_incr_insert_remove(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_ FAIL_STACK_ERROR /* - * Test incremental insert and removal + * Test incremental insert and removal */ TESTING("incremental object insertion and removal") @@ -7691,7 +7691,7 @@ test_man_incr_insert_remove(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_ if(H5HF_insert(fh, (sizeof(obj1)), &obj1, heap_id[i]) < 0) FAIL_STACK_ERROR } /* end for */ - + /* Close the fractal heap */ if(H5HF_close(fh) < 0) TEST_ERROR @@ -16350,7 +16350,7 @@ main(void) def_fapl = h5_fileaccess(); ExpressMode = GetTestExpress(); - /* + /* * Caution when turning on ExpressMode 0: * It will activate testing with different combinations of * page buffering and file space strategy and the @@ -16400,12 +16400,12 @@ main(void) for(v = 0; v < num_pb_fs; v++) { /* Skip test when: a) multi/split drivers and - b) persisting free-space or using paged aggregation strategy + b) persisting free-space or using paged aggregation strategy because the library will fail file creation (temporary) for the above conditions */ if(!contig_addr_vfd && v) break; - if((fcpl = H5Pcopy(def_fcpl)) < 0) + if((fcpl = H5Pcopy(def_fcpl)) < 0) TEST_ERROR switch(v) { @@ -16419,14 +16419,14 @@ main(void) TEST_ERROR fapl = def_fapl; /* This is a fix for the daily test failure from the checkin for libver bounds. */ - /* + /* * Many tests failed the file size check when comparing (a) and (b) as below: * --Create a file and close the file. Got the initial file size (a). * --Reopen the file, perform fractal heap operations, and close the file. * Got the file size (b). * The cause for the file size differences: - * When the file is initially created with persisting free-space and with - * (earliest, latest) libver bounds, the file will have version 2 superblock + * When the file is initially created with persisting free-space and with + * (earliest, latest) libver bounds, the file will have version 2 superblock * due to non-default free-space handling. As the low bound is earliest, * the library uses version 1 object header when creating the superblock * extension message. @@ -16440,7 +16440,7 @@ main(void) * The fix: * Set libver bounds in fapl to (v18, latest) so that the file created in the * test routines will have low bound set to v18. This will cause the - * library to use version 2 object header for the superblock extension + * library to use version 2 object header for the superblock extension * message. */ if(H5Pset_libver_bounds(fapl, H5F_LIBVER_V18, H5F_LIBVER_LATEST) < 0) diff --git a/test/file_image.c b/test/file_image.c index dfb3ae8..0d4873a 100644 --- a/test/file_image.c +++ b/test/file_image.c @@ -88,16 +88,16 @@ test_properties(void) hid_t fapl_1 = -1; hid_t fapl_2 = -1; char *buffer = 0; - int count = 10; + int count = 10; void *temp = 0; char *temp2 = 0; - int i; + int i; size_t size; size_t temp_size; int retval = 1; TESTING("File image property list functions"); - + /* Initialize file image buffer * * Note: this image will not contain a valid HDF5 file, as it complicates testing @@ -122,7 +122,7 @@ test_properties(void) /* Set file image stuff */ if(H5Pset_file_image(fapl_1, (void *)buffer, size) < 0) FAIL_STACK_ERROR - + /* Get the same */ if(H5Pget_file_image(fapl_1, (void **)&temp, &temp_size) < 0) FAIL_STACK_ERROR @@ -137,9 +137,9 @@ test_properties(void) /* Get values from the new fapl */ if(H5Pget_file_image(fapl_2, (void **)&temp2, &temp_size) < 0) FAIL_STACK_ERROR - + /* Check that sizes are the same, and that the buffers are identical but separate */ - VERIFY(temp_size == size,"Sizes of buffers don't match"); + VERIFY(temp_size == size,"Sizes of buffers don't match"); VERIFY(temp2 != NULL,"Recieved buffer not set"); VERIFY(temp2 != buffer, "Retrieved buffer is the same as original"); VERIFY(temp2 != temp, "Retrieved buffer is the same as previously retrieved buffer"); @@ -334,7 +334,7 @@ reset_udata(udata_t *u) static int test_callbacks(void) { - H5FD_file_image_callbacks_t real_callbacks = {&malloc_cb, &memcpy_cb, &realloc_cb, + H5FD_file_image_callbacks_t real_callbacks = {&malloc_cb, &memcpy_cb, &realloc_cb, &free_cb, &udata_copy_cb, &udata_free_cb, NULL}; H5FD_file_image_callbacks_t null_callbacks = {NULL, NULL, NULL, NULL, NULL, NULL, NULL}; H5FD_file_image_callbacks_t callbacks; @@ -388,9 +388,9 @@ test_callbacks(void) /* Get file image callbacks */ callbacks = null_callbacks; if(H5Pget_file_image_callbacks(fapl_1, &callbacks) < 0) FAIL_STACK_ERROR - + /* Verify values */ - VERIFY(callbacks.image_malloc == &malloc_cb, "malloc callback was not set or retrieved properly"); + VERIFY(callbacks.image_malloc == &malloc_cb, "malloc callback was not set or retrieved properly"); VERIFY(callbacks.image_memcpy == &memcpy_cb, "memcpy callback was not set or retrieved properly"); VERIFY(callbacks.image_realloc == &realloc_cb, "realloc callback was not set or retrieved properly"); VERIFY(callbacks.image_free == &free_cb, "free callback was not set or retrieved properly"); @@ -398,7 +398,7 @@ test_callbacks(void) VERIFY(callbacks.udata_free == &udata_free_cb, "udata free callback was not set or retrieved properly"); VERIFY(callbacks.udata == udata, "udata was not set or retrieved properly"); - + /* * Check callbacks in internal function without a previously set file image */ @@ -406,7 +406,7 @@ test_callbacks(void) /* Copy fapl */ reset_udata(udata); if((fapl_2 = H5Pcopy(fapl_1)) < 0) FAIL_STACK_ERROR - + /* Verify that the property's copy callback used the correct image callbacks */ VERIFY(udata->used_callbacks == (UDATA_COPY), "Copying a fapl with no image used incorrect callbacks"); @@ -419,14 +419,14 @@ test_callbacks(void) /* Copy again */ if((fapl_2 = H5Pcopy(fapl_1)) < 0) FAIL_STACK_ERROR - + /* Remove property from fapl */ reset_udata(udata); if(H5Premove(fapl_2, H5F_ACS_FILE_IMAGE_INFO_NAME) < 0) FAIL_STACK_ERROR /* Verify that the property's delete callback was called using the correct image callbacks */ VERIFY(udata->used_callbacks == (UDATA_FREE), "Removing a property from a fapl with no image used incorrect callbacks"); - + /* Close it again */ if(H5Pclose(fapl_2) < 0) FAIL_STACK_ERROR @@ -442,15 +442,15 @@ test_callbacks(void) if(H5Pset_file_image(fapl_1, (void *)file_image, size) < 0) FAIL_STACK_ERROR VERIFY(udata->used_callbacks == (MALLOC | MEMCPY), "Setting a file image (first time) used incorrect callbacks"); - + /* * Check callbacks in internal functions with a previously set file image */ - + /* Copy fapl */ reset_udata(udata); if((fapl_2 = H5Pcopy(fapl_1)) < 0) FAIL_STACK_ERROR - + /* Verify that the property's copy callback used the correct image callbacks */ VERIFY(udata->used_callbacks == (MALLOC | MEMCPY | UDATA_COPY), "Copying a fapl with an image used incorrect callbacks"); VERIFY(udata->malloc_src == H5FD_FILE_IMAGE_OP_PROPERTY_LIST_COPY, "malloc callback has wrong source"); @@ -466,7 +466,7 @@ test_callbacks(void) /* Copy again */ if((fapl_2 = H5Pcopy(fapl_1)) < 0) FAIL_STACK_ERROR - + /* Remove property from fapl */ reset_udata(udata); if(H5Premove(fapl_2, H5F_ACS_FILE_IMAGE_INFO_NAME) < 0) FAIL_STACK_ERROR @@ -474,11 +474,11 @@ test_callbacks(void) /* Verify that the property's delete callback was called using the correct image callbacks */ VERIFY(udata->used_callbacks == (FREE | UDATA_FREE), "Removing a property from a fapl with an image used incorrect callbacks"); VERIFY(udata->free_src == H5FD_FILE_IMAGE_OP_PROPERTY_LIST_CLOSE, "free callback has wrong source"); - + /* Close it again */ if(H5Pclose(fapl_2) < 0) FAIL_STACK_ERROR - /* Get file image */ + /* Get file image */ reset_udata(udata); if(H5Pget_file_image(fapl_1, (void **)&temp_file_image, &temp_size) < 0) FAIL_STACK_ERROR @@ -538,11 +538,11 @@ test_core(void) int fd; h5_stat_t sb; herr_t ret; - H5FD_file_image_callbacks_t callbacks = {&malloc_cb, &memcpy_cb, &realloc_cb, + H5FD_file_image_callbacks_t callbacks = {&malloc_cb, &memcpy_cb, &realloc_cb, &free_cb, &udata_copy_cb, &udata_free_cb, NULL}; TESTING("Initial file image and callbacks in Core VFD"); - + /* Create fapl */ fapl = h5_fileaccess(); VERIFY(fapl >= 0, "fapl creation failed"); @@ -579,7 +579,7 @@ test_core(void) reset_udata(udata); file = H5Fopen(copied_filename, H5F_ACC_RDONLY, fapl); VERIFY(file >= 0, "H5Fopen failed"); - VERIFY((udata->used_callbacks == MALLOC) || + VERIFY((udata->used_callbacks == MALLOC) || (udata->used_callbacks == (MALLOC | UDATA_COPY | UDATA_FREE)), "opening a core file used the wrong callbacks"); VERIFY(udata->malloc_src == H5FD_FILE_IMAGE_OP_FILE_OPEN, "Malloc callback came from wrong sourc in core open"); @@ -599,24 +599,24 @@ test_core(void) dims[1] = DIM1; space = H5Screate_simple(RANK, dims, dims); VERIFY(space >= 0, "H5Screate failed"); - + /* Create new dset, invoking H5FD_core_write */ reset_udata(udata); dset = H5Dcreate2(file, DSET_NAME, H5T_NATIVE_INT, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); VERIFY(dset >=0, "H5Dcreate failed"); - + /* Flush the write and check the realloc callback */ ret = H5Fflush(file, H5F_SCOPE_LOCAL); VERIFY(ret >= 0, "H5Fflush failed"); VERIFY(udata->used_callbacks == (REALLOC), "core write used the wrong callbacks"); VERIFY(udata->realloc_src == H5FD_FILE_IMAGE_OP_FILE_RESIZE, "Realloc callback came from wrong source in core write"); - + /* Close dset and space */ ret = H5Dclose(dset); VERIFY(ret >= 0, "H5Dclose failed"); ret = H5Sclose(space); VERIFY(ret >= 0, "H5Sclose failed"); - + /* Test file close */ reset_udata(udata); ret = H5Fclose(file); @@ -644,11 +644,11 @@ test_core(void) if(H5Fclose(file) < 0) FAIL_STACK_ERROR /* Release resources */ - h5_clean_files(FILENAME, fapl); + h5_clean_files(FILENAME, fapl); HDfree(udata); HDfree(file_image); HDremove(copied_filename); - + PASSED(); return 0; @@ -718,7 +718,7 @@ test_get_file_image(const char * test_banner, if(driver == H5FD_FAMILY) is_family_file = TRUE; - + /* setup the file name */ h5_fixname(FILENAME2[file_name_num], fapl, file_name, sizeof(file_name)); VERIFY(HDstrlen(file_name)>0, "h5_fixname failed"); @@ -741,7 +741,7 @@ test_get_file_image(const char * test_banner, VERIFY(space_id >= 0, "H5Screate() failed"); /* Create a dataset */ - dset_id = H5Dcreate2(file_id, "dset 0", H5T_NATIVE_INT, space_id, + dset_id = H5Dcreate2(file_id, "dset 0", H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); VERIFY(dset_id >=0, "H5Dcreate() failed"); @@ -750,7 +750,7 @@ test_get_file_image(const char * test_banner, data[i] = i; err = H5Dwrite(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, (void *)data); VERIFY(err >= 0, "H5Dwrite() failed."); - + /* Flush the file */ err = H5Fflush(file_id, H5F_SCOPE_GLOBAL); VERIFY(err >= 0, "H5Fflush failed"); @@ -768,7 +768,7 @@ test_get_file_image(const char * test_banner, VERIFY(bytes_read == image_size, "H5Fget_file_image(2) failed."); /* Close dset and space */ - err = H5Dclose(dset_id); + err = H5Dclose(dset_id); VERIFY(err >= 0, "H5Dclose failed"); err = H5Sclose(space_id); VERIFY(err >= 0, "H5Sclose failed"); @@ -860,8 +860,8 @@ test_get_file_image(const char * test_banner, file_size -= USERBLOCK_SIZE; } - /* with latest mods to truncate call in core file drive, - * file size should match image size + /* with latest mods to truncate call in core file drive, + * file size should match image size */ VERIFY(file_size == image_size, "file size != image size."); @@ -931,13 +931,13 @@ test_get_file_image(const char * test_banner, h5_clean_files(FILENAME2, fapl); /* discard the image buffer if it exists */ - if(image_ptr != NULL) + if(image_ptr != NULL) HDfree(image_ptr); /* discard the image buffer if it exists */ - if(file_image_ptr != NULL) + if(file_image_ptr != NULL) HDfree(file_image_ptr); - + PASSED(); return 0; @@ -986,10 +986,10 @@ test_get_file_image_error_rejection(void) TESTING("H5Fget_file_image() error rejection"); /************************ Sub-Test #1 ********************************/ - /* set up a test file, and try to get its image with a buffer that is + /* set up a test file, and try to get its image with a buffer that is * too small. Call to H5Fget_file_image() should fail. * - * Since we have already done the necessary setup, verify that + * Since we have already done the necessary setup, verify that * H5Fget_file_image() will fail with: * * bad file id, or @@ -1020,17 +1020,17 @@ test_get_file_image_error_rejection(void) VERIFY(space_id >= 0, "H5Screate() failed"); /* Create a dataset */ - dset_id = H5Dcreate2(file_id, "dset 0", H5T_NATIVE_INT, space_id, + dset_id = H5Dcreate2(file_id, "dset 0", H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); VERIFY(dset_id >=0, "H5Dcreate() failed"); /* write some data to the data set */ for (i = 0; i < 100; i++) data[i] = i; - err = H5Dwrite(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, + err = H5Dwrite(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, (void *)data); VERIFY(err >= 0, "H5Dwrite() failed."); - + /* Flush the file */ err = H5Fflush(file_id, H5F_SCOPE_GLOBAL); VERIFY(err >= 0, "H5Fflush failed"); @@ -1066,7 +1066,7 @@ test_get_file_image_error_rejection(void) VERIFY(bytes_read < 0, "H5Fget_file_image(4 -- test 1) succeeded."); /* Close dset and space */ - err = H5Dclose(dset_id); + err = H5Dclose(dset_id); VERIFY(err >= 0, "H5Dclose failed"); err = H5Sclose(space_id); VERIFY(err >= 0, "H5Sclose failed"); @@ -1079,11 +1079,11 @@ test_get_file_image_error_rejection(void) h5_clean_files(FILENAME2, fapl_id); /* discard the image buffer if it exists */ - if(image_ptr != NULL) + if(image_ptr != NULL) HDfree(image_ptr); /************************** Test #2 **********************************/ - /* set up a multi file driver test file, and try to get its image + /* set up a multi file driver test file, and try to get its image * with H5Fget_file_image(). Attempt should fail. */ @@ -1130,7 +1130,7 @@ test_get_file_image_error_rejection(void) VERIFY(fapl_id >= 0, "H5Pcreate(2) failed"); /* setup the fapl for the multi file driver */ - err = H5Pset_fapl_multi(fapl_id, memb_map, memb_fapl, memb_name, + err = H5Pset_fapl_multi(fapl_id, memb_map, memb_fapl, memb_name, memb_addr, FALSE); VERIFY(err >= 0, "H5Pset_fapl_multi failed"); @@ -1149,17 +1149,17 @@ test_get_file_image_error_rejection(void) VERIFY(space_id >= 0, "H5Screate() failed"); /* Create a dataset */ - dset_id = H5Dcreate2(file_id, "dset 0", H5T_NATIVE_INT, space_id, + dset_id = H5Dcreate2(file_id, "dset 0", H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); VERIFY(dset_id >=0, "H5Dcreate() failed"); /* write some data to the data set */ for (i = 0; i < 100; i++) data[i] = i; - err = H5Dwrite(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, + err = H5Dwrite(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, (void *)data); VERIFY(err >= 0, "H5Dwrite() failed."); - + /* Flush the file */ err = H5Fflush(file_id, H5F_SCOPE_GLOBAL); VERIFY(err >= 0, "H5Fflush failed"); @@ -1171,7 +1171,7 @@ test_get_file_image_error_rejection(void) VERIFY(image_size == -1, "H5Fget_file_image(5) succeeded."); /* Close dset and space */ - err = H5Dclose(dset_id); + err = H5Dclose(dset_id); VERIFY(err >= 0, "H5Dclose failed"); err = H5Sclose(space_id); VERIFY(err >= 0, "H5Sclose failed"); @@ -1184,11 +1184,11 @@ test_get_file_image_error_rejection(void) h5_clean_files(FILENAME2, fapl_id); /************************** Test #3 **********************************/ - /* set up a split file driver test file, and try to get its image + /* set up a split file driver test file, and try to get its image * with H5Fget_file_image(). Attempt should fail. */ - /* create fapl */ + /* create fapl */ fapl_id = H5Pcreate(H5P_FILE_ACCESS); VERIFY(fapl_id >= 0, "H5Pcreate(3) failed"); @@ -1211,17 +1211,17 @@ test_get_file_image_error_rejection(void) VERIFY(space_id >= 0, "H5Screate() failed"); /* Create a dataset */ - dset_id = H5Dcreate2(file_id, "dset 0", H5T_NATIVE_INT, space_id, + dset_id = H5Dcreate2(file_id, "dset 0", H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); VERIFY(dset_id >=0, "H5Dcreate() failed"); /* write some data to the data set */ for (i = 0; i < 100; i++) data[i] = i; - err = H5Dwrite(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, + err = H5Dwrite(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, (void *)data); VERIFY(err >= 0, "H5Dwrite() failed."); - + /* Flush the file */ err = H5Fflush(file_id, H5F_SCOPE_GLOBAL); VERIFY(err >= 0, "H5Fflush failed"); @@ -1233,7 +1233,7 @@ test_get_file_image_error_rejection(void) VERIFY(image_size == -1, "H5Fget_file_image(6) succeeded."); /* Close dset and space */ - err = H5Dclose(dset_id); + err = H5Dclose(dset_id); VERIFY(err >= 0, "H5Dclose failed"); err = H5Sclose(space_id); VERIFY(err >= 0, "H5Sclose failed"); @@ -1246,11 +1246,11 @@ test_get_file_image_error_rejection(void) h5_clean_files(FILENAME2, fapl_id); /************************** Test #4 **********************************/ - /* set up a family file driver test file, and try to get its image + /* set up a family file driver test file, and try to get its image * with H5Fget_file_image(). Attempt should fail. */ - /* create fapl */ + /* create fapl */ fapl_id = H5Pcreate(H5P_FILE_ACCESS); VERIFY(fapl_id >= 0, "H5Pcreate(3) failed"); @@ -1271,17 +1271,17 @@ test_get_file_image_error_rejection(void) VERIFY(space_id >= 0, "H5Screate() failed"); /* Create a dataset */ - dset_id = H5Dcreate2(file_id, "dset 0", H5T_NATIVE_INT, space_id, + dset_id = H5Dcreate2(file_id, "dset 0", H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); VERIFY(dset_id >=0, "H5Dcreate() failed"); /* write some data to the data set */ for (i = 0; i < 100; i++) data[i] = i; - err = H5Dwrite(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, + err = H5Dwrite(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, (void *)data); VERIFY(err >= 0, "H5Dwrite() failed."); - + /* Flush the file */ err = H5Fflush(file_id, H5F_SCOPE_GLOBAL); VERIFY(err >= 0, "H5Fflush failed"); @@ -1293,7 +1293,7 @@ test_get_file_image_error_rejection(void) VERIFY(image_size == -1, "H5Fget_file_image(7) succeeded."); /* Close dset and space */ - err = H5Dclose(dset_id); + err = H5Dclose(dset_id); VERIFY(err >= 0, "H5Dclose failed"); err = H5Sclose(space_id); VERIFY(err >= 0, "H5Sclose failed"); @@ -1304,7 +1304,7 @@ test_get_file_image_error_rejection(void) /* tidy up */ h5_clean_files(FILENAME2, fapl_id); - + PASSED(); return 0; @@ -1362,14 +1362,14 @@ main(void) } /* end for */ #if 0 - /* at present, H5Fget_file_image() rejects files opened with the + /* at present, H5Fget_file_image() rejects files opened with the * family file driver, due to the addition of a driver info message * in the super block. This message prevents the image being opened - * with any driver other than the family file driver, which sort of + * with any driver other than the family file driver, which sort of * defeats the purpose of the get file image operation. * * While this issues is quite fixable, we don't have time or resources - * for this right now. Once we do, the following code should be + * for this right now. Once we do, the following code should be * suitable for testing the fix. */ /* test H5Fget_file_image() with family file driver */ @@ -1386,10 +1386,10 @@ main(void) /* Restore the default error handler (set in h5_reset()) */ h5_restore_err(); - if(errors) { - HDprintf("***** %d File Image TEST%s FAILED! *****\n", - errors, errors > 1 ? "S" : ""); - return 1; + if(errors) { + HDprintf("***** %d File Image TEST%s FAILED! *****\n", + errors, errors > 1 ? "S" : ""); + return 1; } HDprintf("All File Image tests passed.\n"); diff --git a/test/filter_fail.c b/test/filter_fail.c index 4be2547..e5187be 100644 --- a/test/filter_fail.c +++ b/test/filter_fail.c @@ -50,8 +50,8 @@ const H5Z_class2_t H5Z_FAIL_TEST[1] = {{ /*------------------------------------------------------------------------- * Function: filter_fail * - * Purpose: For testing library's behavior when a mandatory filter - * fails to write a chunk. + * Purpose: For testing library's behavior when a mandatory filter + * fails to write a chunk. * * Return: Success: Data chunk size * Failure: 0 @@ -74,7 +74,7 @@ filter_fail(unsigned int flags, size_t H5_ATTR_UNUSED cd_nelmts, ret_value = nbytes; } /* end if */ else { /* Write data */ - /* If it's the last chunk, pretend to fail. Otherwise, do nothing. */ + /* If it's the last chunk, pretend to fail. Otherwise, do nothing. */ if(*dst == 8 || *dst == 9) { ret_value = 0; } else { @@ -90,14 +90,14 @@ filter_fail(unsigned int flags, size_t H5_ATTR_UNUSED cd_nelmts, /*------------------------------------------------------------------------- * Function: test_filter_write_failure * - * Purpose: Tests the library's behavior when a mandate filter returns + * Purpose: Tests the library's behavior when a mandate filter returns * failure. There're only 5 chunks with each of them having - * 2 integers. The filter will fail in the last chunk. The - * dataset should release all resources even though the last + * 2 integers. The filter will fail in the last chunk. The + * dataset should release all resources even though the last * chunk can't be flushed to file. The file should close * successfully. * - * Return: + * Return: * Success: 0 * Failure: -1 * @@ -107,7 +107,7 @@ filter_fail(unsigned int flags, size_t H5_ATTR_UNUSED cd_nelmts, * Modifications: * Raymond Lu * 5 Oct 2010 - * Test when the chunk cache is enable and disabled to make + * Test when the chunk cache is enable and disabled to make * sure the library behaves properly. *------------------------------------------------------------------------- */ @@ -151,7 +151,7 @@ test_filter_write(char *file_name, hid_t my_fapl, hbool_t cache_enabled) TEST_ERROR /* create a dataset */ - if((dataset = H5Dcreate2(file, DSET_NAME, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) TEST_ERROR + if((dataset = H5Dcreate2(file, DSET_NAME, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) TEST_ERROR /* Initialize the write buffer */ for(i = 0; i < DIM; i++) @@ -160,7 +160,7 @@ test_filter_write(char *file_name, hid_t my_fapl, hbool_t cache_enabled) /* Write data. If the chunk cache is enabled, H5Dwrite should succeed. If it is * diabled, H5Dwrite should fail. */ if(cache_enabled) { - if(H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, sid, H5P_DEFAULT, points) < 0) + if(H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, sid, H5P_DEFAULT, points) < 0) TEST_ERROR } else { /* Data writing should fail */ @@ -194,7 +194,7 @@ test_filter_write(char *file_name, hid_t my_fapl, hbool_t cache_enabled) TEST_ERROR } - /* Even though H5Dclose or H5Dwrite fails, it should release all resources. + /* Even though H5Dclose or H5Dwrite fails, it should release all resources. * So the file should close successfully. */ if(H5Fclose (file) < 0) TEST_ERROR @@ -215,11 +215,11 @@ error: /*------------------------------------------------------------------------- * Function: test_filter_read * - * Purpose: Tests the library's behavior when a mandate filter returns - * failure. The first 4 chunks should be in the file. The + * Purpose: Tests the library's behavior when a mandate filter returns + * failure. The first 4 chunks should be in the file. The * last chunk should not. * - * Return: + * Return: * Success: 0 * Failure: -1 * @@ -305,7 +305,7 @@ test_filter_read(char *file_name, hid_t my_fapl) if(H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, sid, H5P_DEFAULT, rbuf) < 0) TEST_ERROR - /* Check that the values read are the same as the values written. + /* Check that the values read are the same as the values written. * The last chunk should not be in the file. */ for(i = 0; i < DIM; i+=2) { if(i < DIM-2 && rbuf[i] != i) { @@ -344,11 +344,11 @@ error: /*------------------------------------------------------------------------- * Function: main * - * Purpose: Tests the library's behavior when a mandate filter returns + * Purpose: Tests the library's behavior when a mandate filter returns * failure. * * Return: EXIT_SUCCESS/EXIT_FAILURE - * + * * Programmer: Raymond Lu * 25 August 2010 * diff --git a/test/filter_plugin1_dsets.c b/test/filter_plugin1_dsets.c index b74e086..a9a53ae 100644 --- a/test/filter_plugin1_dsets.c +++ b/test/filter_plugin1_dsets.c @@ -69,7 +69,7 @@ add_sub_value(unsigned int flags, size_t cd_nelmts, const unsigned int *cd_value /* Check that permanent parameters are set correctly */ if (cd_values[0] > 9) return 0; - + value = (int)cd_values[0]; if (flags & H5Z_FLAG_REVERSE) { diff --git a/test/flush1.c b/test/flush1.c index ac5f9ef..04f24f7 100644 --- a/test/flush1.c +++ b/test/flush1.c @@ -99,7 +99,7 @@ create_file(const char *filename, hid_t fapl_id, hbool_t swmr) if(H5Gclose(top_gid) < 0) STACK_ERROR - + return fid; error: @@ -185,7 +185,7 @@ error: * a variety of situations. * * Part 1 of a two-part H5Fflush() test. - * + * * Return: EXIT_SUCCESS/EXIT_FAILURE * * Programmer: Robb Matzke diff --git a/test/flush2.c b/test/flush2.c index a6acb41..5fc716b 100644 --- a/test/flush2.c +++ b/test/flush2.c @@ -354,7 +354,7 @@ main(void) /* TEST 6 */ /* Check the case where the file was flushed, but more data was - * added afterward and then flushed (w/SWMR) + * added afterward and then flushed (w/SWMR) */ TESTING("H5Fflush (part2 with flush and later addition and another flush + SWMR)"); if(vfd_supports_swmr) { diff --git a/test/flushrefresh.c b/test/flushrefresh.c index 20a4ba4..2db1d6b 100644 --- a/test/flushrefresh.c +++ b/test/flushrefresh.c @@ -15,10 +15,10 @@ * Programmer: Mike McGreevy * June 30, 2010 * - * Purpose: This test file contains routines used to test flushing and - * refreshing individual objects' metadata from the cache. - * - * Note: This file should NOT be run manually. Instead, invoke it + * Purpose: This test file contains routines used to test flushing and + * refreshing individual objects' metadata from the cache. + * + * Note: This file should NOT be run manually. Instead, invoke it * via its associated test script, testflushrefresh.sh * */ @@ -119,12 +119,12 @@ herr_t end_verification(void); * Function: main * * Purpose: This function coordinates the test of flush/refresh - * functionality verification. It accepts either one, two or + * functionality verification. It accepts either one, two or * no command line parameters. The main test routine runs * with no command line parameters specified, while verification * routines run with one or two command line parameters. - * - * Note: This program should not be run manually, as the + * + * Note: This program should not be run manually, as the * test is controlled by the testflushrefresh.sh script. Running * the flushrefresh program manually will result in failure, as * it will time out waiting for a signal from the test script @@ -137,7 +137,7 @@ herr_t end_verification(void); * *------------------------------------------------------------------------- */ -int main(int argc, const char *argv[]) +int main(int argc, const char *argv[]) { /* Variables */ const char *envval = NULL; @@ -148,8 +148,8 @@ int main(int argc, const char *argv[]) /* Parse command line options */ if(argc == 1) { - /* No arguments supplied. Run main test routines if - * using sec2 or stdio driver, otherwise don't run + /* No arguments supplied. Run main test routines if + * using sec2 or stdio driver, otherwise don't run * anything. */ /* Determine driver being used */ @@ -161,7 +161,7 @@ int main(int argc, const char *argv[]) } /* end if */ else { HDfprintf(stdout, "Skipping all flush/refresh tests (only run with SWMR-enabled file drivers).\n"); - + /* Test script is expecting some signals, so send them out to end it. */ if(end_verification() < 0) TEST_ERROR; if(end_verification() < 0) TEST_ERROR; @@ -202,29 +202,29 @@ error: * *------------------------------------------------------------------------- */ -herr_t test_flush(void) +herr_t test_flush(void) { /************************************************************************** * * Test Description: * - * This test will build an HDF5 file with several objects in a varying + * This test will build an HDF5 file with several objects in a varying * hierarchical layout. It will then attempt to flush the objects * in the file one by one, individually, using the four H5*flush - * routines (D,G,T, and O). After each call to either create or flush an + * routines (D,G,T, and O). After each call to either create or flush an * object, a series of verifications will occur on each object in the file. * * Each verification consists of spawning off a new process and determining - * if the object can be opened and its information retreived in said - * alternate process. It reports the results, which are compared to an + * if the object can be opened and its information retreived in said + * alternate process. It reports the results, which are compared to an * expected value (either that the object can be found on disk, or that it * cannot). * * Note that to spawn a verification, this program sends a signal (by creating - * a file on disk) to the test script controlling it, indicating how to + * a file on disk) to the test script controlling it, indicating how to * run the verification. - * - * Implementation is funky, but basically, an example: + * + * Implementation is funky, but basically, an example: * * Step 1. Dataset is created. * Step 2. Verify that dataset can't be opened by separate process, as @@ -233,14 +233,14 @@ herr_t test_flush(void) * Step 4. Verify that group can't be opened by separate process. * Step 5. H5Gflush is called on the group. * Step 6. Verify that group CAN be opened, but dataset still has - * yet to hit disk, and CANNOT be opened. Success! Only the group + * yet to hit disk, and CANNOT be opened. Success! Only the group * was flushed. * **************************************************************************/ /************************************************************************** * Generated Test File will look like this: - * + * * GROUP "/" * DATASET "Dataset1" * GROUP "Group1" { @@ -265,14 +265,14 @@ herr_t test_flush(void) /* Cleanup any old error or signal files */ CLEANUP_FILES; - + /* ================ */ /* CREATE TEST FILE */ /* ================ */ /* Create file, open root group - have to use latest file format for SWMR */ if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) TEST_ERROR; - if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) TEST_ERROR; + if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) TEST_ERROR; if((fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC|H5F_ACC_SWMR_WRITE, H5P_DEFAULT, fapl)) < 0) TEST_ERROR; if((rid = H5Gopen2(fid, "/", H5P_DEFAULT)) < 0) TEST_ERROR; @@ -341,7 +341,7 @@ herr_t test_flush(void) if(run_flush_verification_process(T2, NOT_FLUSHED) != 0) TEST_ERROR; if(run_flush_verification_process(T3, NOT_FLUSHED) != 0) TEST_ERROR; - /* Flush Group1 and Verify it is recently flushed, and nothing + /* Flush Group1 and Verify it is recently flushed, and nothing * else has changed. */ if((status = H5Gflush(gid)) < 0) TEST_ERROR; if(run_flush_verification_process(RG, FLUSHED) != 0) TEST_ERROR; @@ -355,7 +355,7 @@ herr_t test_flush(void) if(run_flush_verification_process(T2, NOT_FLUSHED) != 0) TEST_ERROR; if(run_flush_verification_process(T3, NOT_FLUSHED) != 0) TEST_ERROR; - /* Flush Group2 and Verify it is recently flushed, and nothing + /* Flush Group2 and Verify it is recently flushed, and nothing * else has changed. */ if((status = H5Gflush(gid2)) < 0) TEST_ERROR; if(run_flush_verification_process(RG, FLUSHED) != 0) TEST_ERROR; @@ -440,7 +440,7 @@ herr_t test_flush(void) if(run_flush_verification_process(T3, NOT_FLUSHED) != 0) TEST_ERROR; PASSED(); - + /* ============= */ /* FLUSH OBJECTS */ /* ============= */ @@ -490,7 +490,7 @@ herr_t test_flush(void) PASSED(); /* ================== */ - /* Cleanup and Return */ + /* Cleanup and Return */ /* ================== */ if(H5Pclose(fapl) < 0) TEST_ERROR; if(H5Gclose(gid) < 0) TEST_ERROR; @@ -515,7 +515,7 @@ error: /*------------------------------------------------------------------------- * Function: test_refresh * - * Purpose: This function tests refresh (evict/reload) of individual + * Purpose: This function tests refresh (evict/reload) of individual * objects' metadata from the metadata cache. * * Return: 0 on Success, 1 on Failure @@ -525,27 +525,27 @@ error: * *------------------------------------------------------------------------- */ -herr_t test_refresh(void) +herr_t test_refresh(void) { /************************************************************************** * * Test Description: * - * This test will build an HDF5 file with several objects in a varying + * This test will build an HDF5 file with several objects in a varying * hierarchical layout. It will then flush the entire file to disk. Then, * an attribute will be added to each object in the file. - * + * * One by one, this process will flush each object to disk, individually. * It will also be coordinating with another process, which will open * the object before it is flushed by this process, and then refresh the * object after it's been flushed, comparing the before and after object * information to ensure that they are as expected. (i.e., most notably, - * that an attribute has been added, and is only visible after a + * that an attribute has been added, and is only visible after a * successful call to a H5*refresh function). - * - * As with the flush case, the implemention is a bit tricky as it's + * + * As with the flush case, the implemention is a bit tricky as it's * dealing with signals going back and forth between the two processes - * to ensure the timing is correct, but basically, an example: + * to ensure the timing is correct, but basically, an example: * * Step 1. Dataset is created. * Step 2. Dataset is flushed. @@ -555,7 +555,7 @@ herr_t test_refresh(void) * Step 5. This process flushes the dataset again (with Attribute attached). * Step 6. The other process calls H5Drefresh, which should evict/reload * the object's metadata, and thus pick up the attribute that's - * attached to it. Most other before/after object information is + * attached to it. Most other before/after object information is * compared for sanity as well. * Step 7. Rinse and Repeat for each object in the file. * @@ -563,7 +563,7 @@ herr_t test_refresh(void) /************************************************************************** * Generated Test File will look like this: - * + * * GROUP "/" * DATASET "Dataset1" * GROUP "Group1" { @@ -755,7 +755,7 @@ herr_t test_refresh(void) PASSED(); /* ================== */ - /* Cleanup and Return */ + /* Cleanup and Return */ /* ================== */ /* Close Stuff */ @@ -791,8 +791,8 @@ error: * * Purpose: This function is used to communicate with the test script * in order to spawn off a process to verify that a flush - * of an individual object was successful. - * + * of an individual object was successful. + * * Return: 0 on Success, 1 on Failure * * Programmer: Mike McGreevy @@ -800,7 +800,7 @@ error: * *------------------------------------------------------------------------- */ -herr_t run_flush_verification_process(const char * obj_pathname, const char * expected) +herr_t run_flush_verification_process(const char * obj_pathname, const char * expected) { HDremove(SIGNAL_FROM_SCRIPT); @@ -825,10 +825,10 @@ error: * Function: flush_verification * * Purpose: This function tries to open target object in the test file. - * It compares the success of the open function to the expected + * It compares the success of the open function to the expected * value, and succeeds if they are equal and fails if they differ. * - * Note that full path to the object must be provided as the + * Note that full path to the object must be provided as the * obj_pathname argument. * * Return: 0 on Success, 1 on Failure @@ -838,7 +838,7 @@ error: * *------------------------------------------------------------------------- */ -herr_t flush_verification(const char * obj_pathname, const char * expected) +herr_t flush_verification(const char * obj_pathname, const char * expected) { /* Variables */ hid_t oid = -1, fid = -1; @@ -887,7 +887,7 @@ error: * Purpose: This function is used to communicate with the test script * in order to spawn off a process which will test the * H5*refresh routine. - * + * * Return: 0 on Success, 1 on Failure * * Programmer: Mike McGreevy @@ -895,14 +895,14 @@ error: * *------------------------------------------------------------------------- */ -herr_t start_refresh_verification_process(const char * obj_pathname) +herr_t start_refresh_verification_process(const char * obj_pathname) { HDremove(SIGNAL_BETWEEN_PROCESSES_1); - /* Send Signal to SCRIPT indicating that it should kick off a refresh + /* Send Signal to SCRIPT indicating that it should kick off a refresh verification process */ h5_send_message(SIGNAL_TO_SCRIPT, obj_pathname, NULL); - + /* Wait for Signal from VERIFICATION PROCESS indicating that it's opened the target object and ready for MAIN PROCESS to modify it */ if(h5_wait_message(SIGNAL_BETWEEN_PROCESSES_1) < 0) TEST_ERROR; @@ -922,10 +922,10 @@ error: * Function: end_refresh_verification_process * * Purpose: This function is used to communicate with the verification - * process spawned by the start_refresh_verification_process + * process spawned by the start_refresh_verification_process * function. It gives it the go-ahead to call H5*refresh * on an object and conlcude the refresh verification. - * + * * Return: 0 on Success, 1 on Failure * * Programmer: Mike McGreevy @@ -933,8 +933,8 @@ error: * *------------------------------------------------------------------------- */ -herr_t end_refresh_verification_process(void) -{ +herr_t end_refresh_verification_process(void) +{ HDremove(SIGNAL_FROM_SCRIPT); /* Send Signal to REFRESH VERIFICATION PROCESS indicating that the object @@ -974,7 +974,7 @@ error: * *------------------------------------------------------------------------- */ -herr_t refresh_verification(const char * obj_pathname) +herr_t refresh_verification(const char * obj_pathname) { /* Variables */ hid_t oid,fid,status = 0; @@ -985,7 +985,7 @@ herr_t refresh_verification(const char * obj_pathname) int tries = 800, sleep_tries = 400; int token_cmp; hbool_t ok = FALSE; - + HDremove(SIGNAL_BETWEEN_PROCESSES_2); /* Open Object */ @@ -1002,16 +1002,16 @@ herr_t refresh_verification(const char * obj_pathname) if(flushed_oinfo.num_attrs != 0) PROCESS_ERROR; - /* Send Signal to MAIN PROCESS indicating that it can go ahead and modify the + /* Send Signal to MAIN PROCESS indicating that it can go ahead and modify the object. */ h5_send_message(SIGNAL_BETWEEN_PROCESSES_1, obj_pathname, NULL); - /* Wait for Signal from MAIN PROCESS indicating that it's modified the + /* Wait for Signal from MAIN PROCESS indicating that it's modified the object and we can run verification now. */ if(h5_wait_message(SIGNAL_BETWEEN_PROCESSES_2) < 0) PROCESS_ERROR; - /* Get object info again. This will NOT reflect what's on disk, only what's - in the cache. Thus, all values will be unchanged from above, despite + /* Get object info again. This will NOT reflect what's on disk, only what's + in the cache. Thus, all values will be unchanged from above, despite newer information being on disk. */ if((status = H5Oget_info3(oid, &refreshed_oinfo, H5O_INFO_BASIC|H5O_INFO_NUM_ATTRS)) < 0) PROCESS_ERROR; if((status = H5Oget_native_info(oid, &refreshed_ninfo, H5O_NATIVE_INFO_HDR)) < 0) PROCESS_ERROR; @@ -1105,7 +1105,7 @@ error: * processes to see if they've succeeded. It checks for the * existance of flushrefresh_ERROR file. If present, that indicates * an external verification process has failed, and this function - * thus fails as well. If not present, then nothing else has + * thus fails as well. If not present, then nothing else has * failed, and this function succeeds. * * Return: 0 on Success, 1 on Failure @@ -1115,7 +1115,7 @@ error: * *------------------------------------------------------------------------- */ -herr_t check_for_errors(void) +herr_t check_for_errors(void) { FILE * file; @@ -1131,24 +1131,24 @@ herr_t check_for_errors(void) /*------------------------------------------------------------------------- * Function: end_verification - * - * Purpose: Tells test script that verification routines are completed and - * that the test can wrap up. + * + * Purpose: Tells test script that verification routines are completed and + * that the test can wrap up. * * Return: void * * Programmer: Mike McGreevy * July 16, 2010 - * + * *------------------------------------------------------------------------- */ -herr_t end_verification(void) +herr_t end_verification(void) { HDremove(SIGNAL_FROM_SCRIPT); /* Send Signal to SCRIPT to indicate that we're done with verification. */ h5_send_message(SIGNAL_TO_SCRIPT, "VERIFICATION_DONE", "VERIFICATION_DONE"); - + /* Wait for Signal from SCRIPT indicating that we can continue. */ if(h5_wait_message(SIGNAL_FROM_SCRIPT) < 0) TEST_ERROR; diff --git a/test/gen_bad_compound.c b/test/gen_bad_compound.c index c52eb95..292659c 100644 --- a/test/gen_bad_compound.c +++ b/test/gen_bad_compound.c @@ -61,7 +61,7 @@ int main() aid = H5Acreate(gid, "attr", cmpd_dt, sid, H5P_DEFAULT); assert(aid > 0); - /* Commit the datatype */ + /* Commit the datatype */ ret = H5Tcommit(file, "cmpnd", cmpd_dt); assert(ret >= 0); diff --git a/test/gen_bad_offset.c b/test/gen_bad_offset.c index 82e94cd..b485e36 100644 --- a/test/gen_bad_offset.c +++ b/test/gen_bad_offset.c @@ -28,8 +28,8 @@ /*------------------------------------------------------------------------- * Function: main * - * Generate an HDF5 file with groups, datasets and symbolic links. - * After the file is generated, write bad offset values to + * Generate an HDF5 file with groups, datasets and symbolic links. + * After the file is generated, write bad offset values to * the heap at 3 locations in the file: * (A) Open the file: * fd = HDopen(TESTFILE, O_RDWR, 0663); @@ -37,7 +37,7 @@ * (1) HDlseek(fd, (HDoff_t)880, SEEK_SET); * "/group1/group2": replace heap offset "8" by bad offset * (2) HDlseek(fd, (HDoff_t)1512, SEEK_SET); - * "/dsetA": replace name offset into private heap "72" by bad offset + * "/dsetA": replace name offset into private heap "72" by bad offset * (3) HDlseek(fd, (HDoff_t)1616, SEEK_SET); * /soft_one: replace link value offset in the scratch pad "32" by bad offset * (C) Write the bad offset value to the file for (1), (2) and (3): @@ -98,7 +98,7 @@ main(void) if(H5Fclose(fid) < 0) FAIL_STACK_ERROR - /* + /* * Write bad offset values at 3 locations in the file */ diff --git a/test/gen_bogus.c b/test/gen_bogus.c index 237b024..1ab18a4 100644 --- a/test/gen_bogus.c +++ b/test/gen_bogus.c @@ -37,12 +37,12 @@ #ifdef H5O_ENABLE_BOGUS /* - * Create datasets in the location (in "/" or "/group") with + * Create datasets in the location (in "/" or "/group") with * message id: (a) H5O_BOGUS_VALID_ID or (b)H5O_BOGUS_INVALID_ID * and various unknown message flags */ static int -generate_datasets(hid_t loc_id, unsigned bogus_id) +generate_datasets(hid_t loc_id, unsigned bogus_id) { hid_t sid = -1; /* Dataspace ID */ hid_t dcpl = -1; /* Dataset creation property list ID */ diff --git a/test/gen_bounds.c b/test/gen_bounds.c index fe05a1e..2f696e6 100644 --- a/test/gen_bounds.c +++ b/test/gen_bounds.c @@ -27,8 +27,8 @@ * that they can or cannot read particular file format. */ -/* - * Add two routines gen_ref_files() and gen_sel_files() to generate the +/* + * Add two routines gen_ref_files() and gen_sel_files() to generate the * following test files: * * (1) gen_ref_files(): @@ -42,7 +42,7 @@ * bounds_sel_v112_v112.h5 * bounds_sel_v110_v110.h5 * - * These test files will be copied to 1.12, 1.10 and 1.8 libraries for + * These test files will be copied to 1.12, 1.10 and 1.8 libraries for * compatibility testing. */ #include "h5test.h" @@ -649,25 +649,25 @@ error: /*********************************************************************** * gen_sel_files() is used to create the following test files: - * bounds_sel_earliest_latest.h5 - * bounds_sel_latest_latest.h5 - * bounds_sel_v112_v112.h5 - * bounds_sel_v110_v110.h5 + * bounds_sel_earliest_latest.h5 + * bounds_sel_latest_latest.h5 + * bounds_sel_v112_v112.h5 + * bounds_sel_v110_v110.h5 * * File contents for: * --bounds_sel_earliest_latest.h5 * --bounds_sel_latest_latest.h5 * --bounds_sel_v112_v112.h5 - * --each file contains 3 datasets with old region reference type - * (1) Sel_ex32_reg_dset: + * --each file contains 3 datasets with old region reference type + * (1) Sel_ex32_reg_dset: * --regular hyperslab selection exceeding 32 bits integer limit * (2) Sel_ex32_irr_dset: * --irregular hyperslab selection exceeding 32 bits integer limit - * (3) Sel_ex32_pt_dset: + * (3) Sel_ex32_pt_dset: * --point selection exceeding 32 bits integer limit * * File contents for: - * --bounds_ref_v110_v110.h5 + * --bounds_ref_v110_v110.h5 * (1) Sel_ex32_reg_dset: a dataset with old region reference type * --regular hyperslab selection exceeding 32 bits integer limit * (2) Sel_ex32_irr_dset: does not exist, cannot be created @@ -696,7 +696,7 @@ static herr_t gen_sel_files(const char *filename, H5F_libver_t low_bound, H5F_l hdset_reg_ref_t ref_wbuf[1]; /* Buffer for dataset region reference */ /* - * Create test file, attribute, group and dataset + * Create test file, attribute, group and dataset */ /* Create the test file */ @@ -720,7 +720,7 @@ static herr_t gen_sel_files(const char *filename, H5F_libver_t low_bound, H5F_l TEST_ERROR; /* Create file access property list */ - if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) + if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) TEST_ERROR; /* Set to use the low/high bounds in fapl */ @@ -770,7 +770,7 @@ static herr_t gen_sel_files(const char *filename, H5F_libver_t low_bound, H5F_l if(H5Dclose(ref_did) < 0) TEST_ERROR; - } + } /* Generate irregular hyperslab exceeding 32 */ ref_start = 8; @@ -825,7 +825,7 @@ static herr_t gen_sel_files(const char *filename, H5F_libver_t low_bound, H5F_l if(H5Dclose(ref_did) < 0) TEST_ERROR; - } + } /* Closing */ if(H5Sclose(ref_sid) < 0) @@ -858,30 +858,30 @@ error: /*********************************************************************** * gen_ref_files() is used to create the following test files: - * bounds_ref_earliest_latest.h5 - * bounds_ref_latest_latest.h5 - * bounds_ref_v110_v110.h5 - * bounds_ref_v18_v18.h5 + * bounds_ref_earliest_latest.h5 + * bounds_ref_latest_latest.h5 + * bounds_ref_v110_v110.h5 + * bounds_ref_v18_v18.h5 * * File contents for: * --bounds_ref_earliest_latest.h5 * --bounds_ref_latest_latest.h5 * --bounds_ref_v112_v112.h5 * (1) Revised_refs_dset: a dataset created with the revised reference type - * --attribute reference + * --attribute reference * --object reference * --dataset region reference - * (2) Old_ref_object_dset: + * (2) Old_ref_object_dset: * --a dataset created with the old object reference type - * (3) Old_ref_region_dset: + * (3) Old_ref_region_dset: * --a dataset created with the old dataset region reference type * * File contents for: - * --bounds_ref_v110_v110.h5 - * --bounds_ref_v18_v18.h5 - * (1) Old_ref_object_dset: + * --bounds_ref_v110_v110.h5 + * --bounds_ref_v18_v18.h5 + * (1) Old_ref_object_dset: * --a dataset created with the old object reference type - * (2) Old_ref_region_dset: + * (2) Old_ref_region_dset: * --a dataset created with the old dataset region reference type * * Return: SUCCEED/FAIL @@ -912,7 +912,7 @@ static herr_t gen_ref_files(const char *filename, H5F_libver_t low_bound, H5F_l unsigned i; /* Local index variable */ /* - * Create test file, attribute, group and dataset + * Create test file, attribute, group and dataset */ if((dwbuf = HDcalloc(sizeof(unsigned), 100)) == NULL) @@ -968,7 +968,7 @@ static herr_t gen_ref_files(const char *filename, H5F_libver_t low_bound, H5F_l HDfree(dwbuf); dwbuf = NULL; } - + /* Create file access property list */ if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) TEST_ERROR; @@ -980,7 +980,7 @@ static herr_t gen_ref_files(const char *filename, H5F_libver_t low_bound, H5F_l if((fid = H5Fopen(filename, H5F_ACC_RDWR, fapl)) <0) TEST_ERROR; - /* + /* * Create the revised and old references in the file */ @@ -1080,7 +1080,7 @@ static herr_t gen_ref_files(const char *filename, H5F_libver_t low_bound, H5F_l TEST_ERROR; if(H5Sclose(sid) < 0) TEST_ERROR; - if(H5Pclose(fapl) < 0) + if(H5Pclose(fapl) < 0) TEST_ERROR; if(H5Fclose(fid) < 0) TEST_ERROR; @@ -1120,7 +1120,7 @@ int main(void) if (gen_v18_v18() < 0) TEST_ERROR; - /* + /* * Files generated via gen_ref_files() */ @@ -1144,7 +1144,7 @@ int main(void) if(gen_ref_files(FILENAME_REF_V18_V18, H5F_LIBVER_V18, H5F_LIBVER_V18) < 0) TEST_ERROR; - /* + /* * Files generated via gen_sel_files() */ diff --git a/test/gen_filespace.c b/test/gen_filespace.c index f4a4f3f..bf49b7b 100644 --- a/test/gen_filespace.c +++ b/test/gen_filespace.c @@ -40,7 +40,7 @@ const char *FILENAMES[] = { * Move these files to 1.8 branch for compatibility testing: * test_filespace_compatible() in test/tfile.c will use these files. * - * Copy these files from the 1.8 branch back to the trunk for + * Copy these files from the 1.8 branch back to the trunk for * compatibility testing via test_filespace_round_compatible() in test/tfile.c. * */ diff --git a/test/gen_filters.c b/test/gen_filters.c index fa66078..9764830 100644 --- a/test/gen_filters.c +++ b/test/gen_filters.c @@ -29,9 +29,9 @@ static size_t filter_bogus(unsigned int flags, size_t cd_nelmts, * Function: create_file_with_bogus_filter * * Purpose: Create a dataset with the fletcher filter. - * This function is used to create the test file `test_filters.h5' - * which has a dataset with the "fletcher" I/O filter. This dataset - * will be used to verify the correct behavior of the library in + * This function is used to create the test file `test_filters.h5' + * which has a dataset with the "fletcher" I/O filter. This dataset + * will be used to verify the correct behavior of the library in * the test "dsets" * * Return: Success: 0 @@ -168,7 +168,7 @@ create_file_with_bogus_filter(void) /* create dcpl */ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error; - /* create chunking */ + /* create chunking */ if(H5Pset_chunk(dcpl, rank, chunk_dims) < 0) goto error; /* register bogus filter */ diff --git a/test/gen_plist.c b/test/gen_plist.c index 8fc8a05..b6f5597 100644 --- a/test/gen_plist.c +++ b/test/gen_plist.c @@ -37,7 +37,7 @@ main(void) hid_t acpl1; /* attribute create prop. list */ herr_t ret = 0; - hsize_t chunk_size = 16384; /* chunk size */ + hsize_t chunk_size = 16384; /* chunk size */ int fill = 2; /* Fill value */ hsize_t max_size[1]; /* data space maximum size */ size_t nslots = 521 * 2; @@ -129,22 +129,22 @@ main(void) assert(ret > 0); max_size[0] = 100; - if((ret = H5Pset_external(dcpl1, "ext1.data", (off_t)0, + if((ret = H5Pset_external(dcpl1, "ext1.data", (off_t)0, (hsize_t)(max_size[0] * sizeof(int)/4))) < 0) assert(ret > 0); - if((ret = H5Pset_external(dcpl1, "ext2.data", (off_t)0, + if((ret = H5Pset_external(dcpl1, "ext2.data", (off_t)0, (hsize_t)(max_size[0] * sizeof(int)/4))) < 0) assert(ret > 0); - if((ret = H5Pset_external(dcpl1, "ext3.data", (off_t)0, + if((ret = H5Pset_external(dcpl1, "ext3.data", (off_t)0, (hsize_t)(max_size[0] * sizeof(int)/4))) < 0) assert(ret > 0); - if((ret = H5Pset_external(dcpl1, "ext4.data", (off_t)0, + if((ret = H5Pset_external(dcpl1, "ext4.data", (off_t)0, (hsize_t)(max_size[0] * sizeof(int)/4))) < 0) assert(ret > 0); if((ret = encode_plist(dcpl1, little_endian, word_length, "testfiles/plist_files/dcpl_")) < 0) assert(ret > 0); - + /* release resource */ if((ret = H5Pclose(dcpl1)) < 0) assert(ret > 0); @@ -156,13 +156,13 @@ main(void) if((ret = encode_plist(dapl1, little_endian, word_length, "testfiles/plist_files/def_dapl_")) < 0) assert(ret > 0); - + if((ret = H5Pset_chunk_cache(dapl1, nslots, nbytes, w0)) < 0) assert(ret > 0); if((ret = encode_plist(dapl1, little_endian, word_length, "testfiles/plist_files/dapl_")) < 0) assert(ret > 0); - + /* release resource */ if((ret = H5Pclose(dapl1)) < 0) assert(ret > 0); @@ -197,7 +197,7 @@ main(void) if((ret = encode_plist(dxpl1, little_endian, word_length, "testfiles/plist_files/dxpl_")) < 0) assert(ret > 0); - + /* release resource */ if((ret = H5Pclose(dxpl1)) < 0) assert(ret > 0); @@ -228,7 +228,7 @@ main(void) if((ret = encode_plist(gcpl1, little_endian, word_length, "testfiles/plist_files/gcpl_")) < 0) assert(ret > 0); - + /* release resource */ if((ret = H5Pclose(gcpl1)) < 0) assert(ret > 0); @@ -245,7 +245,7 @@ main(void) if((ret = encode_plist(lcpl1, little_endian, word_length, "testfiles/plist_files/lcpl_")) < 0) assert(ret > 0); - + /* release resource */ if((ret = H5Pclose(lcpl1)) < 0) assert(ret > 0); @@ -268,7 +268,7 @@ main(void) if((ret = encode_plist(ocpypl1, little_endian, word_length, "testfiles/plist_files/ocpypl_")) < 0) assert(ret > 0); - + /* release resource */ if((ret = H5Pclose(ocpypl1)) < 0) assert(ret > 0); @@ -482,7 +482,7 @@ encode_plist(hid_t plist_id, int little_endian, int word_length, const char *fil HDassert(write_size == (ssize_t)temp_size); HDclose(fd); - + HDfree(temp_buf); return 1; diff --git a/test/genall5.h b/test/genall5.h index 1dce195..20141de 100644 --- a/test/genall5.h +++ b/test/genall5.h @@ -34,7 +34,7 @@ void os_grp_0(hid_t fid, const char *group_name); void vrfy_os_grp_0(hid_t fid, const char *group_name); void os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks); -void vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, +void vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks); void ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data); diff --git a/test/getname.c b/test/getname.c index c542ec5..a6f2f5a 100644 --- a/test/getname.c +++ b/test/getname.c @@ -2375,7 +2375,7 @@ test_main(hid_t file_id, hid_t fapl) } H5E_END_TRY; if(H5Tcommit_anon(file2_id, dtype, H5P_DEFAULT, H5P_DEFAULT)) TEST_ERROR - + /* Test H5Iget_name with anonymously created datatype, should pass because committed */ if((size = H5Iget_name(dtype, NULL, 0)) != 0) TEST_ERROR @@ -2585,7 +2585,7 @@ test_obj_ref(hid_t fapl) /* Make sure size parameter is ignored */ namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[0], NULL, 200); if(namelen != 9) TEST_ERROR - + namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[0], (char*)buf, sizeof(buf)); if(!((HDstrcmp(buf, "/Dataset3") == 0) &&(namelen == 9))) TEST_ERROR PASSED(); diff --git a/test/h5test.c b/test/h5test.c index e7d91b6..9cca100 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -2146,7 +2146,7 @@ const char *H5_get_srcdir_filename(const char *filename) /*------------------------------------------------------------------------- * Function: H5_get_srcdir * - * Purpose: Just return the srcdir path + * Purpose: Just return the srcdir path * * Return: The string * diff --git a/test/mirror_vfd.c b/test/mirror_vfd.c index 112d67a..4da742f 100644 --- a/test/mirror_vfd.c +++ b/test/mirror_vfd.c @@ -107,7 +107,7 @@ static void mybzero(void *dest, size_t size); /* ---------------------------------------------------------------------------- * Function: mybzero * - * Purpose: Have bzero simplicity and abstraction in (possible) absence of + * Purpose: Have bzero simplicity and abstraction in (possible) absence of * it being available. * * Programmer: Jacob Smith diff --git a/test/ohdr.c b/test/ohdr.c index 31a54d2..ad76576 100644 --- a/test/ohdr.c +++ b/test/ohdr.c @@ -1053,7 +1053,7 @@ test_minimized_dset_ohdr_size_comparisons(hid_t fapl_id) dcpl_default = H5Pcreate(H5P_DATASET_CREATE); if(dcpl_default < 0) TEST_ERROR - + dcpl_minimize = H5Pcreate(H5P_DATASET_CREATE); if(dcpl_minimize < 0) TEST_ERROR ret = H5Pset_dset_no_attrs_hint(dcpl_minimize, TRUE); diff --git a/test/page_buffer.c b/test/page_buffer.c index a6b3561..a508dc9 100644 --- a/test/page_buffer.c +++ b/test/page_buffer.c @@ -41,7 +41,7 @@ /* test routines */ #ifdef H5_HAVE_PARALLEL -static unsigned verify_page_buffering_disabled(hid_t orig_fapl, +static unsigned verify_page_buffering_disabled(hid_t orig_fapl, const char *env_h5_drvr); #else #define NUM_DSETS 5 @@ -72,9 +72,9 @@ const char *FILENAME[] = { * Purpose: The purpose of this function appears to be a smoke check * intended to exercise the page buffer. * - * Specifically, the function creates a file, and then goes - * through a loop in which it creates four data sets, write - * data to one of them, verifies the data written, and then + * Specifically, the function creates a file, and then goes + * through a loop in which it creates four data sets, write + * data to one of them, verifies the data written, and then * deletes the three that it didn't write to. * * Any data mis-matches or failures reported by the HDF5 @@ -158,7 +158,7 @@ create_file(char *filename, hid_t fcpl, hid_t fapl) HDmemset(data, 0, (size_t)num_elements * sizeof(int)); if((dset_id = H5Dopen2(grp_id, dset_name, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR; + FAIL_STACK_ERROR; if(H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data) < 0) FAIL_STACK_ERROR; if(H5Dclose(dset_id) < 0) @@ -213,7 +213,7 @@ error: * Purpose: The purpose of this function appears to be a smoke check * intended to exercise the page buffer. * - * Specifically, the function opens a file (created by + * Specifically, the function opens a file (created by * create_file()?), and verify the contents of its datasets. * * Any data mis-matches or failures reported by the HDF5 @@ -228,7 +228,7 @@ error: *------------------------------------------------------------------------- */ static unsigned -open_file(char *filename, hid_t fapl, hsize_t page_size, +open_file(char *filename, hid_t fapl, hsize_t page_size, size_t page_buffer_size) { hid_t file_id = -1; @@ -370,7 +370,7 @@ error: * * 1) verifying that API errors are caught. * - * 2) verifying that the page buffer behaves more or less + * 2) verifying that the page buffer behaves more or less * as advertized. * * Any data mis-matches or unexpected failures or successes @@ -404,8 +404,8 @@ test_args(hid_t orig_fapl, const char *env_h5_drvr) TEST_ERROR; - /* Test setting a page buffer without Paged Aggregation enabled - - * should fail + /* Test setting a page buffer without Paged Aggregation enabled - + * should fail */ if(H5Pset_page_buffer_size(fapl, 512, 0, 0) < 0) TEST_ERROR; @@ -418,8 +418,8 @@ test_args(hid_t orig_fapl, const char *env_h5_drvr) TEST_ERROR; - /* Test setting a page buffer with a size smaller than a single - * page size - should fail + /* Test setting a page buffer with a size smaller than a single + * page size - should fail */ if(H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, 0, (hsize_t)1) < 0) TEST_ERROR; @@ -438,8 +438,8 @@ test_args(hid_t orig_fapl, const char *env_h5_drvr) TEST_ERROR; - /* Test setting a page buffer with sum of min meta and raw - * data percentage > 100 - should fail + /* Test setting a page buffer with sum of min meta and raw + * data percentage > 100 - should fail */ H5E_BEGIN_TRY { ret = H5Pset_page_buffer_size(fapl, 512, 50, 51); @@ -468,8 +468,8 @@ test_args(hid_t orig_fapl, const char *env_h5_drvr) TEST_ERROR; - /* Test setting a page buffer with a size slightly larger than a - * single page size + /* Test setting a page buffer with a size slightly larger than a + * single page size */ if(H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, 0, (hsize_t)1) < 0) TEST_ERROR; @@ -555,14 +555,14 @@ error: * * Programmer: unknown * ?? / ?? / ?? - * + * * Changes: Added base_page_cnt field as supporting code. This allows * the test to adjust to the number of page buffer pages * accessed during file open / create. * - * The test for the value of base_page_cnt just after file + * The test for the value of base_page_cnt just after file * open exists detect changes in library behavior. Assuming - * any such change is not indicative of other issues, these + * any such change is not indicative of other issues, these * tests can be modified to reflect the change. * * JRM -- 2/23/17 @@ -615,7 +615,7 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr) FAIL_STACK_ERROR; /* opening the file inserts one or more pages into the page buffer. - * Get the number of pages inserted, and verify that it is the + * Get the number of pages inserted, and verify that it is the * the expected value. */ base_page_cnt = H5SL_count(f->shared->page_buf->slist_ptr); @@ -695,8 +695,8 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr) if(H5SL_count(f->shared->page_buf->slist_ptr) != page_count + base_page_cnt) FAIL_STACK_ERROR; - /* read elements 1200 - 1201, this should read -1 and bring in an - * entire page of addr 1200 + /* read elements 1200 - 1201, this should read -1 and bring in an + * entire page of addr 1200 */ if(H5F_block_read(f, H5FD_MEM_DRAW, addr+(sizeof(int)*1200), sizeof(int)*1, data) < 0) FAIL_STACK_ERROR; @@ -746,7 +746,7 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr) } /* read elements 0 - 800 using the PB.. this should result in all - * what we have written so far and should get the updates from the PB + * what we have written so far and should get the updates from the PB */ if(H5F_block_read(f, H5FD_MEM_DRAW, addr, sizeof(int)*800, data) < 0) FAIL_STACK_ERROR; @@ -761,7 +761,7 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr) /* update elements 400 - 1400 to value 0, this will go to disk but * also evict existing pages from the PB (page 400 & 1200 that are - * existing). + * existing). */ for(i=0 ; i<1000 ; i++) data[i] = 0; @@ -832,14 +832,14 @@ error: * * Programmer: unknown * ?? / ?? / ?? - * + * * Changes: Added base_page_cnt field as supporting code. This allows * the test to adjust to the number of page buffer pages * accessed during file open / create. * - * The test for the value of base_page_cnt just after file + * The test for the value of base_page_cnt just after file * open exists detect changes in library behavior. Assuming - * any such change is not indicative of other issues, these + * any such change is not indicative of other issues, these * tests can be modified to reflect the change. * * JRM -- 2/23/17 @@ -898,7 +898,7 @@ test_lru_processing(hid_t orig_fapl, const char *env_h5_drvr) FAIL_STACK_ERROR; /* opening the file inserts one or more pages into the page buffer. - * Get the number of pages inserted, and verify that it is the + * Get the number of pages inserted, and verify that it is the * the expected value. */ base_page_cnt = H5SL_count(f->shared->page_buf->slist_ptr); @@ -918,7 +918,7 @@ test_lru_processing(hid_t orig_fapl, const char *env_h5_drvr) /* update the first 100 elements to have values 0-99 - this will be * a page buffer update with 1 page resulting in the page - * buffer. + * buffer. */ for(i=0 ; i<100 ; i++) data[i] = i; @@ -932,7 +932,7 @@ test_lru_processing(hid_t orig_fapl, const char *env_h5_drvr) TEST_ERROR; /* update elements 300 - 450, with values 300 - 449 - this will - * bring two pages into the page buffer and evict 0. + * bring two pages into the page buffer and evict 0. */ for(i=0 ; i<150 ; i++) data[i] = i+300; @@ -1074,7 +1074,7 @@ error: /*------------------------------------------------------------------------- * Function: test_min_threshold() * - * Purpose: Tests verifying observation of minimum and maximum + * Purpose: Tests verifying observation of minimum and maximum * raw and metadata page counts in the page buffer. * * Any data mis-matches or failures reported by the HDF5 @@ -1085,16 +1085,16 @@ error: * * Programmer: unknown * ?? / ?? / ?? - * + * * Changes: Added the base_raw_cnt and base_meta_cnt fields and - * supporting code. This allows the test to adjust to the - * number of page buffer pages accessed during file open / + * supporting code. This allows the test to adjust to the + * number of page buffer pages accessed during file open / * create. * * The tests for the values of base_raw_cnt and base_meta_cnt - * just after file open exist detect changes in library - * behavior. Assuming any such change is not indicative of - * other issues, these tests can be modified to reflect the + * just after file open exist detect changes in library + * behavior. Assuming any such change is not indicative of + * other issues, these tests can be modified to reflect the * change. * * JRM -- 2/23/17 @@ -1186,7 +1186,7 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr) if(HADDR_UNDEF == (raw_addr = H5MF_alloc(f, H5FD_MEM_DRAW, sizeof(int)*(size_t)num_elements))) FAIL_STACK_ERROR; - /* write all raw data, this would end up in page buffer since there + /* write all raw data, this would end up in page buffer since there * is no metadata yet * * Not necessarily -- opening the file may may load a metadata page. @@ -1244,7 +1244,7 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr) /* write and read more raw data and make sure that they don't end up in * page buffer since the minimum metadata is actually the entire - * page buffer + * page buffer */ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*200), sizeof(int)*100, data) < 0) FAIL_STACK_ERROR; @@ -1320,7 +1320,7 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr) if(HADDR_UNDEF == (raw_addr = H5MF_alloc(f, H5FD_MEM_DRAW, sizeof(int)*(size_t)num_elements))) TEST_ERROR; - /* write all meta data, this would end up in page buffer since there + /* write all meta data, this would end up in page buffer since there * is no raw data yet */ for(i=0 ; i<100 ; i++) @@ -1375,7 +1375,7 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr) /* write and read more meta data and make sure that they don't end up in * page buffer since the minimum metadata is actually the entire - * page buffer + * page buffer */ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*100), sizeof(int)*50, data) < 0) FAIL_STACK_ERROR; @@ -1407,8 +1407,8 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr) HDprintf("\tMinimum metadata threshold = 40%%, Minimum rawdata threshold = 40%%\n"); page_count = 0; - /* keep 5 pages at max in the page buffer 2 meta pages, 2 raw pages - * minimum + /* keep 5 pages at max in the page buffer 2 meta pages, 2 raw pages + * minimum */ if(H5Pset_page_buffer_size(fapl, sizeof(int)*1000, 40, 40) < 0) TEST_ERROR; @@ -1423,8 +1423,8 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr) /* opening the file inserts one or more pages into the page buffer. * - * However, with the current 1 metadata page inserted into the - * the page buffer, it is not necessary to track the base raw and + * However, with the current 1 metadata page inserted into the + * the page buffer, it is not necessary to track the base raw and * metadata entry counts. */ @@ -1503,8 +1503,8 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr) if(f->shared->page_buf->raw_count != 2) TEST_ERROR; - /* adding more meta entires should replace meta entries since raw data - * is at its minimum + /* adding more meta entires should replace meta entries since raw data + * is at its minimum */ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*600), sizeof(int)*100, data) < 0) FAIL_STACK_ERROR; @@ -1522,8 +1522,8 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr) if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*750), sizeof(int)*100, data) < 0) FAIL_STACK_ERROR; - /* adding 2 raw entries (even with 1 call) should only evict 1 meta - * entry and another raw entry + /* adding 2 raw entries (even with 1 call) should only evict 1 meta + * entry and another raw entry */ if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*350), sizeof(int)*100, data) < 0) FAIL_STACK_ERROR; @@ -1647,8 +1647,8 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr) if(f->shared->page_buf->raw_count != 4) TEST_ERROR; - /* write one more raw entry which should replace another raw entry - * keeping min threshold of meta entries + /* write one more raw entry which should replace another raw entry + * keeping min threshold of meta entries */ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*300), sizeof(int)*100, data) < 0) FAIL_STACK_ERROR; @@ -1662,8 +1662,8 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr) if(f->shared->page_buf->raw_count != 4) TEST_ERROR; - /* write a metadata entry that should replace the metadata entry - * at the bottom of the LRU + /* write a metadata entry that should replace the metadata entry + * at the bottom of the LRU */ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*500), sizeof(int)*100, data) < 0) FAIL_STACK_ERROR; @@ -1721,16 +1721,16 @@ error: * * Programmer: unknown * ?? / ?? / ?? - * + * * Changes: Added the base_raw_cnt and base_meta_cnt fields and - * supporting code. This allows the test to adjust to the - * number of page buffer pages accessed during file open / + * supporting code. This allows the test to adjust to the + * number of page buffer pages accessed during file open / * create. * * The tests for the values of base_raw_cnt and base_meta_cnt - * just after file open exist detect changes in library - * behavior. Assuming any such change is not indicative of - * other issues, these tests can be modified to reflect the + * just after file open exist detect changes in library + * behavior. Assuming any such change is not indicative of + * other issues, these tests can be modified to reflect the * change. * * JRM -- 2/23/17 @@ -1787,7 +1787,7 @@ test_stats_collection(hid_t orig_fapl, const char *env_h5_drvr) FAIL_STACK_ERROR; /* opening the file inserts one or more pages into the page buffer. - * Get the raw and meta counts now, so we can adjust the expected + * Get the raw and meta counts now, so we can adjust the expected * statistics accordingly. */ HDassert(f); @@ -2014,7 +2014,7 @@ error: /*------------------------------------------------------------------------- * Function: verify_page_buffering_disabled() * - * Purpose: This function should only be called in parallel + * Purpose: This function should only be called in parallel * builds. * * At present, page buffering should be disabled in parallel @@ -2025,7 +2025,7 @@ error: * * Programmer: John Mainzer * 03/21/17 - * + * * Changes: None. * *------------------------------------------------------------------------- @@ -2072,7 +2072,7 @@ verify_page_buffering_disabled(hid_t orig_fapl, const char *env_h5_drvr) if(file_id >= 0) TEST_ERROR; - /* now, create a file, close it, and then try to open it with page + /* now, create a file, close it, and then try to open it with page * buffering enabled. */ if((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) @@ -2092,7 +2092,7 @@ verify_page_buffering_disabled(hid_t orig_fapl, const char *env_h5_drvr) if(H5Fclose(file_id) < 0) FAIL_STACK_ERROR; - /* try to open the file using the fapl prepared above which enables + /* try to open the file using the fapl prepared above which enables * page buffering. Should fail. */ H5E_BEGIN_TRY { @@ -2158,7 +2158,7 @@ main(void) * Page buffering depends on paged aggregation which is * currently disabled for multi/split drivers. */ - if((0 == HDstrcmp(env_h5_drvr, "multi")) || + if((0 == HDstrcmp(env_h5_drvr, "multi")) || (0 == HDstrcmp(env_h5_drvr, "split"))) { SKIPPED() @@ -2175,7 +2175,7 @@ main(void) if(H5CX_push() < 0) FAIL_STACK_ERROR api_ctx_pushed = TRUE; -#ifdef H5_HAVE_PARALLEL +#ifdef H5_HAVE_PARALLEL HDputs("Page Buffering is disabled for parallel."); nerrors += verify_page_buffering_disabled(fapl, env_h5_drvr); diff --git a/test/swmr_addrem_writer.c b/test/swmr_addrem_writer.c index df984b1..71e4929 100644 --- a/test/swmr_addrem_writer.c +++ b/test/swmr_addrem_writer.c @@ -337,7 +337,7 @@ int main(int argc, const char *argv[]) verbose = 0; u++; break; - + /* Random # seed */ case 'r': use_seed = 1; diff --git a/test/swmr_check_compat_vfd.c b/test/swmr_check_compat_vfd.c index e249e09..9b4fbb5 100644 --- a/test/swmr_check_compat_vfd.c +++ b/test/swmr_check_compat_vfd.c @@ -13,7 +13,7 @@ /* Purpose: This is a small program that checks if the HDF5_DRIVER * environment variable is set to a value that supports SWMR. - * + * * It is intended for use in shell scripts. */ diff --git a/test/swmr_common.c b/test/swmr_common.c index 925dc33..7ae1fad 100644 --- a/test/swmr_common.c +++ b/test/swmr_common.c @@ -27,7 +27,7 @@ #include "h5test.h" #include "swmr_common.h" #include "vds_swmr.h" - + /*******************/ /* Local Variables */ /*******************/ diff --git a/test/swmr_common.h b/test/swmr_common.h index 99d1cb2..a0bc581 100644 --- a/test/swmr_common.h +++ b/test/swmr_common.h @@ -26,7 +26,7 @@ #define NLEVELS 5 /* # of datasets in the SWMR test file */ -#define NMAPPING 9 +#define NMAPPING 9 #define FILENAME "swmr_data.h5" /* SWMR test file name */ #define DTYPE_SIZE 150 /* Data size in opaque type */ diff --git a/test/swmr_generator.c b/test/swmr_generator.c index 54a9900..f6a4fe2 100644 --- a/test/swmr_generator.c +++ b/test/swmr_generator.c @@ -358,7 +358,7 @@ int main(int argc, const char *argv[]) HDfprintf(stderr, "\tcompression level = %d\n", comp_level); HDfprintf(stderr, "\tindex type = %s\n", index_type); } /* end if */ - + /* Set the random seed */ if(!use_seed) { struct timeval t; diff --git a/test/swmr_reader.c b/test/swmr_reader.c index cb354a7..ee263e3 100644 --- a/test/swmr_reader.c +++ b/test/swmr_reader.c @@ -329,7 +329,7 @@ read_records(const char *filename, hbool_t verbose, FILE *verbose_file, /* Emit informational message */ if(verbose) HDfprintf(verbose_file, "Closing file\n"); - + /* Close the file */ if(H5Fclose(fid) < 0) return -1; diff --git a/test/swmr_remove_reader.c b/test/swmr_remove_reader.c index 9ca6045..b02d16f 100644 --- a/test/swmr_remove_reader.c +++ b/test/swmr_remove_reader.c @@ -371,7 +371,7 @@ usage(void) HDprintf("and will generate a random seed (no -r given).\n"); HDprintf("\n"); HDexit(EXIT_FAILURE); -} +} int main(int argc, const char *argv[]) { diff --git a/test/swmr_remove_writer.c b/test/swmr_remove_writer.c index e6d23de..2bebab9 100644 --- a/test/swmr_remove_writer.c +++ b/test/swmr_remove_writer.c @@ -272,7 +272,7 @@ int main(int argc, const char *argv[]) verbose = 0; u++; break; - + /* Random # seed */ case 'r': use_seed = 1; diff --git a/test/swmr_sparse_reader.c b/test/swmr_sparse_reader.c index 6adc6c5..6d5d257 100644 --- a/test/swmr_sparse_reader.c +++ b/test/swmr_sparse_reader.c @@ -162,7 +162,7 @@ check_dataset(hid_t fid, unsigned verbose, const symbol_info_t *symbol, symbol_t * The amount of time to sleep (s). * * unsigned reopen_count - * + * * * Return: Success: 0 * Failure: -1 @@ -185,7 +185,7 @@ read_records(const char *filename, unsigned verbose, unsigned long nrecords, HDassert(filename); HDassert(poll_time != 0); - + /* Create file access property list */ if((fapl = h5_fileaccess()) < 0) return -1; diff --git a/test/swmr_start_write.c b/test/swmr_start_write.c index c4222ad..fc7e7a5 100644 --- a/test/swmr_start_write.c +++ b/test/swmr_start_write.c @@ -53,11 +53,11 @@ static void usage(void); * Purpose: Creates the HDF5 file (without SWMR access) which * which will be used for testing H5Fstart_swmr_write(). * - * Parameters: + * Parameters: * filename: The SWMR test file's name. * verbose: whether verbose console output is desired. * verbose_file: file pointer for verbose output - * random_seed: The random seed to store in the file. + * random_seed: The random seed to store in the file. * The sparse tests use this value. * * Return: Success: the file ID @@ -134,10 +134,10 @@ create_file(const char *filename, hbool_t verbose, FILE *verbose_file, /*------------------------------------------------------------------------- * Function: create_datasets * - * Purpose: Create datasets (and keep them opened) which will be used for testing + * Purpose: Create datasets (and keep them opened) which will be used for testing * H5Fstart_swmr_write(). * - * Parameters: + * Parameters: * fid: file ID for the SWMR test file * comp_level: the compresssion level * index_type: The chunk index type (b1 | b2 | ea | fa) @@ -212,7 +212,7 @@ create_datasets(hid_t fid, int comp_level, hbool_t verbose, FILE *verbose_file, * Purpose: Writes a specified number of records to random datasets in * the SWMR test file. * - * Parameters: + * Parameters: * fid: The file ID of the SWMR HDF5 file * verbose: Whether or not to emit verbose console messages * verbose_file: file pointer for verbose output @@ -419,7 +419,7 @@ int main(int argc, const char *argv[]) verbose = FALSE; u++; break; - + /* Random # seed */ case 'r': use_seed = TRUE; diff --git a/test/swmr_writer.c b/test/swmr_writer.c index 4c3e64a..d4387aa 100644 --- a/test/swmr_writer.c +++ b/test/swmr_writer.c @@ -328,7 +328,7 @@ int main(int argc, const char *argv[]) verbose = FALSE; u++; break; - + /* Random # seed */ case 'r': use_seed = TRUE; diff --git a/test/test_filter_plugin.sh.in b/test/test_filter_plugin.sh.in index 0a45c0f..e8c53e4 100644 --- a/test/test_filter_plugin.sh.in +++ b/test/test_filter_plugin.sh.in @@ -1,10 +1,10 @@ #! /bin/sh # -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in # the COPYING file, which can be found at the root of the source code # distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. # If you do not have access to either file, you may request a copy from diff --git a/test/test_vol_plugin.sh.in b/test/test_vol_plugin.sh.in index 38220ef..32d1c12 100644 --- a/test/test_vol_plugin.sh.in +++ b/test/test_vol_plugin.sh.in @@ -1,10 +1,10 @@ #! /bin/sh # -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in # the COPYING file, which can be found at the root of the source code # distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. # If you do not have access to either file, you may request a copy from diff --git a/test/testabort_fail.sh.in b/test/testabort_fail.sh.in index 925d8a4..c86bf8a 100644 --- a/test/testabort_fail.sh.in +++ b/test/testabort_fail.sh.in @@ -14,7 +14,7 @@ # Test to verify that the assertion/abort failure is fixed when the application # does not close the file. (See HDFFV-10160) # -# Test to verify that the infinite loop closing library/abort failure is fixed +# Test to verify that the infinite loop closing library/abort failure is fixed # when the application creates and removes dense attributes (See HDFFV-10659) srcdir=@srcdir@ @@ -33,7 +33,7 @@ TEST_NAME=filenotclosed # The test name TEST_BIN=`pwd`/$TEST_NAME # The path of the test binary # # Run the test -$RUNSERIAL $TEST_BIN >/dev/null 2>&1 +$RUNSERIAL $TEST_BIN >/dev/null 2>&1 exitcode=$? if [ $exitcode -eq 0 ]; then echo "Test PASSED" @@ -47,7 +47,7 @@ echo "Testing infinite loop closing library/abort failure" TEST_NAME=del_many_dense_attrs # The test name TEST_BIN=`pwd`/$TEST_NAME # The path of the test binary # Run the test -$RUNSERIAL $TEST_BIN >/dev/null 2>&1 +$RUNSERIAL $TEST_BIN >/dev/null 2>&1 exitcode=$? if [ $exitcode -eq 0 ]; then echo "Test PASSED" diff --git a/test/testcheck_version.sh.in b/test/testcheck_version.sh.in index a5641f5..836170d 100644 --- a/test/testcheck_version.sh.in +++ b/test/testcheck_version.sh.in @@ -71,7 +71,7 @@ WarnMesg(){ test -n "$H5_HAVE_EMBEDDED_LIBINFO" && cat $h5libsettings echo "Bye..." } - + # Print warning message2 of version mismatch. WarnMesg2(){ @@ -88,13 +88,13 @@ WarnMesg2(){ echo "Headers are $xxh5versmajor.$xxh5versminor.$xxh5versrelease, library is $h5versmajor.$h5versminor.$h5versrelease" test -n "$H5_HAVE_EMBEDDED_LIBINFO" && cat $h5libsettings } - + # Run a test and print PASS or *FAIL*. If a test fails then increment # the `nerrors' global variable and (if $verbose is set) display the # difference between the actual output and the expected output. The # expected output generated according to the parameter values and compared -# against actual output. +# against actual output. # The expected and actual output files are removed unless $HDF5_NOCLEANUP # has a non-zero value. # $1: the set value of $HDF5_DISABLE_VERSION_CHECK. (unset means not to set @@ -175,7 +175,7 @@ TESTING() { ) >$actual 2>$actual_err ret_code=$? cat $actual_err >> $actual - + if [ $h5haveexitcode = 'yes' -a \( $expect_code -ne $ret_code \) ]; then echo "*FAILED*" echo " Expected exit code ($expect_code) differs from actual code ($ret_code)" @@ -189,7 +189,7 @@ TESTING() { test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' fi - # Clean up output file. + # Clean up output file. # Also clean the core file generated by H5check_version's abort. if test -z "$HDF5_NOCLEANUP"; then $RM $expect $actual $actual_err @@ -211,14 +211,14 @@ nerrors=0 verbose=yes # default on debugmode= # default off H5_HAVE_EMBEDDED_LIBINFO=`grep '#define H5_HAVE_EMBEDDED_LIBINFO ' ../src/H5pubconf.h` -h5libsettings=../src/libhdf5.settings +h5libsettings=../src/libhdf5.settings PURPOSE # Figure out library version numbers from the header file. -h5versmajor=`grep '#define H5_VERS_MAJOR' $srcdir/../src/H5public.h | cut -f2` -h5versminor=`grep '#define H5_VERS_MINOR' $srcdir/../src/H5public.h | cut -f2` -h5versrelease=`grep '#define H5_VERS_RELEASE' $srcdir/../src/H5public.h | cut -f2` +h5versmajor=`grep '#define H5_VERS_MAJOR' $srcdir/../src/H5public.h | cut -f2` +h5versminor=`grep '#define H5_VERS_MINOR' $srcdir/../src/H5public.h | cut -f2` +h5versrelease=`grep '#define H5_VERS_RELEASE' $srcdir/../src/H5public.h | cut -f2` DEBUGPRINT $h5versmajor.$h5versminor.$h5versrelease case "$h5versmajor$h5versminor$h5versrelease" in [0-9]*) # good. noop. diff --git a/test/testerror.sh.in b/test/testerror.sh.in index ac2a109..b5ec853 100644 --- a/test/testerror.sh.in +++ b/test/testerror.sh.in @@ -11,7 +11,7 @@ # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # -# Tests for test_error and err_compat +# Tests for test_error and err_compat srcdir=@srcdir@ @@ -62,7 +62,7 @@ TEST() { TESTING $TEST_ERR ( # Skip the plugin for testing missing filter. - $ENVCMD $RUNSERIAL $TEST_ERR_BIN + $ENVCMD $RUNSERIAL $TEST_ERR_BIN ) >$actual 2>$actual_err # Extract file name, line number, version and thread IDs because they may be different sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ @@ -73,7 +73,7 @@ TEST() { -e 's/H5Eset_auto[1-2]*/H5Eset_auto(1 or 2)/' \ $actual_err > $actual_ext cat $actual_ext >> $actual - + if $CMP $expect1 $actual; then echo " PASSED" elif $CMP $expect2 $actual; then @@ -96,7 +96,7 @@ SKIP() { TESTING $@ echo " -SKIP-" } - + ############################################################################## ############################################################################## ### T H E T E S T S ### diff --git a/test/testlibinfo.sh.in b/test/testlibinfo.sh.in index 1dd744b..b2e8a12 100644 --- a/test/testlibinfo.sh.in +++ b/test/testlibinfo.sh.in @@ -47,7 +47,7 @@ SKIP() { LINEMSG $* echo " -SKIP-" } - + # Function definitions CHECK_LIBINFO(){ LINEMSG $1 @@ -80,9 +80,9 @@ if [ -n $Shared_Lib ]; then shlib=$(grep dlname ../src/libhdf5.la | sed -e "s/dlname='//" -e "s/'//") else h5libdir=../src -fi +fi -h5libsettings=../src/libhdf5.settings +h5libsettings=../src/libhdf5.settings # Part 1: # Verify the HDF5 library does contains an exact copy of the content of the diff --git a/test/th5s.c b/test/th5s.c index c60b1ff..bb84353 100644 --- a/test/th5s.c +++ b/test/th5s.c @@ -1210,7 +1210,7 @@ test_h5s_encode(H5F_libver_t low, H5F_libver_t high) * Test encoding and decoding of simple dataspace and hyperslab selection. *------------------------------------------------------------------------- */ - + /* Create the file access property list */ fapl = H5Pcreate(H5P_FILE_ACCESS); CHECK(fapl, FAIL, "H5Pcreate"); @@ -1569,7 +1569,7 @@ test_h5s_encode1(void) /**************************************************************** ** -** test_h5s_check_encoding(): +** test_h5s_check_encoding(): ** This is the helper routine to verify that H5Sencode2() ** works as specified in the RFC for the library format setting ** in the file access property list. @@ -1582,7 +1582,7 @@ test_h5s_encode1(void) ** ****************************************************************/ static herr_t -test_h5s_check_encoding(hid_t in_fapl, hid_t in_sid, +test_h5s_check_encoding(hid_t in_fapl, hid_t in_sid, uint32_t expected_version, uint8_t expected_enc_size, hbool_t expected_to_fail) { char *buf = NULL; /* Pointer to the encoded buffer */ @@ -1633,7 +1633,7 @@ test_h5s_check_encoding(hid_t in_fapl, hid_t in_sid, VERIFY(in_low_bounds[0], d_low_bounds[0], "Compare selection low bounds"); VERIFY(in_high_bounds[0], d_high_bounds[0], "Compare selection high bounds"); - /* + /* * See "RFC: H5Sencode/H5Sdeocde Format Change" for the verification of: * H5S_SEL_POINTS: * --the expected version for point selection info @@ -1644,7 +1644,7 @@ test_h5s_check_encoding(hid_t in_fapl, hid_t in_sid, */ if(H5Sget_select_type(in_sid) == H5S_SEL_POINTS) { - + /* Verify the version */ VERIFY((uint32_t)buf[35], expected_version, "Version for point selection"); @@ -1666,7 +1666,7 @@ test_h5s_check_encoding(hid_t in_fapl, hid_t in_sid, ret = H5Sclose(d_sid); CHECK(ret, FAIL, "H5Sclose"); - if(buf) + if(buf) HDfree(buf); } @@ -1723,15 +1723,15 @@ test_h5s_encode_regular_hyper(H5F_libver_t low, H5F_libver_t high) start = 0; count = unlim? H5S_UNLIMITED : 2; - if((high <= H5F_LIBVER_V18) && + if((high <= H5F_LIBVER_V18) && (unlim || config == CONFIG_32)) expected_to_fail = TRUE; - if(low >= H5F_LIBVER_V112) + if(low >= H5F_LIBVER_V112) expected_version = 3; else if(config == CONFIG_16 && !unlim) expected_version = 1; - else + else expected_version = 2; /* test 1 */ @@ -1745,7 +1745,7 @@ test_h5s_encode_regular_hyper(H5F_libver_t low, H5F_libver_t high) stride = POWER32 - 1; block = 4; expected_enc_size = (uint8_t)(expected_version == 3 ? 4 : 8); - + break; default: HDassert(0); @@ -1873,7 +1873,7 @@ test_h5s_encode_regular_hyper(H5F_libver_t low, H5F_libver_t high) /**************************************************************** ** -** test_h5s_encode_irregular_hyper(): +** test_h5s_encode_irregular_hyper(): ** This test verifies that H5Sencode2() works as specified in ** the RFC for irregular hyperslabs. ** See "RFC: H5Sencode/H5Sdeocde Format Change". @@ -1961,7 +1961,7 @@ test_h5s_encode_irregular_hyper(H5F_libver_t low, H5F_libver_t high) break; case CONFIG_16: - stride = POWER16; + stride = POWER16; expected_enc_size = 4; break; @@ -2092,11 +2092,11 @@ test_h5s_encode_points(H5F_libver_t low, H5F_libver_t high) /**************************************************************** ** -** test_h5s_encode_length(): +** test_h5s_encode_length(): ** Test to verify HDFFV-10271 is fixed. ** Verify that version 2 hyperslab encoding length is correct. ** -** See "RFC: H5Sencode/H5Sdecode Format Change" for the +** See "RFC: H5Sencode/H5Sdecode Format Change" for the ** description of the encoding format. ** ****************************************************************/ diff --git a/test/thread_id.c b/test/thread_id.c index 818ab4a..24aef80 100644 --- a/test/thread_id.c +++ b/test/thread_id.c @@ -11,7 +11,7 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Check that a thread ID returned by H5TS_thread_id() possesses the - * following properties: + * following properties: * * 1 ID >= 1. * 2 The ID is constant over the thread's lifetime. diff --git a/test/trefer.c b/test/trefer.c index d399fef..15f9d64 100644 --- a/test/trefer.c +++ b/test/trefer.c @@ -542,7 +542,7 @@ test_reference_obj(void) ** Tests references to various kinds of objects ** ** Note: The libver_low/libver_high parameters are added to create the file -** with the low and high bounds setting in fapl. +** with the low and high bounds setting in fapl. ** Please see the RFC for "H5Sencode/H5Sdecode Format Change". ** ****************************************************************/ @@ -634,7 +634,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high) H5E_BEGIN_TRY { dset1 = H5Dcreate2(fid1, "Dataset1", H5T_STD_REF, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); } H5E_END_TRY; - + if(dset1 < 0) { VERIFY(libver_high <= H5F_LIBVER_V110, TRUE, "H5Dcreate2"); @@ -840,7 +840,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high) VERIFY(ret, 1, "H5Sget_select_hyper_nblocks"); /* allocate space for the hyperslab blocks */ - coords = (hsize_t *)HDmalloc((size_t)ret * SPACE2_RANK * sizeof(hsize_t) * 2); + coords = (hsize_t *)HDmalloc((size_t)ret * SPACE2_RANK * sizeof(hsize_t) * 2); ret = H5Sget_select_hyper_blocklist(sid2, (hsize_t)0, (hsize_t)ret, coords); CHECK(ret, FAIL, "H5Sget_select_hyper_blocklist"); @@ -871,7 +871,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high) VERIFY(ret, SPACE2_DIM2, "H5Sget_select_elem_npoints"); /* allocate space for the element points */ - coords = (hsize_t *)HDmalloc((size_t)ret * SPACE2_RANK * sizeof(hsize_t)); + coords = (hsize_t *)HDmalloc((size_t)ret * SPACE2_RANK * sizeof(hsize_t)); ret = H5Sget_select_elem_pointlist(sid2, (hsize_t)0, (hsize_t)ret, coords); CHECK(ret, FAIL, "H5Sget_select_elem_pointlist"); @@ -1196,7 +1196,7 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high) VERIFY(ret, 15, "H5Sget_select_hyper_nblocks"); /* allocate space for the hyperslab blocks */ - coords = (hsize_t *)HDmalloc((size_t)ret * SPACE3_RANK * sizeof(hsize_t) * 2); + coords = (hsize_t *)HDmalloc((size_t)ret * SPACE3_RANK * sizeof(hsize_t) * 2); ret = H5Sget_select_hyper_blocklist(sid3, (hsize_t)0, (hsize_t)ret, coords); CHECK(ret, FAIL, "H5Sget_select_hyper_blocklist"); @@ -1251,7 +1251,7 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high) VERIFY(ret, 10, "H5Sget_select_elem_npoints"); /* allocate space for the element points */ - coords = (hsize_t *)HDmalloc((size_t)ret * SPACE3_RANK * sizeof(hsize_t)); + coords = (hsize_t *)HDmalloc((size_t)ret * SPACE3_RANK * sizeof(hsize_t)); ret = H5Sget_select_elem_pointlist(sid3, (hsize_t)0, (hsize_t)ret, coords); CHECK(ret, FAIL, "H5Sget_select_elem_pointlist"); diff --git a/test/trefer_deprec.c b/test/trefer_deprec.c index a830314..db91b8e 100644 --- a/test/trefer_deprec.c +++ b/test/trefer_deprec.c @@ -491,7 +491,7 @@ test_reference_obj(void) ** Tests references to various kinds of objects ** ** Note: The libver_low/libver_high parameters are added to create the file -** with the low and high bounds setting in fapl. +** with the low and high bounds setting in fapl. ** Please see the RFC for "H5Sencode/H5Sdecode Format Change". ** ****************************************************************/ diff --git a/test/trefer_shutdown.c b/test/trefer_shutdown.c index 89a44b3..b1c43e0 100644 --- a/test/trefer_shutdown.c +++ b/test/trefer_shutdown.c @@ -50,7 +50,7 @@ main(int argc, char **argv) /* * "Forget" to call H5Rdestroy on reference objects. If H5Rdestroy * is called at least once on either reference object, or both - * objects, the infinite loop goes away. If H5Rdestroy is never + * objects, the infinite loop goes away. If H5Rdestroy is never * called, the infinite loop will appear. */ #if 0 diff --git a/test/trefstr.c b/test/trefstr.c index 83e2951..c33b5eb 100644 --- a/test/trefstr.c +++ b/test/trefstr.c @@ -299,7 +299,7 @@ test_refstr_own(void) /* Initialize buffer */ s = (char *)H5FL_BLK_MALLOC(str_buf,HDstrlen("foo") + 1); - CHECK_PTR(s, "H5FL_BLK_MALLOC"); + CHECK_PTR(s, "H5FL_BLK_MALLOC"); HDstrcpy(s, "foo"); /* Transfer ownership of dynamically allocated string to ref-counted string */ diff --git a/test/tselect.c b/test/tselect.c index 390f61f..492a917 100644 --- a/test/tselect.c +++ b/test/tselect.c @@ -15325,7 +15325,7 @@ test_select_intersect_block(void) /**************************************************************** ** -** test_hyper_io_1d(): +** test_hyper_io_1d(): ** Test to verify all the selected 10th element in the 1-d file ** dataspace is read correctly into the 1-d contiguous memory space. ** This is modeled after the test scenario described in HDFFV-10585 diff --git a/test/ttsafe.c b/test/ttsafe.c index 89c87a3..e6edd9a 100644 --- a/test/ttsafe.c +++ b/test/ttsafe.c @@ -106,7 +106,7 @@ int main(int argc, char *argv[]) #ifdef H5_HAVE_THREADSAFE AddTest("dcreate", tts_dcreate, cleanup_dcreate, "multi-dataset creation", NULL); AddTest("error", tts_error, cleanup_error, "per-thread error stacks", NULL); -#ifdef H5_HAVE_PTHREAD_H +#ifdef H5_HAVE_PTHREAD_H /* Thread cancellability only supported with pthreads ... */ AddTest("cancel", tts_cancel, cleanup_cancel, "thread cancellation safety test", NULL); #endif /* H5_HAVE_PTHREAD_H */ diff --git a/test/twriteorder.c b/test/twriteorder.c index b104b72..04f3bc5 100644 --- a/test/twriteorder.c +++ b/test/twriteorder.c @@ -187,7 +187,7 @@ parse_option(int argc, char * const argv[]) /* verify partition size must be >= blocksize */ if (part_size_g < blocksize_g ){ HDfprintf(stderr, "Blocksize %d should not be bigger than partition size %d\n", blocksize_g, part_size_g); - Hgoto_error(-1); + Hgoto_error(-1); } done: @@ -228,7 +228,7 @@ int setup_parameters(int argc, char * const argv[]) int create_wo_file(void) { int blkaddr = 0; /* blkaddress of next linked block */ - h5_posix_io_ret_t bytes_wrote = -1; /* # of bytes written */ + h5_posix_io_ret_t bytes_wrote = -1; /* # of bytes written */ /* Create the data file */ if ((write_fd_g = HDopen(DATAFILE, O_RDWR|O_TRUNC|O_CREAT, H5_POSIX_CREATE_MODE_RW)) < 0) { @@ -252,8 +252,8 @@ int write_wo_file(void) int blkaddr_old=0; int i; char buffer[BLOCKSIZE_DFT]; - h5_posix_io_ret_t bytes_wrote = -1; /* # of bytes written */ - + h5_posix_io_ret_t bytes_wrote = -1; /* # of bytes written */ + /* write block 1, 2, ... */ for (i = 1; i < nlinkedblock_g; i++) { @@ -345,7 +345,7 @@ int read_wo_file(void) } -/* Overall Algorithm: +/* Overall Algorithm: * Parse options from user; * Generate/pre-created the test file needed and close it; * fork: child processes become the reader processes; @@ -447,7 +447,7 @@ main(int argc, char *argv[]) Hgoto_error(2); } } - + done: /* Print result and exit */ if (ret_value != 0){ diff --git a/test/unregister.c b/test/unregister.c index db37f3e..a2a507d 100644 --- a/test/unregister.c +++ b/test/unregister.c @@ -55,7 +55,7 @@ const H5Z_class2_t H5Z_DUMMY[1] = {{ * Function: do_nothing * * Purpose: A dummy compression method that doesn't do anything. This - * filter is only for test_unregister_filters. Please don't + * filter is only for test_unregister_filters. Please don't * use it for other tests because it may mess up this test. * * Return: Data chunk size @@ -124,12 +124,12 @@ test_unregister_filters(hid_t fapl_id) goto error; if (H5Zfilter_avail(H5Z_FILTER_DUMMY) != TRUE) goto error; - + /******************* * PART 1 - GROUPS * *******************/ - /* Use DUMMY filter for creating groups */ + /* Use DUMMY filter for creating groups */ if((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0) goto error; if(H5Pset_filter(gcpl_id, H5Z_FILTER_DUMMY, H5Z_FLAG_MANDATORY, (size_t)0, NULL) < 0) @@ -145,7 +145,7 @@ test_unregister_filters(hid_t fapl_id) if((gid_loop = H5Gcreate2(gid, group_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto error; if(H5Gclose(gid_loop) < 0) - goto error; + goto error; } /* Flush the file containing the groups */ @@ -174,7 +174,7 @@ test_unregister_filters(hid_t fapl_id) * PART 2 - DATASETS * *********************/ - /* Use DUMMY filter for creating datasets */ + /* Use DUMMY filter for creating datasets */ if((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error; if(H5Pset_chunk(dcpl_id, 2, chunk_dims) < 0) @@ -227,7 +227,7 @@ test_unregister_filters(hid_t fapl_id) if(H5Dclose(did) < 0) goto error; - /* Unregister the filter after closing all objects but before closing files. + /* Unregister the filter after closing all objects but before closing files. * It should flush all files. */ if(H5Zunregister(H5Z_FILTER_DUMMY) < 0) diff --git a/test/use_append_chunk.c b/test/use_append_chunk.c index 35594cf..8fcf0d3 100644 --- a/test/use_append_chunk.c +++ b/test/use_append_chunk.c @@ -148,7 +148,7 @@ main(int argc, char *argv[]) if ((UC_opts.fapl_id = h5_fileaccess()) < 0) { HDfprintf(stderr, "can't create creation FAPL\n"); Hgoto_error(1); - } + } if (H5Pset_libver_bounds(UC_opts.fapl_id, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) { HDfprintf(stderr, "can't set creation FAPL libver bounds\n"); Hgoto_error(1); @@ -159,7 +159,7 @@ main(int argc, char *argv[]) } else { HDprintf("File created.\n"); } - /* Close FAPL to prevent issues with forking later */ + /* Close FAPL to prevent issues with forking later */ if (H5Pclose(UC_opts.fapl_id) < 0) { HDfprintf(stderr, "can't close creation FAPL\n"); Hgoto_error(1); diff --git a/test/use_common.c b/test/use_common.c index bf29936..b537741 100644 --- a/test/use_common.c +++ b/test/use_common.c @@ -157,9 +157,9 @@ void show_parameters(options_t * opts) { HDprintf("===Parameters used:===\n"); - HDprintf("chunk dims=(%llu, %llu, %llu)\n", (unsigned long long)opts->chunkdims[0], + HDprintf("chunk dims=(%llu, %llu, %llu)\n", (unsigned long long)opts->chunkdims[0], (unsigned long long)opts->chunkdims[1], (unsigned long long)opts->chunkdims[2]); - HDprintf("dataset max dims=(%llu, %llu, %llu)\n", (unsigned long long)opts->max_dims[0], + HDprintf("dataset max dims=(%llu, %llu, %llu)\n", (unsigned long long)opts->max_dims[0], (unsigned long long)opts->max_dims[1], (unsigned long long)opts->max_dims[2]); HDprintf("number of planes to write=%llu\n", (unsigned long long)opts->nplanes); HDprintf("using SWMR mode=%s\n", opts->use_swmr ? "yes(1)" : "no(0)"); @@ -301,7 +301,7 @@ write_uc_file(hbool_t tosend, hid_t file_id, options_t * opts) /* verify chunk_dims against set paramenters */ if (chunk_dims[0]!=opts->chunkdims[0] || chunk_dims[1] != cz || chunk_dims[2] != cz) { HDfprintf(stderr, "chunk size is not as expected. Got dims=(%llu,%llu,%llu)\n", - (unsigned long long)chunk_dims[0], (unsigned long long)chunk_dims[1], + (unsigned long long)chunk_dims[0], (unsigned long long)chunk_dims[1], (unsigned long long)chunk_dims[2]); return -1; } @@ -329,12 +329,12 @@ write_uc_file(hbool_t tosend, hid_t file_id, options_t * opts) return -1; } HDprintf("dataset rank %d, dimensions %llu x %llu x %llu\n", - rank, (unsigned long long)(dims[0]), (unsigned long long)(dims[1]), + rank, (unsigned long long)(dims[0]), (unsigned long long)(dims[1]), (unsigned long long)(dims[2])); /* verify that file space dims are as expected and are consistent with memory space dims */ if (dims[0] != 0 || dims[1] != memdims[1] || dims[2] != memdims[2]) { HDfprintf(stderr, "dataset is not empty. Got dims=(%llu,%llu,%llu)\n", - (unsigned long long)dims[0], (unsigned long long)dims[1], + (unsigned long long)dims[0], (unsigned long long)dims[1], (unsigned long long)dims[2]); return -1; } @@ -529,7 +529,7 @@ read_uc_file(hbool_t towait, options_t * opts) HDprintf("\n"); loops_waiting_for_plane=0; } - HDprintf("reading planes %llu to %llu\n", (unsigned long long)nplanes_seen, + HDprintf("reading planes %llu to %llu\n", (unsigned long long)nplanes_seen, (unsigned long long)dims[0]); } else { @@ -579,7 +579,7 @@ read_uc_file(hbool_t towait, options_t * opts) if (++nerrs < ErrorReportMax) { HDfprintf(stderr, "found error %llu plane(%llu,%llu), expected %llu, got %d\n", - (unsigned long long)nplane, (unsigned long long)j, + (unsigned long long)nplane, (unsigned long long)j, (unsigned long long)k, (unsigned long long)nplane, (int)*(bufptr-1)); } /* end if should print error */ } /* end if value mismatch */ @@ -587,7 +587,7 @@ read_uc_file(hbool_t towait, options_t * opts) } /* end for plane first dimension */ if (nerrs) { nreadererr++; - HDfprintf(stderr, "found %d unexpected values in plane %llu\n", nerrs, + HDfprintf(stderr, "found %d unexpected values in plane %llu\n", nerrs, (unsigned long long)nplane); } } /* end for each plane added since last read */ @@ -618,7 +618,7 @@ test_api(test_api_config_t config, hid_t fapl, H5F_libver_t low) TEST_ERROR /* Get examination DCPL */ - if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename, + if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename, (low >= H5F_LIBVER_V112)?(hsize_t)99:(low >= H5F_LIBVER_V110?174:213)) < 0) TEST_ERROR @@ -1026,7 +1026,7 @@ test_api(test_api_config_t config, hid_t fapl, H5F_libver_t low) } /* Get examination DCPL */ - if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename, + if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename, (low >= H5F_LIBVER_V112)?(hsize_t)607:(hsize_t)697) < 0) TEST_ERROR @@ -12221,9 +12221,9 @@ test_dapl_values(hid_t fapl_id) * * Purpose: Tests datasets with virtual layout * - * Note: + * Note: * Tests are modified to test with the low/high bounds combination - * set in fapl. + * set in fapl. * Please see RFC for "H5Sencode/H5Sdecode Format Change". * * Return: EXIT_SUCCESS/EXIT_FAILURE @@ -12273,7 +12273,7 @@ main(void) high_string = h5_get_version_string(high); HDsprintf(msg, "Testing virtual dataset with file version bounds: (%s, %s):", low_string, high_string); HDputs(msg); - + for(test_api_config = (int)TEST_API_BASIC; test_api_config < (int)TEST_API_NTESTS; test_api_config++) nerrors += test_api((test_api_config_t)test_api_config, my_fapl, low); for(bit_config = 0; bit_config < TEST_IO_NTESTS; bit_config++) { diff --git a/test/vds_swmr_writer.c b/test/vds_swmr_writer.c index d62ecaf..d70352d 100644 --- a/test/vds_swmr_writer.c +++ b/test/vds_swmr_writer.c @@ -43,7 +43,7 @@ main(int argc, char *argv[]) ******************************/ /* The file number is passed on the command line. - * This is an integer index into the FILE_NAMES array. + * This is an integer index into the FILE_NAMES array. */ if(argc != 2) { HDfprintf(stderr, "ERROR: Must pass the source file number on the command line.\n"); @@ -919,11 +919,11 @@ test_basic_object_operation(void) TEST_ERROR; /* H5Oexists_by_name */ - if (H5Oexists_by_name(fid, NATIVE_VOL_TEST_GROUP_NAME, H5P_DEFAULT) != TRUE) + if (H5Oexists_by_name(fid, NATIVE_VOL_TEST_GROUP_NAME, H5P_DEFAULT) != TRUE) TEST_ERROR; /* H5Oopen/close */ - if ((oid = H5Oopen(fid, NATIVE_VOL_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) + if ((oid = H5Oopen(fid, NATIVE_VOL_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) TEST_ERROR; if (H5Oclose(oid) < 0) TEST_ERROR; |