diff options
Diffstat (limited to 'test/cache_api.c')
-rw-r--r-- | test/cache_api.c | 140 |
1 files changed, 10 insertions, 130 deletions
diff --git a/test/cache_api.c b/test/cache_api.c index ad5c823..796e303 100644 --- a/test/cache_api.c +++ b/test/cache_api.c @@ -27,11 +27,6 @@ /* global variable declarations: */ -const char *FILENAME[] = { - "cache_api", - NULL -}; - /* macro definitions */ #define RESIZE_CONFIGS_ARE_EQUAL(a, b, compare_init) \ @@ -331,7 +326,7 @@ check_fapl_mdc_api_calls(void) /* setup the file name */ if ( pass ) { - if ( h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename)) + if ( h5_fixname(FILENAME[1], H5P_DEFAULT, filename, sizeof(filename)) == NULL ) { pass = FALSE; @@ -354,7 +349,7 @@ check_fapl_mdc_api_calls(void) /* get a pointer to the files internal data structure */ if ( pass ) { - file_ptr = H5I_object_verify(file_id, H5I_FILE); + file_ptr = (H5F_t *)H5I_object_verify(file_id, H5I_FILE); if ( file_ptr == NULL ) { @@ -480,7 +475,7 @@ check_fapl_mdc_api_calls(void) /* setup the file name */ if ( pass ) { - if ( h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename)) + if ( h5_fixname(FILENAME[1], H5P_DEFAULT, filename, sizeof(filename)) == NULL ) { pass = FALSE; @@ -503,7 +498,7 @@ check_fapl_mdc_api_calls(void) /* get a pointer to the files internal data structure */ if ( pass ) { - file_ptr = H5I_object_verify(file_id, H5I_FILE); + file_ptr = (H5F_t *)H5I_object_verify(file_id, H5I_FILE); if ( file_ptr == NULL ) { @@ -651,7 +646,7 @@ validate_mdc_config(hid_t file_id, /* get a pointer to the files internal data structure */ if ( pass ) { - file_ptr = H5I_object_verify(file_id, H5I_FILE); + file_ptr = (H5F_t *)H5I_object_verify(file_id, H5I_FILE); if ( file_ptr == NULL ) { @@ -919,7 +914,7 @@ check_file_mdc_api_calls(void) /* setup the file name */ if ( pass ) { - if ( h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename)) + if ( h5_fixname(FILENAME[1], H5P_DEFAULT, filename, sizeof(filename)) == NULL ) { pass = FALSE; @@ -1123,7 +1118,7 @@ check_and_validate_cache_hit_rate(hid_t file_id, /* get a pointer to the files internal data structure */ if ( pass ) { - file_ptr = H5I_object_verify(file_id, H5I_FILE); + file_ptr = (H5F_t *)H5I_object_verify(file_id, H5I_FILE); if ( file_ptr == NULL ) { @@ -1262,7 +1257,7 @@ check_and_validate_cache_size(hid_t file_id, /* get a pointer to the files internal data structure */ if ( pass ) { - file_ptr = H5I_object_verify(file_id, H5I_FILE); + file_ptr = (H5F_t *)H5I_object_verify(file_id, H5I_FILE); if ( file_ptr == NULL ) { @@ -1381,7 +1376,6 @@ mdc_api_call_smoke_check(int express_test) const char * fcn_name = "mdc_api_call_smoke_check()"; char filename[512]; hbool_t valid_chunk; - hbool_t report_progress = FALSE; hbool_t dump_hit_rate = FALSE; int64_t min_accesses = 1000; double min_hit_rate = 0.90; @@ -1524,16 +1518,9 @@ mdc_api_call_smoke_check(int express_test) */ /* setup the file name */ - - if ( ( pass ) && ( report_progress ) ) { - - HDfprintf(stdout,"\nSetting up file ... "); - HDfflush(stdout); - } - if ( pass ) { - if ( h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename)) + if ( h5_fixname(FILENAME[1], H5P_DEFAULT, filename, sizeof(filename)) == NULL ) { pass = FALSE; @@ -1569,21 +1556,7 @@ mdc_api_call_smoke_check(int express_test) /* verify that the cache is now set to the alternate config */ validate_mdc_config(file_id, &mod_config_1, TRUE, 2); - if ( ( pass ) && ( report_progress ) ) { - - HDfprintf(stdout,"Done.\n"); /* setting up file */ - HDfflush(stdout); - } - - /* create the datasets */ - - if ( ( pass ) && ( report_progress ) ) { - - HDfprintf(stdout,"Creating datasets ... "); - HDfflush(stdout); - } - if ( pass ) { i = 0; @@ -1688,22 +1661,10 @@ mdc_api_call_smoke_check(int express_test) } } - if ( ( pass ) && ( report_progress ) ) { - - HDfprintf(stdout,"Done.\n"); - HDfflush(stdout); - } - /* initialize all datasets on a round robin basis */ i = 0; progress_counter = 0; - if ( ( pass ) && ( report_progress ) ) { - - HDfprintf(stdout, "Initializing datasets "); - HDfflush(stdout); - } - while ( ( pass ) && ( i < DSET_SIZE ) ) { j = 0; @@ -1770,23 +1731,6 @@ mdc_api_call_smoke_check(int express_test) i += CHUNK_SIZE; - if ( ( pass ) && ( report_progress ) ) { - - progress_counter += CHUNK_SIZE; - - if ( progress_counter >= DSET_SIZE / 20 ) { - - progress_counter = 0; - HDfprintf(stdout, "."); - HDfflush(stdout); - } - } - } - - if ( ( pass ) && ( report_progress ) ) { - - HDfprintf(stdout," Done.\n"); /* initializing data sets */ - HDfflush(stdout); } /* set alternate config 2 */ @@ -1803,13 +1747,6 @@ mdc_api_call_smoke_check(int express_test) validate_mdc_config(file_id, &mod_config_2, TRUE, 3); /* do random reads on all datasets */ - - if ( ( pass ) && ( report_progress ) ) { - - HDfprintf(stdout, "Doing random reads on all datasets "); - HDfflush(stdout); - } - n = 0; progress_counter = 0; while ( ( pass ) && ( n < NUM_RANDOM_ACCESSES ) ) @@ -1895,26 +1832,8 @@ mdc_api_call_smoke_check(int express_test) n++; - if ( ( pass ) && ( report_progress ) ) { - - progress_counter++; - - if ( progress_counter >= NUM_RANDOM_ACCESSES / 20 ) { - - progress_counter = 0; - HDfprintf(stdout, "."); - HDfflush(stdout); - } - } - } - - if ( ( pass ) && ( report_progress ) ) { - - HDfprintf(stdout, " Done.\n"); /* random reads on all data sets */ - HDfflush(stdout); } - /* close the file spaces we are done with */ i = 1; while ( ( pass ) && ( i < NUM_DSETS ) ) @@ -1954,13 +1873,6 @@ mdc_api_call_smoke_check(int express_test) validate_mdc_config(file_id, &mod_config_3, TRUE, 4); /* do random reads on data set 0 only */ - - if ( ( pass ) && ( report_progress ) ) { - - HDfprintf(stdout, "Doing random reads on dataset 0 "); - HDfflush(stdout); - } - m = 0; n = 0; progress_counter = 0; @@ -2042,33 +1954,8 @@ mdc_api_call_smoke_check(int express_test) n++; - if ( ( pass ) && ( report_progress ) ) { - - progress_counter++; - - if ( progress_counter >= NUM_RANDOM_ACCESSES / 20 ) { - - progress_counter = 0; - HDfprintf(stdout, "."); - HDfflush(stdout); - } - } - } - - if ( ( pass ) && ( report_progress ) ) { - - HDfprintf(stdout, " Done.\n"); /* random reads data set 0 */ - HDfflush(stdout); - } - - - if ( ( pass ) && ( report_progress ) ) { - - HDfprintf(stdout,"Shutting down ... "); - HDfflush(stdout); } - /* close file space 0 */ if ( pass ) { @@ -2125,13 +2012,6 @@ mdc_api_call_smoke_check(int express_test) } } - if ( ( pass ) && ( report_progress ) ) { - - HDfprintf(stdout,"Done.\n"); /* shutting down */ - HDfflush(stdout); - } - - if ( pass ) { PASSED(); } else { H5_FAILED(); } if ( ! pass ) @@ -3724,7 +3604,7 @@ check_file_mdc_api_errs(void) HDfprintf(stdout, "%s: calling h5_fixname().\n", fcn_name); } - if ( h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename)) + if ( h5_fixname(FILENAME[1], H5P_DEFAULT, filename, sizeof(filename)) == NULL ) { pass = FALSE; |