diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/API/testhdf5.h | 12 | ||||
-rw-r--r-- | test/API/tmisc.c | 26 | ||||
-rw-r--r-- | test/big.c | 18 | ||||
-rw-r--r-- | test/cmpd_dset.c | 2 | ||||
-rw-r--r-- | test/direct_chunk.c | 2 | ||||
-rw-r--r-- | test/dt_arith.c | 38 | ||||
-rw-r--r-- | test/dtypes.c | 6 | ||||
-rw-r--r-- | test/err_compat.c | 4 | ||||
-rw-r--r-- | test/external.c | 4 | ||||
-rw-r--r-- | test/flush1.c | 4 | ||||
-rw-r--r-- | test/flushrefresh.c | 10 | ||||
-rw-r--r-- | test/h5test.c | 40 | ||||
-rw-r--r-- | test/h5test.h | 14 | ||||
-rw-r--r-- | test/hdfs.c | 18 | ||||
-rw-r--r-- | test/hyperslab.c | 14 | ||||
-rw-r--r-- | test/mirror_vfd.c | 2 | ||||
-rw-r--r-- | test/objcopy.c | 2 | ||||
-rw-r--r-- | test/onion.c | 14 | ||||
-rw-r--r-- | test/ros3.c | 28 | ||||
-rw-r--r-- | test/s3comms.c | 8 | ||||
-rw-r--r-- | test/swmr_reader.c | 2 | ||||
-rw-r--r-- | test/swmr_start_write.c | 2 | ||||
-rw-r--r-- | test/swmr_writer.c | 2 | ||||
-rw-r--r-- | test/testmeta.c | 2 | ||||
-rw-r--r-- | test/tmisc.c | 26 | ||||
-rw-r--r-- | test/twriteorder.c | 2 | ||||
-rw-r--r-- | test/vfd.c | 12 |
27 files changed, 157 insertions, 157 deletions
diff --git a/test/API/testhdf5.h b/test/API/testhdf5.h index e4aaacd..bfcf320 100644 --- a/test/API/testhdf5.h +++ b/test/API/testhdf5.h @@ -211,32 +211,32 @@ #define TESTING(WHAT) \ { \ printf("Testing %-62s", WHAT); \ - HDfflush(stdout); \ + fflush(stdout); \ } #define TESTING_2(WHAT) \ { \ printf(" Testing %-60s", WHAT); \ - HDfflush(stdout); \ + fflush(stdout); \ } #define PASSED() \ { \ HDputs(" PASSED"); \ - HDfflush(stdout); \ + fflush(stdout); \ } #define H5_FAILED() \ { \ HDputs("*FAILED*"); \ - HDfflush(stdout); \ + fflush(stdout); \ } #define H5_WARNING() \ { \ HDputs("*WARNING*"); \ - HDfflush(stdout); \ + fflush(stdout); \ } #define SKIPPED() \ { \ HDputs(" -SKIP-"); \ - HDfflush(stdout); \ + fflush(stdout); \ } #define PUTS_ERROR(s) \ { \ diff --git a/test/API/tmisc.c b/test/API/tmisc.c index eb827a2..a7faae7 100644 --- a/test/API/tmisc.c +++ b/test/API/tmisc.c @@ -2397,35 +2397,35 @@ misc13_insert_user_block(const char *old_name, const char *new_name, const char HDmemcpy(user_block, str, HDstrlen(str)); /* Open the new file */ - new_fp = HDfopen(new_name, "wb"); - CHECK_PTR(new_fp, "HDfopen"); + new_fp = fopen(new_name, "wb"); + CHECK_PTR(new_fp, "fopen"); /* Write the user block to the new file */ - written = HDfwrite(user_block, (size_t)1, size, new_fp); - VERIFY(written, size, "HDfwrite"); + written = fwrite(user_block, (size_t)1, size, new_fp); + VERIFY(written, size, "fwrite"); /* Open the old file */ - old_fp = HDfopen(old_name, "rb"); - CHECK_PTR(old_fp, "HDfopen"); + old_fp = fopen(old_name, "rb"); + CHECK_PTR(old_fp, "fopen"); /* Allocate space for the copy buffer */ copy_buf = malloc((size_t)MISC13_COPY_BUF_SIZE); CHECK_PTR(copy_buf, "malloc"); /* Copy data from the old file to the new file */ - while ((read_in = HDfread(copy_buf, (size_t)1, (size_t)MISC13_COPY_BUF_SIZE, old_fp)) > 0) { + while ((read_in = fread(copy_buf, (size_t)1, (size_t)MISC13_COPY_BUF_SIZE, old_fp)) > 0) { /* Write the data to the new file */ - written = HDfwrite(copy_buf, (size_t)1, read_in, new_fp); - VERIFY(written, read_in, "HDfwrite"); + written = fwrite(copy_buf, (size_t)1, read_in, new_fp); + VERIFY(written, read_in, "fwrite"); } /* Close the old file */ - ret = HDfclose(old_fp); - VERIFY(ret, 0, "HDfclose"); + ret = fclose(old_fp); + VERIFY(ret, 0, "fclose"); /* Close the new file */ - ret = HDfclose(new_fp); - VERIFY(ret, 0, "HDfclose"); + ret = fclose(new_fp); + VERIFY(ret, 0, "fclose"); /* Free the copy buffer */ free(copy_buf); @@ -324,7 +324,7 @@ writer(char *filename, hid_t fapl, fsizes_t testsize, int wrt_n) hid_t file = -1, space1 = -1, space2 = -1, mem_space = -1, d1 = -1, d2 = -1; int *buf = (int *)malloc(sizeof(int) * WRT_SIZE); int i, j; - FILE *out = HDfopen(DNAME, "w"); + FILE *out = fopen(DNAME, "w"); hid_t dcpl; switch (testsize) { @@ -427,7 +427,7 @@ writer(char *filename, hid_t fapl, fsizes_t testsize, int wrt_n) if (H5Fclose(file) < 0) goto error; free(buf); - HDfclose(out); + fclose(out); PASSED(); return 0; @@ -445,7 +445,7 @@ error: if (buf) free(buf); if (out) - HDfclose(out); + fclose(out); return 1; } @@ -475,7 +475,7 @@ reader(char *filename, hid_t fapl) int i, j, zero, wrong, nerrors = 0; /* Open script file */ - script = HDfopen(DNAME, "r"); + script = fopen(DNAME, "r"); /* Open HDF5 file */ if ((file = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0) @@ -498,7 +498,7 @@ reader(char *filename, hid_t fapl) i = (int)strtol(ln + 1, &s, 10); hs_offset[0] = strtoull(s, NULL, 0); fprintf(stdout, "#%03d 0x%016" PRIxHSIZE "%47s", i, hs_offset[0], ""); - HDfflush(stdout); + fflush(stdout); if (H5Sselect_hyperslab(fspace, H5S_SELECT_SET, hs_offset, NULL, hs_size, NULL) < 0) FAIL_STACK_ERROR; @@ -535,7 +535,7 @@ reader(char *filename, hid_t fapl) if (H5Fclose(file) < 0) FAIL_STACK_ERROR; free(buf); - HDfclose(script); + fclose(script); return nerrors; @@ -551,7 +551,7 @@ error: if (buf) free(buf); if (script) - HDfclose(script); + fclose(script); return 1; } @@ -649,12 +649,12 @@ quit: /* Clean up the test file */ h5_clean_files(FILENAME, fapl); HDremove(DNAME); - HDfflush(stdout); + fflush(stdout); return 0; error: HDputs("*** TEST FAILED ***"); - HDfflush(stdout); + fflush(stdout); return 1; } /* end test_stdio() */ diff --git a/test/cmpd_dset.c b/test/cmpd_dset.c index 0c7f77c..e97bb3b 100644 --- a/test/cmpd_dset.c +++ b/test/cmpd_dset.c @@ -1669,7 +1669,7 @@ error: for (_i = 0; _i < PACK_NMEMBS; _i++) \ printf(" %d", order[_i]); \ printf("\n Inner compound order = %d, location = %d\n", sub_cmpd_order, order[sub_cmpd_order]); \ - HDfflush(stdout); \ + fflush(stdout); \ goto error; \ } diff --git a/test/direct_chunk.c b/test/direct_chunk.c index 6bf1202..bdcd9f6 100644 --- a/test/direct_chunk.c +++ b/test/direct_chunk.c @@ -2333,7 +2333,7 @@ main(void) need_comma = TRUE; } /* end if */ printf(":\n"); - HDfflush(stdout); + fflush(stdout); nerrors += test_single_chunk(config); } /* end for */ diff --git a/test/dt_arith.c b/test/dt_arith.c index 9da4118..3a14817 100644 --- a/test/dt_arith.c +++ b/test/dt_arith.c @@ -758,7 +758,7 @@ test_particular_fp_integer(void) return 0; error: - HDfflush(stdout); + fflush(stdout); H5E_BEGIN_TRY { H5Pclose(dxpl_id); @@ -977,7 +977,7 @@ test_derived_flt(void) HDsnprintf(str, sizeof(str), "\nTesting random sw derived floating-point -> derived floating-point conversions"); printf("%-70s", str); - HDfflush(stdout); + fflush(stdout); H5_FAILED(); } printf(" test %u elmt %u: \n", 1, (unsigned)i); @@ -1146,7 +1146,7 @@ test_derived_flt(void) HDsnprintf(str, sizeof(str), "\nTesting random sw derived floating-point -> derived floating-point conversions"); printf("%-70s", str); - HDfflush(stdout); + fflush(stdout); H5_FAILED(); } printf(" test %u elmt %u: \n", 1, (unsigned)i); @@ -1212,7 +1212,7 @@ error: free(saved_buf); if (aligned) free(aligned); - HDfflush(stdout); + fflush(stdout); H5E_BEGIN_TRY { H5Tclose(tid1); @@ -1462,7 +1462,7 @@ test_derived_integer(void) HDsnprintf(str, sizeof(str), "\nTesting random sw derived integer -> derived integer conversions"); printf("%-70s", str); - HDfflush(stdout); + fflush(stdout); H5_FAILED(); } printf(" test %u elmt %u: \n", 1, (unsigned)i); @@ -1524,7 +1524,7 @@ error: free(buf); if (saved_buf) free(saved_buf); - HDfflush(stdout); + fflush(stdout); H5E_BEGIN_TRY { H5Tclose(tid1); @@ -1700,7 +1700,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) else { HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name); printf("%-70s", str); - HDfflush(stdout); + fflush(stdout); fails_this_test = 0; } @@ -2573,7 +2573,7 @@ done: aligned_free(saved); if (aligned) free(aligned); - HDfflush(stdout); + fflush(stdout); /* Restore the default error handler (set in h5_reset()) */ h5_restore_err(); @@ -2589,7 +2589,7 @@ error: aligned_free(saved); if (aligned) free(aligned); - HDfflush(stdout); + fflush(stdout); /* Restore the default error handler (set in h5_reset()) */ h5_restore_err(); @@ -2622,7 +2622,7 @@ test_conv_int_2(void) char *buf; printf("%-70s", "Testing overlap calculations"); - HDfflush(stdout); + fflush(stdout); buf = (char *)calloc(TMP_BUF_DIM1, TMP_BUF_DIM2); assert(buf); @@ -2822,8 +2822,8 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst) * fork here and let the child run the test and return the number of * failures with the exit status. */ - HDfflush(stdout); - HDfflush(stderr); + fflush(stdout); + fflush(stderr); if ((child_pid = fork()) < 0) { HDperror("fork"); return 1; @@ -2931,7 +2931,7 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst) dst_type_name); printf("%-70s", str); - HDfflush(stdout); + fflush(stdout); fails_this_test = 0; } @@ -3302,7 +3302,7 @@ done: aligned_free(saved); if (aligned) free(aligned); - HDfflush(stdout); + fflush(stdout); #ifdef HANDLE_SIGFPE if (run_test == TEST_NOOP || run_test == TEST_NORMAL) exit(MIN((int)fails_all_tests, 254)); @@ -3331,7 +3331,7 @@ error: aligned_free(saved); if (aligned) free(aligned); - HDfflush(stdout); + fflush(stdout); #ifdef HANDLE_SIGFPE if (run_test == TEST_NOOP || run_test == TEST_NORMAL) exit(MIN(MAX((int)fails_all_tests, 1), 254)); @@ -3572,7 +3572,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) INT_LLONG == src_type || INT_ULLONG == src_type) { HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name); printf("%-70s", str); - HDfflush(stdout); + fflush(stdout); fails_this_test = 0; } else { @@ -3586,7 +3586,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) HDsnprintf(str, sizeof(str), "Testing %s special %s -> %s conversions", name, src_type_name, dst_type_name); printf("%-70s", str); - HDfflush(stdout); + fflush(stdout); fails_this_test = 0; } @@ -4522,7 +4522,7 @@ done: aligned_free(saved); if (aligned) free(aligned); - HDfflush(stdout); + fflush(stdout); /* Restore the default error handler (set in h5_reset()) */ h5_restore_err(); @@ -4542,7 +4542,7 @@ error: aligned_free(saved); if (aligned) free(aligned); - HDfflush(stdout); + fflush(stdout); /* Restore the default error handler (set in h5_reset()) */ h5_restore_err(); diff --git a/test/dtypes.c b/test/dtypes.c index 7d2b4ef..3fd66e1 100644 --- a/test/dtypes.c +++ b/test/dtypes.c @@ -5071,7 +5071,7 @@ test_conv_str_2(void) /* Do the conversions */ HDsnprintf(s, sizeof(s), "Testing random string conversion speed"); printf("%-70s", s); - HDfflush(stdout); + fflush(stdout); if (H5Tconvert(c_type, f_type, nelmts, buf, NULL, H5P_DEFAULT) < 0) goto error; if (H5Tconvert(f_type, c_type, nelmts, buf, NULL, H5P_DEFAULT) < 0) @@ -5285,14 +5285,14 @@ test_conv_enum_1(void) /* Conversions */ HDsnprintf(s, sizeof(s), "Testing random enum conversion O(N)"); printf("%-70s", s); - HDfflush(stdout); + fflush(stdout); if (H5Tconvert(t1, t2, nelmts, buf, NULL, H5P_DEFAULT) < 0) goto error; PASSED(); HDsnprintf(s, sizeof(s), "Testing random enum conversion O(N log N)"); printf("%-70s", s); - HDfflush(stdout); + fflush(stdout); if (H5Tconvert(t2, t1, nelmts, buf, NULL, H5P_DEFAULT) < 0) goto error; PASSED(); diff --git a/test/err_compat.c b/test/err_compat.c index 5f6378f..155abc6 100644 --- a/test/err_compat.c +++ b/test/err_compat.c @@ -219,7 +219,7 @@ test_error_compat(void) /* Add a newline and flush so the output file looks nicer */ printf("\n"); - HDfflush(stdout); + fflush(stdout); /* Create the dataspace */ dims[0] = DIM0; @@ -352,7 +352,7 @@ test_h5epush1(hid_t file) /* Add a newline and flush so the output file looks nicer */ printf("\n"); - HDfflush(stdout); + fflush(stdout); /* Create the dataspace */ dims[0] = DIM0; diff --git a/test/external.c b/test/external.c index 5412469..41e759c 100644 --- a/test/external.c +++ b/test/external.c @@ -483,12 +483,12 @@ add_external_files(hid_t dcpl_id, unsigned int n_external_files, off_t offset, h for (i = 0; i < n_external_files; i++) { if (HDsnprintf(exname, AEF_EXNAME_MAX_LEN, "ext%d.data", i + 1) > AEF_EXNAME_MAX_LEN) { fprintf(stderr, "External file %d overflows name buffer\n", i + 1); - HDfflush(stderr); + fflush(stderr); return -1; } if (H5Pset_external(dcpl_id, exname, offset, max_ext_size) < 0) { fprintf(stderr, "Problem adding external file %s\n", exname); - HDfflush(stderr); + fflush(stderr); return -1; } } diff --git a/test/flush1.c b/test/flush1.c index 575031c..81d0b7d 100644 --- a/test/flush1.c +++ b/test/flush1.c @@ -315,8 +315,8 @@ main(void) printf("NOTE: Some tests were skipped since the current VFD lacks SWMR support\n"); /* Flush console output streams */ - HDfflush(stdout); - HDfflush(stderr); + fflush(stdout); + fflush(stderr); /* DO NOT CLOSE FILE ID! */ if (H5Pclose(fapl_id) < 0) diff --git a/test/flushrefresh.c b/test/flushrefresh.c index a2a284c..e044c56 100644 --- a/test/flushrefresh.c +++ b/test/flushrefresh.c @@ -70,10 +70,10 @@ static FILE *errorfile; #define ERRFILE "flushrefresh_ERROR" #define PROCESS_ERROR \ { \ - errorfile = HDfopen(ERRFILE, "w+"); \ + errorfile = fopen(ERRFILE, "w+"); \ fprintf(errorfile, "Error occurred in flushrefresh.\n"); \ - HDfflush(errorfile); \ - HDfclose(errorfile); \ + fflush(errorfile); \ + fclose(errorfile); \ TEST_ERROR; \ } @@ -1385,8 +1385,8 @@ check_for_errors(void) { FILE *file; - if ((file = HDfopen(ERRFILE, "r"))) { - HDfclose(file); + if ((file = fopen(ERRFILE, "r"))) { + fclose(file); HDremove(ERRFILE); return FAIL; } /* end if */ diff --git a/test/h5test.c b/test/h5test.c index d7a4116..4a47f99 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -330,8 +330,8 @@ h5_restore_err(void) void h5_reset(void) { - HDfflush(stdout); - HDfflush(stderr); + fflush(stdout); + fflush(stderr); H5close(); /* Save current error stack reporting routine and redirect to our local one */ @@ -360,8 +360,8 @@ h5_reset(void) void h5_test_init(void) { - HDfflush(stdout); - HDfflush(stderr); + fflush(stdout); + fflush(stderr); H5close(); /* Save current error stack reporting routine and redirect to our local one */ @@ -1595,7 +1595,7 @@ h5_send_message(const char *send, const char *arg1, const char *arg2) FILE *signalfile = NULL; /* Create signal file (which will send signal to some other process) */ - signalfile = HDfopen(TMP_SIGNAL_FILE, "w+"); + signalfile = fopen(TMP_SIGNAL_FILE, "w+"); /* Write messages to signal file, if provided */ if (arg2 != NULL) { @@ -1611,7 +1611,7 @@ h5_send_message(const char *send, const char *arg1, const char *arg2) assert(arg2 == NULL); } /* end else */ - HDfclose(signalfile); + fclose(signalfile); HDrename(TMP_SIGNAL_FILE, send); } /* h5_send_message() */ @@ -1655,7 +1655,7 @@ h5_wait_message(const char *waitfor) HDtime(&t0); /* Wait for return signal from some other process */ - while ((returnfile = HDfopen(waitfor, "r")) == NULL) { + while ((returnfile = fopen(waitfor, "r")) == NULL) { /* make note of current time. */ HDtime(&t1); @@ -1669,7 +1669,7 @@ h5_wait_message(const char *waitfor) } /* end if */ } /* end while */ - HDfclose(returnfile); + fclose(returnfile); HDunlink(waitfor); return SUCCEED; @@ -1905,13 +1905,13 @@ h5_compare_file_bytes(char *f1name, char *f2name) int ret_value = 0; /* for error handling */ /* Open files for reading */ - f1ptr = HDfopen(f1name, "rb"); + f1ptr = fopen(f1name, "rb"); if (f1ptr == NULL) { fprintf(stderr, "Unable to fopen() %s\n", f1name); ret_value = -1; goto done; } - f2ptr = HDfopen(f2name, "rb"); + f2ptr = fopen(f2name, "rb"); if (f2ptr == NULL) { fprintf(stderr, "Unable to fopen() %s\n", f2name); ret_value = -1; @@ -1936,11 +1936,11 @@ h5_compare_file_bytes(char *f1name, char *f2name) HDrewind(f1ptr); HDrewind(f2ptr); for (ii = 0; ii < f1size; ii++) { - if (HDfread(&f1char, 1, 1, f1ptr) != 1) { + if (fread(&f1char, 1, 1, f1ptr) != 1) { ret_value = -1; goto done; } - if (HDfread(&f2char, 1, 1, f2ptr) != 1) { + if (fread(&f2char, 1, 1, f2ptr) != 1) { ret_value = -1; goto done; } @@ -1953,9 +1953,9 @@ h5_compare_file_bytes(char *f1name, char *f2name) done: if (f1ptr) - HDfclose(f1ptr); + fclose(f1ptr); if (f2ptr) - HDfclose(f2ptr); + fclose(f2ptr); return ret_value; } /* end h5_compare_file_bytes() */ @@ -2045,7 +2045,7 @@ h5_duplicate_file_by_bytes(const char *orig, const char *dest) max_buf = 4096 * sizeof(char); - orig_ptr = HDfopen(orig, "rb"); + orig_ptr = fopen(orig, "rb"); if (NULL == orig_ptr) { ret_value = -1; goto done; @@ -2055,7 +2055,7 @@ h5_duplicate_file_by_bytes(const char *orig, const char *dest) fsize = (hsize_t)HDftell(orig_ptr); HDrewind(orig_ptr); - dest_ptr = HDfopen(dest, "wb"); + dest_ptr = fopen(dest, "wb"); if (NULL == dest_ptr) { ret_value = -1; goto done; @@ -2069,20 +2069,20 @@ h5_duplicate_file_by_bytes(const char *orig, const char *dest) } while (read_size > 0) { - if (HDfread(dup_buf, read_size, 1, orig_ptr) != 1) { + if (fread(dup_buf, read_size, 1, orig_ptr) != 1) { ret_value = -1; goto done; } - HDfwrite(dup_buf, read_size, 1, dest_ptr); + fwrite(dup_buf, read_size, 1, dest_ptr); fsize -= read_size; read_size = MIN(fsize, max_buf); } done: if (orig_ptr != NULL) - HDfclose(orig_ptr); + fclose(orig_ptr); if (dest_ptr != NULL) - HDfclose(dest_ptr); + fclose(dest_ptr); if (dup_buf != NULL) free(dup_buf); return ret_value; diff --git a/test/h5test.h b/test/h5test.h index 3382eb4..ce6a0ea 100644 --- a/test/h5test.h +++ b/test/h5test.h @@ -105,36 +105,36 @@ H5TEST_DLLVAR MPI_Info h5_io_info_g; /* MPI INFO object for IO */ #define TESTING(WHAT) \ do { \ printf("Testing %-62s", WHAT); \ - HDfflush(stdout); \ + fflush(stdout); \ n_tests_run_g++; \ } while (0) #define TESTING_2(WHAT) \ do { \ printf(" Testing %-60s", WHAT); \ - HDfflush(stdout); \ + fflush(stdout); \ n_tests_run_g++; \ } while (0) #define PASSED() \ do { \ HDputs(" PASSED"); \ - HDfflush(stdout); \ + fflush(stdout); \ n_tests_passed_g++; \ } while (0) #define H5_FAILED() \ do { \ HDputs("*FAILED*"); \ - HDfflush(stdout); \ + fflush(stdout); \ n_tests_failed_g++; \ } while (0) #define H5_WARNING() \ do { \ HDputs("*WARNING*"); \ - HDfflush(stdout); \ + fflush(stdout); \ } while (0) #define SKIPPED() \ do { \ HDputs(" -SKIP-"); \ - HDfflush(stdout); \ + fflush(stdout); \ n_tests_skipped_g++; \ } while (0) #define PUTS_ERROR(s) \ @@ -176,7 +176,7 @@ H5TEST_DLLVAR MPI_Info h5_io_info_g; /* MPI INFO object for IO */ do { \ printf("Testing %-62s", WHAT); \ HDputs(""); \ - HDfflush(stdout); \ + fflush(stdout); \ } while (0) /* diff --git a/test/hdfs.c b/test/hdfs.c index c5704a1..bf9e432 100644 --- a/test/hdfs.c +++ b/test/hdfs.c @@ -413,7 +413,7 @@ test_fapl_config_validation(void) TESTING("HDFS fapl configuration validation"); SKIPPED(); HDputs(" HDFS VFD is not enabled"); - HDfflush(stdout); + fflush(stdout); return 0; #else @@ -621,7 +621,7 @@ test_hdfs_fapl(void) TESTING("HDFS fapl "); SKIPPED(); HDputs(" HDFS VFD is not enabled"); - HDfflush(stdout); + fflush(stdout); return 0; #else @@ -707,7 +707,7 @@ test_vfd_open(void) TESTING("HDFS VFD-level open"); SKIPPED(); HDputs(" HDFS VFD is not enabled"); - HDfflush(stdout); + fflush(stdout); return 0; #else @@ -963,7 +963,7 @@ test_eof_eoa(void) TESTING("HDFS eof/eoa gets and sets"); SKIPPED(); HDputs(" HDFS VFD is not enabled"); - HDfflush(stdout); + fflush(stdout); return 0; #else @@ -1076,7 +1076,7 @@ test_H5FDread_without_eoa_set_fails(void) TESTING("HDFS VFD read-eoa temporal coupling library limitation"); SKIPPED(); HDputs(" HDFS VFD is not enabled"); - HDfflush(stdout); + fflush(stdout); return 0; #else @@ -1178,7 +1178,7 @@ test_read(void) TESTING("HDFS VFD read/range-gets"); SKIPPED(); HDputs(" HDFS VFD is not enabled"); - HDfflush(stdout); + fflush(stdout); return 0; #else @@ -1388,7 +1388,7 @@ test_noops_and_autofails(void) TESTING("HDFS VFD always-fail and no-op routines"); SKIPPED(); HDputs(" HDFS VFD is not enabled"); - HDfflush(stdout); + fflush(stdout); return 0; #else @@ -1530,7 +1530,7 @@ test_H5F_integration(void) TESTING("HDFS file access through HD5F library (H5F API)"); SKIPPED(); HDputs(" HDFS VFD is not enabled"); - HDfflush(stdout); + fflush(stdout); return 0; #else @@ -1597,7 +1597,7 @@ error: #if HDFS_TEST_DEBUG printf("\nerror!"); - HDfflush(stdout); + fflush(stdout); #endif /* HDFS_TEST_DEBUG */ if (fapl_id >= 0) { diff --git a/test/hyperslab.c b/test/hyperslab.c index 82baee3..6712f5b 100644 --- a/test/hyperslab.c +++ b/test/hyperslab.c @@ -174,7 +174,7 @@ test_fill(size_t nx, size_t ny, size_t nz, size_t di, size_t dj, size_t dk, size } /* end else */ HDsnprintf(s, sizeof(s), "Testing hyperslab fill %-11s variable hyperslab", dim); printf("%-70s", s); - HDfflush(stdout); + fflush(stdout); /* Allocate array */ if (NULL == (dst = (uint8_t *)calloc((size_t)1, nx * ny * nz))) @@ -363,7 +363,7 @@ test_copy(int mode, size_t nx, size_t ny, size_t nz, size_t di, size_t dj, size_ HDsnprintf(s, sizeof(s), "Testing hyperslab copy %-11s %s", dim, sub); printf("%-70s", s); - HDfflush(stdout); + fflush(stdout); /* * Allocate arrays @@ -572,7 +572,7 @@ test_multifill(size_t nx) hsize_t i, j; printf("%-70s", "Testing multi-byte fill value"); - HDfflush(stdout); + fflush(stdout); /* Initialize the source and destination */ if (NULL == (src = (struct a_struct *)malloc(nx * sizeof(*src)))) @@ -684,7 +684,7 @@ test_endian(size_t nx) hsize_t i, j; printf("%-70s", "Testing endian conversion by stride"); - HDfflush(stdout); + fflush(stdout); /* Initialize arrays */ if (NULL == (src = (uint8_t *)malloc(nx * 4))) @@ -771,7 +771,7 @@ test_transpose(size_t nx, size_t ny) HDsnprintf(s, sizeof(s), "Testing 2d transpose by stride %4lux%-lud", (unsigned long)nx, (unsigned long)ny); printf("%-70s", s); - HDfflush(stdout); + fflush(stdout); /* Initialize */ if (NULL == (src = (int *)malloc(nx * ny * sizeof(*src)))) @@ -870,7 +870,7 @@ test_sub_super(size_t nx, size_t ny) HDsnprintf(s, sizeof(s), "Testing image sampling %4lux%-4lu to %4lux%-4lu ", (unsigned long)(2 * nx), (unsigned long)(2 * ny), (unsigned long)nx, (unsigned long)ny); printf("%-70s", s); - HDfflush(stdout); + fflush(stdout); /* Initialize */ if (NULL == (full = (uint8_t *)malloc(4 * nx * ny))) @@ -920,7 +920,7 @@ test_sub_super(size_t nx, size_t ny) HDsnprintf(s, sizeof(s), "Testing image sampling %4lux%-4lu to %4lux%-4lu ", (unsigned long)nx, (unsigned long)ny, (unsigned long)(2 * nx), (unsigned long)(2 * ny)); printf("%-70s", s); - HDfflush(stdout); + fflush(stdout); /* Setup stride */ size[0] = nx; diff --git a/test/mirror_vfd.c b/test/mirror_vfd.c index f0f88f9..e738364 100644 --- a/test/mirror_vfd.c +++ b/test/mirror_vfd.c @@ -64,7 +64,7 @@ static unsigned int g_verbosity = DEFAULT_VERBOSITY; do { \ if ((lvl) <= g_verbosity) { \ fprintf(g_log_stream, __VA_ARGS__); \ - HDfflush(g_log_stream); \ + fflush(g_log_stream); \ } \ } while (0) diff --git a/test/objcopy.c b/test/objcopy.c index b0afc24..076e966 100644 --- a/test/objcopy.c +++ b/test/objcopy.c @@ -5271,7 +5271,7 @@ test_copy_dataset_external(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t buf[i] = i; /* create an empty external file */ - HDfclose(HDfopen(FILE_EXT, "w")); + fclose(fopen(FILE_EXT, "w")); /* Initialize the filenames */ h5_fixname(FILENAME[0], src_fapl, src_filename, sizeof src_filename); diff --git a/test/onion.c b/test/onion.c index ea59cd1..07dc2f7 100644 --- a/test/onion.c +++ b/test/onion.c @@ -2619,7 +2619,7 @@ do_onion_open_and_writes(const char *filename, H5FD_onion_fapl_info_t *onion_inf HDputs("i exp act"); for (z = 0; z < wi->size; z++) printf("%02zx %c %c\n", z, _buf[z], buf_vfy[z]); - HDfflush(stdout); + fflush(stdout); TEST_ERROR; } free(buf_vfy); @@ -2751,7 +2751,7 @@ test_page_aligned_history_create(void) for (k = 0; k < b_list_size_s; k++) { printf("%3zu:: %c : %c\n", k, (k < a_off) ? ' ' : a_list_s[k - a_off], buf[k]); } - HDfflush(stdout); + fflush(stdout); TEST_ERROR; } if (HDmemcmp(b_list_s, buf, a_off) != 0) { @@ -2761,7 +2761,7 @@ test_page_aligned_history_create(void) for (k = 0; k < b_list_size_s; k++) { printf("%3zu:: %c : %c\n", k, (k < a_off) ? b_list_s[k] : ' ', buf[k]); } - HDfflush(stdout); + fflush(stdout); TEST_ERROR; } if (H5FDclose(file) < 0) @@ -3067,7 +3067,7 @@ test_integration_create(void) int expected = i * j - j; if (rdata->arr[i][j] != expected) { printf("ERROR!!! Expected: %d, Got: %d\n", expected, rdata->arr[i][j]); - HDfflush(stdout); + fflush(stdout); TEST_ERROR; } } @@ -3105,7 +3105,7 @@ test_integration_create(void) int expected = i * 6 + j + 1; if (rdata->arr[i][j] != expected) { printf("ERROR!!! Expected: %d, Got: %d\n", expected, rdata->arr[i][j]); - HDfflush(stdout); + fflush(stdout); TEST_ERROR; } } @@ -3144,11 +3144,11 @@ test_integration_create(void) int expected = i * 3 + j + 5; if (rdata->arr[i][j] != expected) { printf("ERROR!!! Expected: %d, Got: %d\n", expected, rdata->arr[i][j]); - HDfflush(stdout); + fflush(stdout); TEST_ERROR; } else { - HDfflush(stdout); + fflush(stdout); } } } diff --git a/test/ros3.c b/test/ros3.c index 12ead60..95b7bf0 100644 --- a/test/ros3.c +++ b/test/ros3.c @@ -561,7 +561,7 @@ test_fapl_config_validation(void) if (FALSE == s3_test_bucket_defined) { SKIPPED(); HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined"); - HDfflush(stdout); + fflush(stdout); return 0; } @@ -842,7 +842,7 @@ test_vfd_open(void) if (FALSE == s3_test_bucket_defined) { SKIPPED(); HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined"); - HDfflush(stdout); + fflush(stdout); return 0; } @@ -985,14 +985,14 @@ test_eof_eoa(void) if (s3_test_credentials_loaded == 0) { SKIPPED(); HDputs(" s3 credentials are not loaded"); - HDfflush(stdout); + fflush(stdout); return 0; } if (FALSE == s3_test_bucket_defined) { SKIPPED(); HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined"); - HDfflush(stdout); + fflush(stdout); return 0; } @@ -1096,14 +1096,14 @@ test_H5FDread_without_eoa_set_fails(void) if (s3_test_credentials_loaded == 0) { SKIPPED(); HDputs(" s3 credentials are not loaded"); - HDfflush(stdout); + fflush(stdout); return 0; } if (FALSE == s3_test_bucket_defined) { SKIPPED(); HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined"); - HDfflush(stdout); + fflush(stdout); return 0; } @@ -1270,14 +1270,14 @@ test_read(void) if (s3_test_credentials_loaded == 0) { SKIPPED(); HDputs(" s3 credentials are not loaded"); - HDfflush(stdout); + fflush(stdout); return 0; } if (FALSE == s3_test_bucket_defined) { SKIPPED(); HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined"); - HDfflush(stdout); + fflush(stdout); return 0; } @@ -1414,7 +1414,7 @@ test_noops_and_autofails(void) if (FALSE == s3_test_bucket_defined) { SKIPPED(); HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined"); - HDfflush(stdout); + fflush(stdout); return 0; } @@ -1534,14 +1534,14 @@ test_cmp(void) if (s3_test_credentials_loaded == 0) { SKIPPED(); HDputs(" s3 credentials are not loaded"); - HDfflush(stdout); + fflush(stdout); return 0; } if (FALSE == s3_test_bucket_defined) { SKIPPED(); HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined"); - HDfflush(stdout); + fflush(stdout); return 0; } @@ -1658,14 +1658,14 @@ test_H5F_integration(void) if (s3_test_credentials_loaded == 0) { SKIPPED(); HDputs(" s3 credentials are not loaded"); - HDfflush(stdout); + fflush(stdout); return 0; } if (FALSE == s3_test_bucket_defined) { SKIPPED(); HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined"); - HDfflush(stdout); + fflush(stdout); return 0; } @@ -1712,7 +1712,7 @@ error: * CLEANUP * ***********/ printf("\nerror!"); - HDfflush(stdout); + fflush(stdout); if (fapl_id >= 0) { H5E_BEGIN_TRY diff --git a/test/s3comms.c b/test/s3comms.c index dd7682c..c2d9ff9 100644 --- a/test/s3comms.c +++ b/test/s3comms.c @@ -1776,7 +1776,7 @@ test_s3r_get_filesize(void) if (FALSE == s3_test_bucket_defined) { SKIPPED(); HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined"); - HDfflush(stdout); + fflush(stdout); return 0; } @@ -1834,13 +1834,13 @@ test_s3r_open(void) if (s3_test_credentials_loaded == 0) { SKIPPED(); HDputs(" s3 credentials are not loaded"); - HDfflush(stdout); + fflush(stdout); return 0; } if (FALSE == s3_test_bucket_defined) { SKIPPED(); HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined"); - HDfflush(stdout); + fflush(stdout); return 0; } @@ -2038,7 +2038,7 @@ test_s3r_read(void) if (FALSE == s3_test_bucket_defined) { SKIPPED(); HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined"); - HDfflush(stdout); + fflush(stdout); return 0; } diff --git a/test/swmr_reader.c b/test/swmr_reader.c index 3f94bf2..e14ec7d 100644 --- a/test/swmr_reader.c +++ b/test/swmr_reader.c @@ -482,7 +482,7 @@ main(int argc, char *argv[]) char verbose_name[1024]; HDsnprintf(verbose_name, sizeof(verbose_name), "swmr_reader.out.%u", random_seed); - if (NULL == (verbose_file = HDfopen(verbose_name, "w"))) { + if (NULL == (verbose_file = fopen(verbose_name, "w"))) { fprintf(stderr, "Can't open verbose output file!\n"); exit(EXIT_FAILURE); } diff --git a/test/swmr_start_write.c b/test/swmr_start_write.c index 5067db0..fa5e99b 100644 --- a/test/swmr_start_write.c +++ b/test/swmr_start_write.c @@ -449,7 +449,7 @@ main(int argc, char *argv[]) char verbose_name[1024]; HDsnprintf(verbose_name, sizeof(verbose_name), "swmr_writer.out.%u", random_seed); - if (NULL == (verbose_file = HDfopen(verbose_name, "w"))) { + if (NULL == (verbose_file = fopen(verbose_name, "w"))) { fprintf(stderr, "Can't open verbose output file!\n"); exit(EXIT_FAILURE); } diff --git a/test/swmr_writer.c b/test/swmr_writer.c index c880225..81d4351 100644 --- a/test/swmr_writer.c +++ b/test/swmr_writer.c @@ -357,7 +357,7 @@ main(int argc, char *argv[]) char verbose_name[1024]; HDsnprintf(verbose_name, sizeof(verbose_name), "swmr_writer.out.%u", random_seed); - if (NULL == (verbose_file = HDfopen(verbose_name, "w"))) { + if (NULL == (verbose_file = fopen(verbose_name, "w"))) { fprintf(stderr, "Can't open verbose output file!\n"); exit(EXIT_FAILURE); } diff --git a/test/testmeta.c b/test/testmeta.c index 1d843a4..048e3a6 100644 --- a/test/testmeta.c +++ b/test/testmeta.c @@ -102,7 +102,7 @@ main(void) /* Removed print statement as it would lock system resources on Windows */ /* * printf("\rWriting Object #%d of %d", j+1, NDATAOBJECTS); - * HDfflush(stdout); + * fflush(stdout); */ floatval = (float)j; diff --git a/test/tmisc.c b/test/tmisc.c index a2e8343..67c3c85 100644 --- a/test/tmisc.c +++ b/test/tmisc.c @@ -2341,35 +2341,35 @@ misc13_insert_user_block(const char *old_name, const char *new_name, const char HDmemcpy(user_block, str, HDstrlen(str)); /* Open the new file */ - new_fp = HDfopen(new_name, "wb"); - CHECK_PTR(new_fp, "HDfopen"); + new_fp = fopen(new_name, "wb"); + CHECK_PTR(new_fp, "fopen"); /* Write the user block to the new file */ - written = HDfwrite(user_block, (size_t)1, size, new_fp); - VERIFY(written, size, "HDfwrite"); + written = fwrite(user_block, (size_t)1, size, new_fp); + VERIFY(written, size, "fwrite"); /* Open the old file */ - old_fp = HDfopen(old_name, "rb"); - CHECK_PTR(old_fp, "HDfopen"); + old_fp = fopen(old_name, "rb"); + CHECK_PTR(old_fp, "fopen"); /* Allocate space for the copy buffer */ copy_buf = malloc((size_t)MISC13_COPY_BUF_SIZE); CHECK_PTR(copy_buf, "malloc"); /* Copy data from the old file to the new file */ - while ((read_in = HDfread(copy_buf, (size_t)1, (size_t)MISC13_COPY_BUF_SIZE, old_fp)) > 0) { + while ((read_in = fread(copy_buf, (size_t)1, (size_t)MISC13_COPY_BUF_SIZE, old_fp)) > 0) { /* Write the data to the new file */ - written = HDfwrite(copy_buf, (size_t)1, read_in, new_fp); - VERIFY(written, read_in, "HDfwrite"); + written = fwrite(copy_buf, (size_t)1, read_in, new_fp); + VERIFY(written, read_in, "fwrite"); } /* Close the old file */ - ret = HDfclose(old_fp); - VERIFY(ret, 0, "HDfclose"); + ret = fclose(old_fp); + VERIFY(ret, 0, "fclose"); /* Close the new file */ - ret = HDfclose(new_fp); - VERIFY(ret, 0, "HDfclose"); + ret = fclose(new_fp); + VERIFY(ret, 0, "fclose"); /* Free the copy buffer */ free(copy_buf); diff --git a/test/twriteorder.c b/test/twriteorder.c index 9483a58..88389d7 100644 --- a/test/twriteorder.c +++ b/test/twriteorder.c @@ -375,7 +375,7 @@ main(int argc, char *argv[]) printf("File created.\n"); } /* flush output before possible fork */ - HDfflush(stdout); + fflush(stdout); if (launch_g == UC_READWRITE) { /* fork process */ @@ -2388,7 +2388,7 @@ error: AT(); \ fprintf(stderr, mesg); \ H5Eprint2(H5E_DEFAULT, stderr); \ - HDfflush(stderr); \ + fflush(stderr); \ ret_value = -1; \ goto done; \ } while (0) @@ -2600,7 +2600,7 @@ run_splitter_test(const struct splitter_dataset_def *data, hbool_t ignore_wo_err } /* Verify existence of logfile if appropriate */ - logfile = HDfopen(vfd_config->log_file_path, "r"); + logfile = fopen(vfd_config->log_file_path, "r"); if ((TRUE == provide_logfile_path && NULL == logfile) || (FALSE == provide_logfile_path && NULL != logfile)) { SPLITTER_TEST_FAULT("no logfile when one was expected\n"); @@ -2621,7 +2621,7 @@ done: } if (logfile != NULL) - HDfclose(logfile); + fclose(logfile); free(vfd_config); free(filename_rw); @@ -3503,7 +3503,7 @@ setup_rand(void) seed = predefined_seed; fprintf(stdout, "\n%s: predefined_seed = %d.\n\n", __func__, seed); - HDfflush(stdout); + fflush(stdout); HDsrand(seed); } @@ -3512,14 +3512,14 @@ setup_rand(void) if (HDgettimeofday(&tv, NULL) != 0) { fprintf(stdout, "\n%s: gettimeofday() failed -- srand() not called.\n\n", __func__); - HDfflush(stdout); + fflush(stdout); } else { seed = (unsigned)tv.tv_usec; fprintf(stdout, "\n%s: seed = %d.\n\n", __func__, seed); - HDfflush(stdout); + fflush(stdout); HDsrand(seed); } |