From 0c8d4762021585bc2cb6475c6c6eeecba55918bc Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Wed, 28 Jun 2023 16:31:48 -0700 Subject: [PATCH] Rename HDexit() and related to exit(), etc. * HDatexit * HDexit * HD_exit --- src/H5.c | 4 +- src/H5FDsubfiling/H5FDsubfiling.c | 2 +- src/H5private.h | 9 - test/API/H5_api_test.c | 2 +- test/API/testhdf5.c | 4 +- test/bittests.c | 4 +- test/cache.c | 2 +- test/cache_logging.c | 4 +- test/cache_tagging.c | 2 +- test/cmpd_dset.c | 4 +- test/cross_read.c | 4 +- test/del_many_dense_attrs.c | 2 +- test/dsets.c | 4 +- test/dt_arith.c | 12 +- test/dtypes.c | 4 +- test/event_set.c | 4 +- test/evict_on_close.c | 8 +- test/extend.c | 6 +- test/farray.c | 4 +- test/filenotclosed.c | 8 +- test/fillval.c | 6 +- test/filter_fail.c | 4 +- test/filter_plugin.c | 4 +- test/flush1.c | 4 +- test/flush2.c | 8 +- test/freespace.c | 4 +- test/gen_cross.c | 4 +- test/gheap.c | 4 +- test/hyperslab.c | 6 +- test/istore.c | 6 +- test/links.c | 6 +- test/links_env.c | 8 +- test/mirror_vfd.c | 4 +- test/objcopy.c | 6 +- test/objcopy_ref.c | 6 +- test/onion.c | 2 +- test/page_buffer.c | 6 +- test/select_io_dset.c | 4 +- test/swmr.c | 310 +++++++++--------- test/swmr_addrem_writer.c | 10 +- test/swmr_generator.c | 4 +- test/swmr_reader.c | 12 +- test/swmr_remove_reader.c | 10 +- test/swmr_remove_writer.c | 10 +- test/swmr_sparse_reader.c | 10 +- test/swmr_sparse_writer.c | 10 +- test/swmr_start_write.c | 16 +- test/swmr_writer.c | 12 +- test/tcheck_version.c | 10 +- test/testframe.c | 18 +- test/testhdf5.c | 4 +- test/thread_id.c | 4 +- test/twriteorder.c | 6 +- test/unlink.c | 6 +- test/unregister.c | 4 +- test/use_append_chunk.c | 8 +- test/use_append_chunk_mirror.c | 4 +- test/use_append_mchunks.c | 8 +- test/use_common.c | 2 +- test/use_disable_mdc_flushes.c | 4 +- test/vds.c | 2 +- test/vds_env.c | 2 +- test/vfd.c | 2 +- test/vfd_plugin.c | 4 +- test/vol.c | 4 +- test/vol_plugin.c | 4 +- testpar/API/H5_api_test_parallel.c | 6 +- testpar/t_cache_image.c | 4 +- testpar/t_pflush1.c | 6 +- testpar/t_pflush2.c | 6 +- testpar/t_pread.c | 8 +- testpar/t_subfiling_vfd.c | 4 +- tools/lib/h5tools_utils.c | 2 +- tools/src/h5copy/h5copy.c | 2 +- tools/src/h5diff/h5diff_main.c | 2 +- tools/src/h5diff/ph5diff_main.c | 2 +- tools/src/h5dump/h5dump.c | 2 +- tools/src/h5format_convert/h5format_convert.c | 2 +- tools/src/h5import/h5import.c | 4 +- tools/src/h5jam/h5jam.c | 8 +- tools/src/h5jam/h5unjam.c | 2 +- tools/src/h5ls/h5ls.c | 2 +- tools/src/h5perf/pio_perf.c | 8 +- tools/src/h5perf/sio_perf.c | 10 +- tools/src/h5repack/h5repack_main.c | 2 +- tools/src/h5repack/h5repack_opttable.c | 2 +- tools/src/h5repack/h5repack_parse.c | 52 +-- tools/src/h5stat/h5stat.c | 2 +- tools/src/misc/h5clear.c | 2 +- tools/src/misc/h5mkgrp.c | 2 +- tools/src/misc/h5repart.c | 58 ++-- tools/test/h5format_convert/h5fc_chk_idx.c | 16 +- tools/test/h5jam/getub.c | 4 +- tools/test/h5jam/tellub.c | 2 +- tools/test/misc/clear_open_chk.c | 8 +- tools/test/misc/h5clear_gentest.c | 4 +- tools/test/misc/h5repart_gentest.c | 24 +- tools/test/misc/repart_test.c | 4 +- tools/test/perform/zip_perf.c | 2 +- utils/mirror_vfd/mirror_server.c | 10 +- utils/mirror_vfd/mirror_server_stop.c | 10 +- utils/tools/h5dwalk/h5dwalk.c | 2 +- 102 files changed, 481 insertions(+), 490 deletions(-) diff --git a/src/H5.c b/src/H5.c index cfc106de08a..87a87ea4a8d 100644 --- a/src/H5.c +++ b/src/H5.c @@ -218,11 +218,11 @@ H5_init_library(void) * This must be entered before the library cleanup code so it's * executed in LIFO order (i.e., last). */ - (void)HDatexit(H5TS_win32_process_exit); + (void)atexit(H5TS_win32_process_exit); #endif /* H5_HAVE_THREADSAFE && H5_HAVE_WIN_THREADS */ /* Normal library termination code */ - (void)HDatexit(H5_term_library); + (void)atexit(H5_term_library); H5_dont_atexit_g = TRUE; } /* end if */ diff --git a/src/H5FDsubfiling/H5FDsubfiling.c b/src/H5FDsubfiling/H5FDsubfiling.c index 20d617d04d1..d12a982efc3 100644 --- a/src/H5FDsubfiling/H5FDsubfiling.c +++ b/src/H5FDsubfiling/H5FDsubfiling.c @@ -334,7 +334,7 @@ H5FD_subfiling_init(void) H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_CANTINIT, H5I_INVALID_HID, "MPI doesn't support MPI_Init_thread with MPI_THREAD_MULTIPLE"); - if (HDatexit(H5FD__subfiling_mpi_finalize) < 0) + if (atexit(H5FD__subfiling_mpi_finalize) < 0) H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_CANTINIT, H5I_INVALID_HID, "can't register atexit handler for MPI_Finalize"); } diff --git a/src/H5private.h b/src/H5private.h index 676fb22e1f5..62f418ca6ba 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -623,9 +623,6 @@ typedef off_t h5_stat_size_t; #ifndef HDasprintf #define HDasprintf asprintf /*varargs*/ #endif -#ifndef HDatexit -#define HDatexit(F) atexit(F) -#endif #ifndef HDatof #define HDatof(S) atof(S) #endif @@ -665,12 +662,6 @@ typedef off_t h5_stat_size_t; #ifndef HDdifftime #define HDdifftime(X, Y) difftime(X, Y) #endif -#ifndef HDexit -#define HDexit(N) exit(N) -#endif -#ifndef HD_exit -#define HD_exit(N) _exit(N) -#endif #ifndef HDfabs #define HDfabs(X) fabs(X) #endif diff --git a/test/API/H5_api_test.c b/test/API/H5_api_test.c index 92237f53557..6c917217641 100644 --- a/test/API/H5_api_test.c +++ b/test/API/H5_api_test.c @@ -309,5 +309,5 @@ main(int argc, char **argv) MPI_Finalize(); #endif - HDexit(((err_occurred || n_tests_failed_g > 0) ? EXIT_FAILURE : EXIT_SUCCESS)); + exit(((err_occurred || n_tests_failed_g > 0) ? EXIT_FAILURE : EXIT_SUCCESS)); } diff --git a/test/API/testhdf5.c b/test/API/testhdf5.c index e863e38f9ff..fcbf64247bc 100644 --- a/test/API/testhdf5.c +++ b/test/API/testhdf5.c @@ -722,10 +722,10 @@ main(int argc, char *argv[]) /* No need to print anything since PerformTests() already does. */ if (nerrors /* GetTestNumErrs() */ > 0) { printf("** HDF5 tests failed with %d errors **\n", nerrors); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } else { printf("** HDF5 tests ran successfully **\n"); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); } } /* end main() */ diff --git a/test/bittests.c b/test/bittests.c index 13ad749c766..05ede24f571 100644 --- a/test/bittests.c +++ b/test/bittests.c @@ -933,11 +933,11 @@ main(void) if (nerrors) { printf("***** %u FAILURE%s! *****\n", nerrors, 1 == nerrors ? "" : "S"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } printf("All bit tests passed.\n"); H5close(); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); } /* end main() */ diff --git a/test/cache.c b/test/cache.c index 418c8d526fd..0fe3f74caad 100644 --- a/test/cache.c +++ b/test/cache.c @@ -34072,7 +34072,7 @@ main(void) if (!h5_using_default_driver(NULL)) { HDputs(" -- SKIPPED for incompatible VFD --"); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); } if (create_entry_arrays() < 0) { diff --git a/test/cache_logging.c b/test/cache_logging.c index fbdf55210cf..dff9feb4e4a 100644 --- a/test/cache_logging.c +++ b/test/cache_logging.c @@ -171,10 +171,10 @@ main(void) if (nerrors) { printf("***** %d Metadata cache logging TEST%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : ""); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } printf("All Metadata Cache Logging tests passed.\n"); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); } diff --git a/test/cache_tagging.c b/test/cache_tagging.c index c11ef6f34fb..f67e0614794 100644 --- a/test/cache_tagging.c +++ b/test/cache_tagging.c @@ -4575,7 +4575,7 @@ main(void) /* Only run with sec2/default driver */ if (!h5_using_default_driver(NULL)) { HDputs(" -- SKIPPED for incompatible VFD --"); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); } /* ========== */ diff --git a/test/cmpd_dset.c b/test/cmpd_dset.c index 62b409df2b7..0c7f77c17ed 100644 --- a/test/cmpd_dset.c +++ b/test/cmpd_dset.c @@ -2217,7 +2217,7 @@ main(int argc, char *argv[]) if (argc > 1) { if (argc > 2 || HDstrcmp("--noopt", argv[1]) != 0) { fprintf(stderr, "usage: %s [--noopt]\n", argv[0]); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } H5Tunregister(H5T_PERS_DONTCARE, NULL, (hid_t)-1, (hid_t)-1, (H5T_conv_t)((void (*)(void))H5T__conv_struct_opt)); @@ -2250,7 +2250,7 @@ main(int argc, char *argv[]) if (nerrors) { printf("***** %u FAILURE%s! *****\n", nerrors, 1 == nerrors ? "" : "S"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } h5_cleanup(FILENAME, fapl_id); diff --git a/test/cross_read.c b/test/cross_read.c index e52bea1267e..7d5bfd2daac 100644 --- a/test/cross_read.c +++ b/test/cross_read.c @@ -364,11 +364,11 @@ main(void) */ if (h5_driver_is_default_vfd_compatible(H5P_DEFAULT, &driver_is_default_compatible) < 0) { HDputs(" -- couldn't check if VFD is compatible with default VFD --"); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); } if (!driver_is_default_compatible) { HDputs(" -- SKIPPED for incompatible VFD --"); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); } HDputs("\n"); diff --git a/test/del_many_dense_attrs.c b/test/del_many_dense_attrs.c index 9ef4447ad0b..ff858d074fc 100644 --- a/test/del_many_dense_attrs.c +++ b/test/del_many_dense_attrs.c @@ -37,7 +37,7 @@ static const char *FILENAME[] = {"del_many_dense_attrs", NULL}; static void catch_signal(int H5_ATTR_UNUSED signo) { - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* catch_signal() */ /*------------------------------------------------------------------------- diff --git a/test/dsets.c b/test/dsets.c index 727ffa78aca..11e82f84428 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -15848,7 +15848,7 @@ main(void) free(points_dbl_data); free(check_dbl_data); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); error: free(points); @@ -15863,5 +15863,5 @@ main(void) nerrors = MAX(1, nerrors); printf("***** %d DATASET TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end main() */ diff --git a/test/dt_arith.c b/test/dt_arith.c index 4061fee4c78..9da4118c77e 100644 --- a/test/dt_arith.c +++ b/test/dt_arith.c @@ -414,7 +414,7 @@ fpe_handler(int H5_ATTR_UNUSED signo) HDputs(" Remaining tests could not be run."); HDputs(" Please turn off SIGFPE on overflows and try again."); #endif - HDexit(255); + exit(255); } /*------------------------------------------------------------------------- @@ -3305,9 +3305,9 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst) HDfflush(stdout); #ifdef HANDLE_SIGFPE if (run_test == TEST_NOOP || run_test == TEST_NORMAL) - HDexit(MIN((int)fails_all_tests, 254)); + exit(MIN((int)fails_all_tests, 254)); else if (run_test == TEST_DENORM || run_test == TEST_SPECIAL) - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); assert(0 && "Should not reach this point!"); return 1; #else @@ -3334,9 +3334,9 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst) HDfflush(stdout); #ifdef HANDLE_SIGFPE if (run_test == TEST_NOOP || run_test == TEST_NORMAL) - HDexit(MIN(MAX((int)fails_all_tests, 1), 254)); + exit(MIN(MAX((int)fails_all_tests, 1), 254)); else if (run_test == TEST_DENORM || run_test == TEST_SPECIAL) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); assert(0 && "Should not reach this point!"); return 1; #else @@ -5230,7 +5230,7 @@ main(void) if (nerrors) { printf("***** %lu FAILURE%s! *****\n", nerrors, 1 == nerrors ? "" : "S"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } printf("All data type tests passed.\n"); return 0; diff --git a/test/dtypes.c b/test/dtypes.c index bbb91c9498f..7d2b4ef013c 100644 --- a/test/dtypes.c +++ b/test/dtypes.c @@ -8890,7 +8890,7 @@ main(void) if (h5_using_parallel_driver(fapl, &driver_is_parallel) < 0) { printf("Can't check if driver is parallel-enabled\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } if (ALIGNMENT) @@ -8963,7 +8963,7 @@ main(void) if (nerrors) { printf("***** %lu FAILURE%s! *****\n", nerrors, 1 == nerrors ? "" : "S"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } printf("All datatype tests passed.\n"); diff --git a/test/event_set.c b/test/event_set.c index 134002eb9bd..c10e42ff395 100644 --- a/test/event_set.c +++ b/test/event_set.c @@ -698,9 +698,9 @@ main(void) /* Report status */ HDputs("All event set tests passed."); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); error: HDputs("***** EVENT SET TESTS FAILED *****"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end main() */ diff --git a/test/evict_on_close.c b/test/evict_on_close.c index 7d3442f64bf..20ce3d13bb5 100644 --- a/test/evict_on_close.c +++ b/test/evict_on_close.c @@ -957,7 +957,7 @@ main(void) printf("All evict-on-close tests passed.\n"); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); error: @@ -971,7 +971,7 @@ main(void) } H5E_END_TRY - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end main() */ @@ -1049,13 +1049,13 @@ main(void) printf("All evict-on-close tests passed.\n"); printf("Note that EoC is not supported under parallel so most tests are skipped.\n"); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); error: printf("***** %u evict-on-close test%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : ""); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* main() - parallel */ diff --git a/test/extend.c b/test/extend.c index f544342a3a3..30a37a433dd 100644 --- a/test/extend.c +++ b/test/extend.c @@ -339,7 +339,7 @@ main(void) if (nerrors) { printf("***** %d FAILURE%s! *****\n", nerrors, (1 == nerrors) ? "" : "S"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ printf("All extend tests passed.\n"); @@ -350,7 +350,7 @@ main(void) free(buf2); free(buf2_data); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); error: @@ -360,5 +360,5 @@ main(void) free(buf2_data); printf("*** One or more extend tests failed ***\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end main() */ diff --git a/test/farray.c b/test/farray.c index e37e00e7ba5..6b3c118b73a 100644 --- a/test/farray.c +++ b/test/farray.c @@ -1792,7 +1792,7 @@ main(void) /* Clean up file used */ h5_cleanup(FILENAME, fapl); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); error: HDputs("*** TESTS FAILED ***"); @@ -1806,5 +1806,5 @@ main(void) if (api_ctx_pushed) H5CX_pop(FALSE); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end main() */ diff --git a/test/filenotclosed.c b/test/filenotclosed.c index 7f4d5d71c01..a2b0bdb81fd 100644 --- a/test/filenotclosed.c +++ b/test/filenotclosed.c @@ -34,7 +34,7 @@ static void catch_signal(int H5_ATTR_UNUSED signo) { - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* catch_signal() */ /*------------------------------------------------------------------------- @@ -80,7 +80,7 @@ main(void) if (!contig_addr_vfd) { SKIPPED(); HDputs(" Temporary skipped for a spilt/multi driver"); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); } h5_reset(); @@ -136,9 +136,9 @@ main(void) /* The file is not closed. */ /* The library will call H5_term_library to shut down the library. */ - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); error: HDputs("*** TEST FAILED ***"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } diff --git a/test/fillval.c b/test/fillval.c index 661b2b62abf..e6922f5ef59 100644 --- a/test/fillval.c +++ b/test/fillval.c @@ -2649,7 +2649,7 @@ main(int argc, char *argv[]) test_compact = 1; else { fprintf(stderr, "usage: %s [contiguous] [chunked] [compact]\n", argv[0]); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } } /* end for */ } /* end if */ @@ -2725,9 +2725,9 @@ main(int argc, char *argv[]) if (h5_cleanup(FILENAME, fapl)) HDremove(FILE_NAME_RAW); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); error: HDputs("***** FILL VALUE TESTS FAILED *****"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } diff --git a/test/filter_fail.c b/test/filter_fail.c index 23041ed8a95..ce5d501c57f 100644 --- a/test/filter_fail.c +++ b/test/filter_fail.c @@ -416,11 +416,11 @@ main(void) if (nerrors) TEST_ERROR; - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); error: if (nerrors) { printf("***** %u FAILURE%s! *****\n", nerrors, 1 == nerrors ? "" : "S"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } } /* end main() */ diff --git a/test/filter_plugin.c b/test/filter_plugin.c index a467a1e2f1c..d7a21e647c8 100644 --- a/test/filter_plugin.c +++ b/test/filter_plugin.c @@ -1619,7 +1619,7 @@ main(void) printf("All plugin tests passed.\n"); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); error: H5E_BEGIN_TRY @@ -1638,5 +1638,5 @@ main(void) nerrors = MAX(1, nerrors); printf("***** %d PLUGIN TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end main() */ diff --git a/test/flush1.c b/test/flush1.c index 54fa7383527..575031cf7af 100644 --- a/test/flush1.c +++ b/test/flush1.c @@ -323,7 +323,7 @@ main(void) STACK_ERROR; /* _exit() is necessary since we want a hard close of the library */ - HD_exit(EXIT_SUCCESS); + _exit(EXIT_SUCCESS); error: H5E_BEGIN_TRY @@ -332,5 +332,5 @@ main(void) } H5E_END_TRY - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end main() */ diff --git a/test/flush2.c b/test/flush2.c index 7d28bdbc1f6..206fd31a489 100644 --- a/test/flush2.c +++ b/test/flush2.c @@ -256,12 +256,12 @@ main(void) if (h5_driver_is_default_vfd_compatible(fapl_id, &driver_is_default_vfd_compatible) < 0) { printf("Can't check if VFD is compatible with default VFD\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } if (!driver_is_default_vfd_compatible) { printf("Skipping SWMR tests for VFD incompatible with default VFD\n"); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); } /* TEST 1 */ @@ -437,8 +437,8 @@ main(void) h5_cleanup(FILENAME, fapl_id); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); error: - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end main() */ diff --git a/test/freespace.c b/test/freespace.c index 9245e1094cc..95789760d0f 100644 --- a/test/freespace.c +++ b/test/freespace.c @@ -2918,7 +2918,7 @@ main(void) api_ctx_pushed = FALSE; h5_cleanup(FILENAME, fapl); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); error: HDputs("*** TESTS FAILED ***"); @@ -2931,5 +2931,5 @@ main(void) if (api_ctx_pushed) H5CX_pop(FALSE); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* main() */ diff --git a/test/gen_cross.c b/test/gen_cross.c index 0d07ad15471..4247a8b1784 100644 --- a/test/gen_cross.c +++ b/test/gen_cross.c @@ -1325,8 +1325,8 @@ main(void) if (H5Fclose(file) < 0) TEST_ERROR; - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); error: - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end main() */ diff --git a/test/gheap.c b/test/gheap.c index 79e5f0215e2..4831a89e2cf 100644 --- a/test/gheap.c +++ b/test/gheap.c @@ -608,7 +608,7 @@ main(void) api_ctx_pushed = FALSE; h5_cleanup(FILENAME, fapl_id); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); error: H5E_BEGIN_TRY @@ -621,5 +621,5 @@ main(void) H5CX_pop(FALSE); HDputs("*** TESTS FAILED ***"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end main() */ diff --git a/test/hyperslab.c b/test/hyperslab.c index 55735d40b64..5c51564a356 100644 --- a/test/hyperslab.c +++ b/test/hyperslab.c @@ -1170,7 +1170,7 @@ main(int argc, char *argv[]) size_of_test |= TEST_MEDIUM; else { printf("unrecognized argument: %s\n", argv[i]); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end else */ } /* end for */ } /* end else */ @@ -1387,7 +1387,7 @@ main(int argc, char *argv[]) printf("***** %d HYPERSLAB TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S"); if (HDisatty(1)) printf("(Redirect output to a pager or a file to see debug output)\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ printf("All hyperslab tests passed.\n"); @@ -1396,5 +1396,5 @@ main(int argc, char *argv[]) H5close(); #endif /* H5_HAVE_THREADSAFE */ - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); } diff --git a/test/istore.c b/test/istore.c index 37e603b44f9..dd344859329 100644 --- a/test/istore.c +++ b/test/istore.c @@ -626,7 +626,7 @@ main(int argc, char *argv[]) h5_fixname(FILENAME[0], fapl, filename, sizeof filename); if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl)) < 0) { printf("Cannot create file %s; test aborted\n", filename); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* Initialize chunk dimensions */ @@ -693,12 +693,12 @@ main(int argc, char *argv[]) if (nerrors) { printf("***** %d I-STORE TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } printf("All i-store tests passed.\n"); h5_cleanup(FILENAME, fapl); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); } diff --git a/test/links.c b/test/links.c index eda699e37db..84dd586afc4 100644 --- a/test/links.c +++ b/test/links.c @@ -22942,7 +22942,7 @@ main(void) /* Results */ if (nerrors) { printf("***** %d LINK TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } printf("All link tests passed.\n"); @@ -22954,9 +22954,9 @@ main(void) HDrmdir(TMPDIR); HDrmdir(TMPDIR2); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); error: HDputs("*** TESTS FAILED ***"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end main() */ diff --git a/test/links_env.c b/test/links_env.c index 41daf6ae66c..45b6074ba02 100644 --- a/test/links_env.c +++ b/test/links_env.c @@ -161,7 +161,7 @@ main(void) /* Splitter VFD has issues with external links */ if (!HDstrcmp(env_h5_drvr, "splitter")) { HDputs(" -- SKIPPED for incompatible VFD --"); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); } h5_reset(); @@ -184,16 +184,16 @@ main(void) if (nerrors) { printf("***** %d External Link (HDF5_EXT_PREFIX) test%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "s"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } printf("All external Link (HDF5_EXT_PREFIX) tests passed.\n"); /* clean up tmp_links_env directory created by external link tests */ HDrmdir(TMPDIR); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); error: HDputs("*** TESTS FAILED ***"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end main() */ diff --git a/test/mirror_vfd.c b/test/mirror_vfd.c index 46b6de6def7..d52c7353271 100644 --- a/test/mirror_vfd.c +++ b/test/mirror_vfd.c @@ -2431,12 +2431,12 @@ main(int argc, char **argv) if (parse_args(argc, argv, &opts) < 0) { printf("Unable to parse arguments\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } if (confirm_server(&opts) < 0) { printf("Unable to confirm server is running\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* TESTS */ diff --git a/test/objcopy.c b/test/objcopy.c index f13b64bb0fb..b0afc24dc41 100644 --- a/test/objcopy.c +++ b/test/objcopy.c @@ -17658,7 +17658,7 @@ main(void) /* Results */ if (nerrors) { printf("***** %d OBJECT COPY TEST%s FAILED! *****\n", nerrors, (1 == nerrors ? "" : "S")); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ HDputs("All object copying tests passed."); @@ -17688,8 +17688,8 @@ main(void) h5_cleanup(FILENAME, fapl); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); error: - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* main */ diff --git a/test/objcopy_ref.c b/test/objcopy_ref.c index eac44bb43b8..de78bed078e 100644 --- a/test/objcopy_ref.c +++ b/test/objcopy_ref.c @@ -1972,7 +1972,7 @@ main(void) /* Results */ if (nerrors) { printf("***** %d OBJECT COPY TEST%s FAILED! *****\n", nerrors, (1 == nerrors ? "" : "S")); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ HDputs("All object copying tests passed."); @@ -2002,8 +2002,8 @@ main(void) h5_cleanup(FILENAME, fapl); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); error: - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* main */ diff --git a/test/onion.c b/test/onion.c index d54b539563d..ea59cd12d57 100644 --- a/test/onion.c +++ b/test/onion.c @@ -4925,7 +4925,7 @@ main(void) if ((0 != HDstrcmp(env_h5_drvr, "nomatch")) && (0 != HDstrcmp(env_h5_drvr, "sec2"))) { SKIPPED(); HDputs("Onion VFD test skipped due to non-sec2 default VFD"); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); } /* Initialize */ diff --git a/test/page_buffer.c b/test/page_buffer.c index 18e0ce4359c..385b1a6aa20 100644 --- a/test/page_buffer.c +++ b/test/page_buffer.c @@ -2111,7 +2111,7 @@ main(void) SKIPPED(); HDputs("Skip page buffering test because paged aggregation is disabled for multi/split drivers"); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); } /* end if */ if ((fapl = h5_fileaccess()) < 0) { @@ -2151,7 +2151,7 @@ main(void) HDputs("All Page Buffering tests passed."); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); error: printf("***** %d Page Buffering TEST%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : ""); @@ -2165,5 +2165,5 @@ main(void) if (api_ctx_pushed) H5CX_pop(FALSE); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* main() */ diff --git a/test/select_io_dset.c b/test/select_io_dset.c index 870028311a0..82756576293 100644 --- a/test/select_io_dset.c +++ b/test/select_io_dset.c @@ -3270,11 +3270,11 @@ main(void) h5_cleanup(FILENAME, fapl); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); error: nerrors = MAX(1, nerrors); printf("***** %d SELECTION I/O DATASET TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end main() */ diff --git a/test/swmr.c b/test/swmr.c index 63da6b209ea..a7ccaaccc04 100644 --- a/test/swmr.c +++ b/test/swmr.c @@ -2509,12 +2509,12 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format) /* Close unused write end for out_pdf */ if (HDclose(out_pdf[1]) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* Wait for notification from parent process */ while (child_notify != 1) { if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* Should fail */ @@ -2525,13 +2525,13 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format) } H5E_END_TRY if (fid >= 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* Close the pipe */ if (HDclose(out_pdf[0]) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); } /* close unused read end for out_pdf */ @@ -2591,84 +2591,84 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format) /* Close unused write end for out_pdf */ if (HDclose(out_pdf[1]) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* close unused read end for in_pdf */ if (HDclose(in_pdf[0]) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* Wait for notification from parent process */ while (child_notify != 1) { if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* Should succeed in opening the test file 2 times */ if ((child_fid1 = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl)) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); if ((child_fid2 = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl)) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* open "dataset" 2 times */ if ((child_did1 = H5Dopen2(child_fid1, "dataset", H5P_DEFAULT)) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); if ((child_did2 = H5Dopen2(child_fid2, "dataset", H5P_DEFAULT)) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* Read from "dataset" via child_did1 */ rdata = 0; if (H5Dread(child_did1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &rdata) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); if (rdata != 88) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* Notify parent process */ child_notify = 2; if (HDwrite(in_pdf[1], &child_notify, sizeof(int)) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* Wait for notification from parent process */ while (child_notify != 3) { if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* Refresh "dataset" via child_did2 */ if (H5Drefresh(child_did2) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* Read from "dataset" child_did2 */ rdata = 0; if (H5Dread(child_did2, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &rdata) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); if (rdata != 99) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* Read from "dataset" child_did1 */ rdata = 0; if (H5Dread(child_did1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &rdata) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); if (rdata != 99) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* Close the dataset */ if (H5Dclose(child_did1)) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); if (H5Dclose(child_did2)) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* Close the file */ if (H5Fclose(child_fid1) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); if (H5Fclose(child_fid2) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* Close the pipe */ if (HDclose(out_pdf[0]) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); if (HDclose(in_pdf[1]) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); } /* close unused read end for out_pdf */ @@ -2780,12 +2780,12 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format) /* Close unused write end for out_pdf */ if (HDclose(out_pdf[1]) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* Wait for notification from parent process */ while (child_notify != 1) { if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* Should fail in opening the test file */ @@ -2795,9 +2795,9 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format) } H5E_END_TRY if (fid >= 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); } /* end if */ /* close unused read end for out_pdf */ @@ -2856,12 +2856,12 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format) /* Close unused write end for out_pdf */ if (HDclose(out_pdf[1]) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* Wait for notification from parent process */ while (child_notify != 1) { if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* Should fail in opening the test file */ @@ -2871,13 +2871,13 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format) } H5E_END_TRY if (fid >= 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* Close the pipe */ if (HDclose(out_pdf[0]) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); } /* end if */ /* close unused read end for out_pdf */ @@ -2936,12 +2936,12 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format) /* Close unused write end for out_pdf */ if (HDclose(out_pdf[1]) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* Wait for notification from parent process */ while (child_notify != 1) { if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* Should fail in opening the test file */ @@ -2951,13 +2951,13 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format) } H5E_END_TRY if (fid >= 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* Close the pipe */ if (HDclose(out_pdf[0]) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); } /* close unused read end for out_pdf */ @@ -5245,12 +5245,12 @@ test_file_lock_concur(hid_t in_fapl) /* Close unused write end for out_pdf */ if (HDclose(out_pdf[1]) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* Wait for notification from parent process */ while (child_notify != 1) { if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* Open the test file */ @@ -5262,13 +5262,13 @@ test_file_lock_concur(hid_t in_fapl) /* Should fail */ if (child_fid == FAIL) - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); /* Close the pipe */ if (HDclose(out_pdf[0]) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* close unused read end for out_pdf */ @@ -5322,12 +5322,12 @@ test_file_lock_concur(hid_t in_fapl) /* Close unused write end for out_pdf */ if (HDclose(out_pdf[1]) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* Wait for notification from parent process */ while (child_notify != 1) { if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* Opens the test file */ @@ -5339,13 +5339,13 @@ test_file_lock_concur(hid_t in_fapl) /* Should fail */ if (child_fid == FAIL) - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); /* Close the pipe */ if (HDclose(out_pdf[0]) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* close unused read end for out_pdf */ @@ -5400,12 +5400,12 @@ test_file_lock_concur(hid_t in_fapl) /* Close unused write end for out_pdf */ if (HDclose(out_pdf[1]) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* Wait for notification from parent process */ while (child_notify != 1) { if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* Opens the test file */ @@ -5417,13 +5417,13 @@ test_file_lock_concur(hid_t in_fapl) /* Should fail */ if (child_fid == FAIL) - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); /* Close the pipe */ if (HDclose(out_pdf[0]) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ /* close unused read end for out_pdf */ @@ -5478,12 +5478,12 @@ test_file_lock_concur(hid_t in_fapl) /* Close unused write end for out_pdf */ if (HDclose(out_pdf[1]) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* Wait for notification from parent process */ while (child_notify != 1) { if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* Opens the test file */ @@ -5497,16 +5497,16 @@ test_file_lock_concur(hid_t in_fapl) if (child_fid >= 0) { /* Close the file */ if (H5Fclose(child_fid) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* Close the pipe */ if (HDclose(out_pdf[0]) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); } /* end if */ - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ /* close unused read end for out_pdf */ @@ -5642,12 +5642,12 @@ test_file_lock_swmr_concur(hid_t in_fapl) /* Close unused write end for out_pdf */ if (HDclose(out_pdf[1]) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* Wait for notification from parent process */ while (child_notify != 1) { if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* Open the test file */ @@ -5659,13 +5659,13 @@ test_file_lock_swmr_concur(hid_t in_fapl) /* Should fail */ if (child_fid == FAIL) - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); /* Close the pipe */ if (HDclose(out_pdf[0]) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* close unused read end for out_pdf */ @@ -5720,12 +5720,12 @@ test_file_lock_swmr_concur(hid_t in_fapl) /* Close unused write end for out_pdf */ if (HDclose(out_pdf[1]) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* Wait for notification from parent process */ while (child_notify != 1) { if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* Open the test file */ @@ -5737,13 +5737,13 @@ test_file_lock_swmr_concur(hid_t in_fapl) /* Should fail */ if (child_fid == FAIL) - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); /* Close the pipe */ if (HDclose(out_pdf[0]) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* close unused read end for out_pdf */ @@ -5798,12 +5798,12 @@ test_file_lock_swmr_concur(hid_t in_fapl) /* Close unused write end for out_pdf */ if (HDclose(out_pdf[1]) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* Wait for notification from parent process */ while (child_notify != 1) { if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* Open the test file */ @@ -5815,13 +5815,13 @@ test_file_lock_swmr_concur(hid_t in_fapl) /* Should fail */ if (child_fid == FAIL) - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); /* Close the pipe */ if (HDclose(out_pdf[0]) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* close unused read end for out_pdf */ @@ -5875,12 +5875,12 @@ test_file_lock_swmr_concur(hid_t in_fapl) /* Close unused write end for out_pdf */ if (HDclose(out_pdf[1]) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* Wait for notification from parent process */ while (child_notify != 1) { if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* Open the test file */ @@ -5892,13 +5892,13 @@ test_file_lock_swmr_concur(hid_t in_fapl) /* Should fail */ if (child_fid == FAIL) - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); /* Close the pipe */ if (HDclose(out_pdf[0]) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* close unused read end for out_pdf */ @@ -5952,12 +5952,12 @@ test_file_lock_swmr_concur(hid_t in_fapl) /* Close unused write end for out_pdf */ if (HDclose(out_pdf[1]) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* Wait for notification from parent process */ while (child_notify != 1) { if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* Open the test file */ @@ -5971,14 +5971,14 @@ test_file_lock_swmr_concur(hid_t in_fapl) if (child_fid >= 0) { if (H5Fclose(child_fid) < 0) FAIL_STACK_ERROR; - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); } /* Close the pipe */ if (HDclose(out_pdf[0]) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* close unused read end for out_pdf */ @@ -6032,12 +6032,12 @@ test_file_lock_swmr_concur(hid_t in_fapl) /* Close unused write end for out_pdf */ if (HDclose(out_pdf[1]) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* Wait for notification from parent process */ while (child_notify != 1) { if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* Open the test file */ @@ -6049,13 +6049,13 @@ test_file_lock_swmr_concur(hid_t in_fapl) /* Should fail */ if (child_fid == FAIL) - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); /* Close the pipe */ if (HDclose(out_pdf[0]) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* close unused read end for out_pdf */ @@ -6110,12 +6110,12 @@ test_file_lock_swmr_concur(hid_t in_fapl) /* Close unused write end for out_pdf */ if (HDclose(out_pdf[1]) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* Wait for notification from parent process */ while (child_notify != 1) { if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* Open the test file */ @@ -6127,13 +6127,13 @@ test_file_lock_swmr_concur(hid_t in_fapl) /* Should fail */ if (child_fid == FAIL) - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); /* Close the pipe */ if (HDclose(out_pdf[0]) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* close unused read end for out_pdf */ @@ -6188,12 +6188,12 @@ test_file_lock_swmr_concur(hid_t in_fapl) /* Close unused write end for out_pdf */ if (HDclose(out_pdf[1]) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* Wait for notification from parent process */ while (child_notify != 1) { if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* Open the test file */ @@ -6205,13 +6205,13 @@ test_file_lock_swmr_concur(hid_t in_fapl) /* Should fail */ if (child_fid == FAIL) - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); /* Close the pipe */ if (HDclose(out_pdf[0]) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* close unused read end for out_pdf */ @@ -6266,12 +6266,12 @@ test_file_lock_swmr_concur(hid_t in_fapl) /* Close unused write end for out_pdf */ if (HDclose(out_pdf[1]) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* Wait for notification from parent process */ while (child_notify != 1) { if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* Open the test file */ @@ -6285,14 +6285,14 @@ test_file_lock_swmr_concur(hid_t in_fapl) if (child_fid >= 0) { if (H5Fclose(child_fid) < 0) FAIL_STACK_ERROR; - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); } /* Close the pipe */ if (HDclose(out_pdf[0]) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* close unused read end for out_pdf */ @@ -6347,12 +6347,12 @@ test_file_lock_swmr_concur(hid_t in_fapl) /* Close unused write end for out_pdf */ if (HDclose(out_pdf[1]) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* Wait for notification from parent process */ while (child_notify != 1) { if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* Open the test file */ @@ -6363,14 +6363,14 @@ test_file_lock_swmr_concur(hid_t in_fapl) if (child_fid >= 0) { if (H5Fclose(child_fid) < 0) FAIL_STACK_ERROR; - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); } /* Close the pipe */ if (HDclose(out_pdf[0]) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* close unused read end for out_pdf */ @@ -6425,12 +6425,12 @@ test_file_lock_swmr_concur(hid_t in_fapl) /* Close unused write end for out_pdf */ if (HDclose(out_pdf[1]) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* Wait for notification from parent process */ while (child_notify != 1) { if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* Open the test file */ @@ -6442,13 +6442,13 @@ test_file_lock_swmr_concur(hid_t in_fapl) /* Should fail */ if (child_fid == FAIL) - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); /* Close the pipe */ if (HDclose(out_pdf[0]) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* Close unused read end for out_pdf */ @@ -6503,12 +6503,12 @@ test_file_lock_swmr_concur(hid_t in_fapl) /* Close unused write end for out_pdf */ if (HDclose(out_pdf[1]) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* Wait for notification from parent process */ while (child_notify != 1) { if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* Open the test file */ @@ -6522,14 +6522,14 @@ test_file_lock_swmr_concur(hid_t in_fapl) if (child_fid >= 0) { if (H5Fclose(child_fid) < 0) FAIL_STACK_ERROR; - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); } /* Close the pipe */ if (HDclose(out_pdf[0]) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* close unused read end for out_pdf */ @@ -6685,12 +6685,12 @@ test_file_locking(hid_t in_fapl, hbool_t turn_locking_on, hbool_t env_var_overri /* Close unused write end for out_pdf */ if (HDclose(out_pdf[1]) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* Wait for notification from parent process */ while (child_notify != 1) { if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* Open and close the test file */ @@ -6703,12 +6703,12 @@ test_file_locking(hid_t in_fapl, hbool_t turn_locking_on, hbool_t env_var_overri /* Close the pipe */ if (HDclose(out_pdf[0]) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); if (H5I_INVALID_HID == child_fid || FAIL == ret) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); else - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); } /* end child process work */ /* close unused read end for out_pdf */ @@ -7186,96 +7186,96 @@ test_refresh_concur(hid_t in_fapl, hbool_t new_format) /* Close unused write end for out_pdf */ if (HDclose(out_pdf[1]) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* close unused read end for in_pdf */ if (HDclose(in_pdf[0]) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* Wait for notification from parent process */ while (child_notify != 1) if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* Open the file 2 times */ if ((child_fid1 = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl)) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); if ((child_fid2 = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl)) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* Open the dataset 2 times */ if ((child_did1 = H5Dopen2(child_fid1, "dataset", H5P_DEFAULT)) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); if ((child_did2 = H5Dopen2(child_fid2, "dataset", H5P_DEFAULT)) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* Get the dataset's dataspace via did1 */ if ((child_sid = H5Dget_space(child_did1)) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); if (H5Sget_simple_extent_dims(child_sid, tdims, NULL) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); if (tdims[0] != 1) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* Read from the dataset via did2 */ if (H5Dread(child_did2, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* Verify the data is correct */ if (rbuf[0] != 99) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* Notify parent process */ child_notify = 2; if (HDwrite(in_pdf[1], &child_notify, sizeof(int)) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* Wait for notification from parent process */ while (child_notify != 3) if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* Refresh dataset via did1 */ if (H5Drefresh(child_did1) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* Get the dataset's dataspace and verify */ if ((child_sid = H5Dget_space(child_did1)) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); if (H5Sget_simple_extent_dims(child_sid, tdims, NULL) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); if (tdims[0] != 2) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* Read from the dataset */ if (H5Dread(child_did2, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* Verify the data is correct */ if (rbuf[0] != 100 || rbuf[1] != 100) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* Close the 2 datasets */ if (H5Dclose(child_did1) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); if (H5Dclose(child_did2) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* Close the 2 files */ if (H5Fclose(child_fid1) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); if (H5Fclose(child_fid2) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* Close the pipes */ if (HDclose(out_pdf[0]) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); if (HDclose(in_pdf[1]) < 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); } /* Close unused read end for out_pdf */ diff --git a/test/swmr_addrem_writer.c b/test/swmr_addrem_writer.c index 2a41dc4225f..f5d9af97b6f 100644 --- a/test/swmr_addrem_writer.c +++ b/test/swmr_addrem_writer.c @@ -278,7 +278,7 @@ usage(void) printf("Defaults to verbose (no '-q' given), flushing every 1000 operations\n"); printf("('-f 1000'), and will generate a random seed (no -r given).\n"); printf("\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } int @@ -378,7 +378,7 @@ main(int argc, char *argv[]) /* Open file skeleton */ if ((fid = open_skeleton(FILENAME, verbose)) < 0) { fprintf(stderr, "Error opening skeleton file!\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ /* Send a message to indicate "H5Fopen" is complete--releasing the file lock */ @@ -391,7 +391,7 @@ main(int argc, char *argv[]) /* Grow and shrink datasets */ if (addrem_records(fid, verbose, (unsigned long)nops, (unsigned long)flush_count) < 0) { fprintf(stderr, "Error adding and removing records from datasets!\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ /* Emit informational message */ @@ -401,7 +401,7 @@ main(int argc, char *argv[]) /* Clean up the symbols */ if (shutdown_symbols() < 0) { fprintf(stderr, "Error releasing symbols!\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ /* Emit informational message */ @@ -411,7 +411,7 @@ main(int argc, char *argv[]) /* Close objects opened */ if (H5Fclose(fid) < 0) { fprintf(stderr, "Error closing file!\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ return 0; diff --git a/test/swmr_generator.c b/test/swmr_generator.c index 9b8a689837c..56d16aa12f2 100644 --- a/test/swmr_generator.c +++ b/test/swmr_generator.c @@ -253,7 +253,7 @@ usage(void) printf("compression ('-c -1'), v1 b-tree indexing (-i b1), and will generate a random\n"); printf("seed (no -r given).\n"); printf("\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end usage() */ int @@ -347,7 +347,7 @@ main(int argc, char *argv[]) /* Generate file skeleton */ if (gen_skeleton(FILENAME, verbose, swmr_write, comp_level, index_type, random_seed) < 0) { fprintf(stderr, "Error generating skeleton file!\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ return 0; diff --git a/test/swmr_reader.c b/test/swmr_reader.c index af4a6ae9280..5a0516d12ff 100644 --- a/test/swmr_reader.c +++ b/test/swmr_reader.c @@ -382,7 +382,7 @@ usage(void) printf("5 common symbols to poll ('-h 5'), 10 random symbols to poll ('-l 10'),\n"); printf("and will generate a random seed (no -r given).\n"); printf("\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } int @@ -484,7 +484,7 @@ main(int argc, char *argv[]) HDsnprintf(verbose_name, sizeof(verbose_name), "swmr_reader.out.%u", random_seed); if (NULL == (verbose_file = HDfopen(verbose_name, "w"))) { fprintf(stderr, "Can't open verbose output file!\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } } /* end if */ @@ -507,7 +507,7 @@ main(int argc, char *argv[]) /* Generate dataset names */ if (generate_symbols() < 0) { fprintf(stderr, "Error generating symbol names!\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ /* Create datatype for creating datasets */ @@ -518,7 +518,7 @@ main(int argc, char *argv[]) if (read_records(FILENAME, verbose, verbose_file, random_seed, (unsigned long)nseconds, (unsigned)poll_time, (unsigned)ncommon, (unsigned)nrandom) < 0) { fprintf(stderr, "Error reading records from datasets (random_seed = %u)!\n", random_seed); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ /* Emit informational message */ @@ -528,7 +528,7 @@ main(int argc, char *argv[]) /* Clean up the symbols */ if (shutdown_symbols() < 0) { fprintf(stderr, "Error releasing symbols!\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ /* Emit informational message */ @@ -538,7 +538,7 @@ main(int argc, char *argv[]) /* Close objects created */ if (H5Tclose(symbol_tid) < 0) { fprintf(stderr, "Error closing symbol datatype!\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ return 0; diff --git a/test/swmr_remove_reader.c b/test/swmr_remove_reader.c index 4418d0a06ab..f6c69510f7a 100644 --- a/test/swmr_remove_reader.c +++ b/test/swmr_remove_reader.c @@ -366,7 +366,7 @@ usage(void) printf("5 common symbols to poll ('-h 5'), 10 random symbols to poll ('-l 10'),\n"); printf("and will generate a random seed (no -r given).\n"); printf("\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } int @@ -477,7 +477,7 @@ main(int argc, char *argv[]) /* Generate dataset names */ if (generate_symbols() < 0) { fprintf(stderr, "Error generating symbol names!\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ /* Create datatype for creating datasets */ @@ -488,7 +488,7 @@ main(int argc, char *argv[]) if (read_records(FILENAME, verbose, (unsigned long)nseconds, (unsigned)poll_time, (unsigned)ncommon, (unsigned)nrandom) < 0) { fprintf(stderr, "Error reading records from datasets!\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ /* Emit informational message */ @@ -498,7 +498,7 @@ main(int argc, char *argv[]) /* Clean up the symbols */ if (shutdown_symbols() < 0) { fprintf(stderr, "Error releasing symbols!\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ /* Emit informational message */ @@ -508,7 +508,7 @@ main(int argc, char *argv[]) /* Close objects created */ if (H5Tclose(symbol_tid) < 0) { fprintf(stderr, "Error closing symbol datatype!\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ return 0; diff --git a/test/swmr_remove_writer.c b/test/swmr_remove_writer.c index 3e989f8e3e5..b8587aaacf5 100644 --- a/test/swmr_remove_writer.c +++ b/test/swmr_remove_writer.c @@ -212,7 +212,7 @@ usage(void) printf("Defaults to verbose (no '-q' given), latest format when opening file (no '-o' given),\n"); printf("flushing every 1000 shrinks ('-f 1000'), and will generate a random seed (no -r given).\n"); printf("\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } int @@ -316,7 +316,7 @@ main(int argc, char *argv[]) /* Open file skeleton */ if ((fid = open_skeleton(FILENAME, verbose, old)) < 0) { fprintf(stderr, "Error opening skeleton file!\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ /* Send a message to indicate "H5Fopen" is complete--releasing the file lock */ @@ -329,7 +329,7 @@ main(int argc, char *argv[]) /* Remove records from datasets */ if (remove_records(fid, verbose, (unsigned long)nshrinks, (unsigned long)flush_count) < 0) { fprintf(stderr, "Error removing records from datasets!\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ /* Emit informational message */ @@ -339,7 +339,7 @@ main(int argc, char *argv[]) /* Clean up the symbols */ if (shutdown_symbols() < 0) { fprintf(stderr, "Error releasing symbols!\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ /* Emit informational message */ @@ -349,7 +349,7 @@ main(int argc, char *argv[]) /* Close objects opened */ if (H5Fclose(fid) < 0) { fprintf(stderr, "Error closing file!\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ return 0; diff --git a/test/swmr_sparse_reader.c b/test/swmr_sparse_reader.c index b26ee4a5ad6..d5892828370 100644 --- a/test/swmr_sparse_reader.c +++ b/test/swmr_sparse_reader.c @@ -336,7 +336,7 @@ usage(void) printf("Note that the # of records *must* be the same as that supplied to\n"); printf("swmr_sparse_writer\n"); printf("\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end usage() */ int @@ -409,7 +409,7 @@ main(int argc, char *argv[]) /* Generate dataset names */ if (generate_symbols() < 0) { fprintf(stderr, "Error generating symbol names!\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ /* Create datatype for creating datasets */ @@ -420,7 +420,7 @@ main(int argc, char *argv[]) if (read_records(FILENAME, verbose, (unsigned long)nrecords, (unsigned)poll_time, (unsigned)reopen_count) < 0) { fprintf(stderr, "Error reading records from datasets!\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ /* Emit informational message */ @@ -430,7 +430,7 @@ main(int argc, char *argv[]) /* Clean up the symbols */ if (shutdown_symbols() < 0) { fprintf(stderr, "Error releasing symbols!\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ /* Emit informational message */ @@ -440,7 +440,7 @@ main(int argc, char *argv[]) /* Close objects created */ if (H5Tclose(symbol_tid) < 0) { fprintf(stderr, "Error closing symbol datatype!\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ return 0; diff --git a/test/swmr_sparse_writer.c b/test/swmr_sparse_writer.c index b3c471d649c..dcb5ebb02c0 100644 --- a/test/swmr_sparse_writer.c +++ b/test/swmr_sparse_writer.c @@ -313,7 +313,7 @@ usage(void) printf("Defaults to verbose (no '-q' given) and flushing every 1000 records\n"); printf("('-f 1000')\n"); printf("\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } int @@ -389,7 +389,7 @@ main(int argc, char *argv[]) /* Open file skeleton */ if ((fid = open_skeleton(FILENAME, verbose)) < 0) { fprintf(stderr, "Error opening skeleton file!\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ /* Send a message to indicate "H5Fopen" is complete--releasing the file lock */ @@ -402,7 +402,7 @@ main(int argc, char *argv[]) /* Append records to datasets */ if (add_records(fid, verbose, (unsigned long)nrecords, (unsigned long)flush_count) < 0) { fprintf(stderr, "Error appending records to datasets!\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ /* Emit informational message */ @@ -412,7 +412,7 @@ main(int argc, char *argv[]) /* Clean up the symbols */ if (shutdown_symbols() < 0) { fprintf(stderr, "Error releasing symbols!\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ /* Emit informational message */ @@ -422,7 +422,7 @@ main(int argc, char *argv[]) /* Close objects opened */ if (H5Fclose(fid) < 0) { fprintf(stderr, "Error closing file!\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ return 0; diff --git a/test/swmr_start_write.c b/test/swmr_start_write.c index 156821495a9..7bb2bea7c11 100644 --- a/test/swmr_start_write.c +++ b/test/swmr_start_write.c @@ -340,7 +340,7 @@ usage(void) printf("v1 b-tree indexing (-i b1), compression ('-c -1'),\n"); printf("will generate a random seed (no -r given), and verbose (no '-q' given)\n"); printf("\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* usage() */ /* @@ -451,7 +451,7 @@ main(int argc, char *argv[]) HDsnprintf(verbose_name, sizeof(verbose_name), "swmr_writer.out.%u", random_seed); if (NULL == (verbose_file = HDfopen(verbose_name, "w"))) { fprintf(stderr, "Can't open verbose output file!\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } } /* end if */ @@ -470,7 +470,7 @@ main(int argc, char *argv[]) /* Create the test file */ if ((fid = create_file(FILENAME, verbose, verbose_file, random_seed)) < 0) { fprintf(stderr, "Error creating the file...\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* Emit informational message */ @@ -484,13 +484,13 @@ main(int argc, char *argv[]) /* Create the datasets in the file */ if (create_datasets(fid, comp_level, verbose, verbose_file, index_type) < 0) { fprintf(stderr, "Error creating datasets...\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* Enable SWMR writing mode */ if (H5Fstart_swmr_write(fid) < 0) { fprintf(stderr, "Error starting SWMR writing mode...\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* Send a message to indicate "H5Fopen" is complete--releasing the file lock */ @@ -503,7 +503,7 @@ main(int argc, char *argv[]) /* Append records to datasets */ if (add_records(fid, verbose, verbose_file, (unsigned long)nrecords, (unsigned long)flush_count) < 0) { fprintf(stderr, "Error appending records to datasets!\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ /* Emit informational message */ @@ -513,7 +513,7 @@ main(int argc, char *argv[]) /* Clean up the symbols */ if (shutdown_symbols() < 0) { fprintf(stderr, "Error releasing symbols!\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ /* Emit informational message */ @@ -523,7 +523,7 @@ main(int argc, char *argv[]) /* Close objects opened */ if (H5Fclose(fid) < 0) { fprintf(stderr, "Error closing file!\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ return 0; diff --git a/test/swmr_writer.c b/test/swmr_writer.c index fa24880f321..27865cebb88 100644 --- a/test/swmr_writer.c +++ b/test/swmr_writer.c @@ -270,7 +270,7 @@ usage(void) printf("Defaults to verbose (no '-q' given), latest format when opening file (no '-o' given),\n"); printf("flushing every 10000 records ('-f 10000'), and will generate a random seed (no -r given).\n"); printf("\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } int @@ -359,7 +359,7 @@ main(int argc, char *argv[]) HDsnprintf(verbose_name, sizeof(verbose_name), "swmr_writer.out.%u", random_seed); if (NULL == (verbose_file = HDfopen(verbose_name, "w"))) { fprintf(stderr, "Can't open verbose output file!\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } } /* end if */ @@ -388,7 +388,7 @@ main(int argc, char *argv[]) /* Open file skeleton */ if ((fid = open_skeleton(FILENAME, verbose, verbose_file, random_seed, old)) < 0) { fprintf(stderr, "Error opening skeleton file!\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ /* Send a message to indicate "H5Fopen" is complete--releasing the file lock */ @@ -401,7 +401,7 @@ main(int argc, char *argv[]) /* Append records to datasets */ if (add_records(fid, verbose, verbose_file, (unsigned long)nrecords, (unsigned long)flush_count) < 0) { fprintf(stderr, "Error appending records to datasets!\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ /* Emit informational message */ @@ -411,7 +411,7 @@ main(int argc, char *argv[]) /* Clean up the symbols */ if (shutdown_symbols() < 0) { fprintf(stderr, "Error releasing symbols!\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ /* Emit informational message */ @@ -421,7 +421,7 @@ main(int argc, char *argv[]) /* Close objects opened */ if (H5Fclose(fid) < 0) { fprintf(stderr, "Error closing file!\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ return 0; diff --git a/test/tcheck_version.c b/test/tcheck_version.c index 8bcebab7e3d..1fea8aec971 100644 --- a/test/tcheck_version.c +++ b/test/tcheck_version.c @@ -63,7 +63,7 @@ parse(int ac, char **av) pt = *(++av); if (*pt != '-') { fprintf(stderr, "Unknown option(%s). Aborted.\n", *av); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } else { switch (*(++pt)) { @@ -80,15 +80,15 @@ parse(int ac, char **av) break; default: fprintf(stderr, "Unknown -v parameter (%s). Aborted.\n", *av); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } break; case 'h': /* help page */ showhelp(); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); default: fprintf(stderr, "Unknown option(%s). Aborted.\n", *av); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } } } @@ -106,7 +106,7 @@ parse(int ac, char **av) H5_ATTR_NORETURN void abort_intercept(int H5_ATTR_UNUSED sig) { - HDexit(6); + exit(6); } #ifdef H5_HAVE_WIN32_API diff --git a/test/testframe.c b/test/testframe.c index cd2947b1d1e..7be39eaafc4 100644 --- a/test/testframe.c +++ b/test/testframe.c @@ -73,11 +73,11 @@ AddTest(const char *TheName, void (*TheCall)(void), void (*Cleanup)(void), const /* Sanity checking */ if (HDstrlen(TheDescr) >= MAXTESTDESC) { printf("Test description ('%s') too long, increase MAXTESTDESC(%d).\n", TheDescr, MAXTESTDESC); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } if (HDstrlen(TheName) >= MAXTESTNAME) { printf("Test name too long, increase MAXTESTNAME(%d).\n", MAXTESTNAME); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* Check for increasing the Test array size */ @@ -89,7 +89,7 @@ AddTest(const char *TheName, void (*TheCall)(void), void (*Cleanup)(void), const if (NULL == (newTest = (TestStruct *)realloc(Test, newAlloc * sizeof(TestStruct)))) { printf("Out of memory for tests, Index = %u, TestAlloc = %u, newAlloc = %u\n", Index, TestAlloc, newAlloc); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* Update info */ @@ -230,7 +230,7 @@ TestParseCmdLine(int argc, char *argv[]) } else { TestUsage(); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } } else if (((HDstrcmp(*argv, "-exclude") == 0) || (HDstrcmp(*argv, "-x") == 0))) { @@ -241,7 +241,7 @@ TestParseCmdLine(int argc, char *argv[]) } else { TestUsage(); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } } else if (((HDstrcmp(*argv, "-begin") == 0) || (HDstrcmp(*argv, "-b") == 0))) { @@ -252,7 +252,7 @@ TestParseCmdLine(int argc, char *argv[]) } else { TestUsage(); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } } else if (((HDstrcmp(*argv, "-only") == 0) || (HDstrcmp(*argv, "-o") == 0))) { @@ -272,7 +272,7 @@ TestParseCmdLine(int argc, char *argv[]) } else { TestUsage(); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } } else if ((HDstrcmp(*argv, "-summary") == 0) || (HDstrcmp(*argv, "-s") == 0)) @@ -281,7 +281,7 @@ TestParseCmdLine(int argc, char *argv[]) enable_error_stack = 1; else if ((HDstrcmp(*argv, "-help") == 0) || (HDstrcmp(*argv, "-h") == 0)) { TestUsage(); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); } else if ((HDstrcmp(*argv, "-cleanoff") == 0) || (HDstrcmp(*argv, "-c") == 0)) SetTestNoCleanup(); @@ -295,7 +295,7 @@ TestParseCmdLine(int argc, char *argv[]) if (NULL != TestPrivateParser) { ret_code = TestPrivateParser(argc + 1, argv - 1); if (ret_code != 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } } diff --git a/test/testhdf5.c b/test/testhdf5.c index 711c9dcebb4..82bc2b6ccec 100644 --- a/test/testhdf5.c +++ b/test/testhdf5.c @@ -89,7 +89,7 @@ main(int argc, char *argv[]) /* Exit failure if errors encountered; else exit success. */ /* No need to print anything since PerformTests() already does. */ if (GetTestNumErrs() > 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); else - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); } /* end main() */ diff --git a/test/thread_id.c b/test/thread_id.c index ebe4a798b81..7d4b7fefbbf 100644 --- a/test/thread_id.c +++ b/test/thread_id.c @@ -39,7 +39,7 @@ my_errx(int code, const char *fmt, ...) (void)HDvfprintf(stderr, fmt, ap); va_end(ap); (void)HDfputc('\n', stderr); - HDexit(code); + exit(code); } #if defined(H5_HAVE_DARWIN) @@ -181,7 +181,7 @@ my_err(int code, const char *fmt, ...) (void)HDvfprintf(stderr, fmt, ap); va_end(ap); (void)fprintf(stderr, ": %s\n", HDstrerror(errno_copy)); - HDexit(code); + exit(code); } #define threads_failure(_call, _result) \ diff --git a/test/twriteorder.c b/test/twriteorder.c index 5f47a953d0d..e85968a365c 100644 --- a/test/twriteorder.c +++ b/test/twriteorder.c @@ -136,7 +136,7 @@ parse_option(int argc, char *const argv[]) switch (c) { case 'h': usage(progname_g); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); break; case 'b': /* number of planes to write/read */ if ((blocksize_g = HDatoi(optarg)) <= 0) { @@ -395,12 +395,12 @@ main(int argc, char *argv[]) printf("%d: launch reader process\n", mypid); if (read_wo_file() < 0) { fprintf(stderr, "read_wo_file encountered error\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* Reader is done. Clean up by removing the data file */ HDremove(DATAFILE); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); } } diff --git a/test/unlink.c b/test/unlink.c index a455139d8b7..1278975db9e 100644 --- a/test/unlink.c +++ b/test/unlink.c @@ -3076,15 +3076,15 @@ main(void) if (nerrors) { printf("***** %d FAILURE%s! *****\n", nerrors, 1 == nerrors ? "" : "S"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } HDputs("All unlink tests passed."); h5_cleanup(FILENAME, fapl); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); error: - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end main() */ diff --git a/test/unregister.c b/test/unregister.c index 4d73783a0b0..0dbcbd5974b 100644 --- a/test/unregister.c +++ b/test/unregister.c @@ -305,7 +305,7 @@ main(void) FAIL_STACK_ERROR; api_ctx_pushed = FALSE; - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); error: nerrors = MAX(1, nerrors); @@ -314,5 +314,5 @@ main(void) if (api_ctx_pushed) H5CX_pop(FALSE); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end main() */ diff --git a/test/use_append_chunk.c b/test/use_append_chunk.c index 71b801918b5..2b070fa3ab8 100644 --- a/test/use_append_chunk.c +++ b/test/use_append_chunk.c @@ -185,17 +185,17 @@ main(int argc, char *argv[]) printf("%d: launch reader process\n", mypid); if ((UC_opts.fapl_id = h5_fileaccess()) < 0) { fprintf(stderr, "can't create read FAPL\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } if (read_uc_file(send_wait, &UC_opts) < 0) { fprintf(stderr, "read_uc_file encountered error\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } if (H5Pclose(UC_opts.fapl_id) < 0) { fprintf(stderr, "can't close read FAPL\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); } } diff --git a/test/use_append_chunk_mirror.c b/test/use_append_chunk_mirror.c index eecc2c241c6..a12d7655772 100644 --- a/test/use_append_chunk_mirror.c +++ b/test/use_append_chunk_mirror.c @@ -279,10 +279,10 @@ main(int argc, char *argv[]) UC_opts.fapl_id = H5P_DEFAULT; if (read_uc_file(send_wait, &UC_opts) < 0) { fprintf(stderr, "read_uc_file encountered error (%d)\n", mypid); - HDexit(1); + exit(1); } - HDexit(0); + exit(0); } } diff --git a/test/use_append_mchunks.c b/test/use_append_mchunks.c index ed56ca32805..756254c7a4c 100644 --- a/test/use_append_mchunks.c +++ b/test/use_append_mchunks.c @@ -179,17 +179,17 @@ main(int argc, char *argv[]) printf("%d: launch reader process\n", mypid); if ((UC_opts.fapl_id = h5_fileaccess()) < 0) { fprintf(stderr, "can't create read FAPL\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } if (read_uc_file(send_wait, &UC_opts) < 0) { fprintf(stderr, "read_uc_file encountered error\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } if (H5Pclose(UC_opts.fapl_id) < 0) { fprintf(stderr, "can't close read FAPL\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); } } diff --git a/test/use_common.c b/test/use_common.c index fde73e8cdd0..d02ba2998fe 100644 --- a/test/use_common.c +++ b/test/use_common.c @@ -66,7 +66,7 @@ parse_option(int argc, char *const argv[], options_t *opts) switch (c) { case 'h': usage(opts->progname); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); break; case 'f': /* usecase data file name */ opts->filename = HDstrdup(optarg); diff --git a/test/use_disable_mdc_flushes.c b/test/use_disable_mdc_flushes.c index f2a4e0f113e..17ac194cff5 100644 --- a/test/use_disable_mdc_flushes.c +++ b/test/use_disable_mdc_flushes.c @@ -102,7 +102,7 @@ parse_option(int argc, char *const argv[]) switch (c) { case 'h': usage(progname_g); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); break; case 'f': /* usecase data file name */ filename_g = optarg; @@ -543,7 +543,7 @@ int main(void) { fprintf(stderr, "Non-POSIX platform. Skipping.\n"); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); } /* end main() */ #endif /* H5_HAVE_UNISTD_H */ diff --git a/test/vds.c b/test/vds.c index d65f788c8ec..69e428b51e2 100644 --- a/test/vds.c +++ b/test/vds.c @@ -12325,7 +12325,7 @@ main(void) */ if (driver_is_parallel || !HDstrcmp(env_h5_drvr, "splitter")) { HDputs(" -- SKIPPED for incompatible VFD --"); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); } h5_fixname(FILENAME[0], fapl, filename, sizeof(filename)); diff --git a/test/vds_env.c b/test/vds_env.c index 5301dee9d27..65999dd6907 100644 --- a/test/vds_env.c +++ b/test/vds_env.c @@ -348,7 +348,7 @@ main(void) */ if (driver_is_parallel || !HDstrcmp(env_h5_drvr, "splitter")) { HDputs(" -- SKIPPED for incompatible VFD --"); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); } /* Set to use the latest file format */ diff --git a/test/vfd.c b/test/vfd.c index 3e87980ba18..4d4ef8d4585 100644 --- a/test/vfd.c +++ b/test/vfd.c @@ -5954,7 +5954,7 @@ main(void) env_h5_drvr = HDgetenv(HDF5_DRIVER); if (env_h5_drvr) { printf(" -- SKIPPED VFD tests because %s is set -- \n", HDF5_DRIVER); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); } h5_reset(); diff --git a/test/vfd_plugin.c b/test/vfd_plugin.c index 60148aa00af..fab3c96c1a5 100644 --- a/test/vfd_plugin.c +++ b/test/vfd_plugin.c @@ -430,10 +430,10 @@ main(void) if (nerrors) { printf("***** %d VFD plugin TEST%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : ""); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } HDputs("All VFD plugin tests passed."); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); } diff --git a/test/vol.c b/test/vol.c index c9a9aa157a3..79223e70bf4 100644 --- a/test/vol.c +++ b/test/vol.c @@ -2656,11 +2656,11 @@ main(void) if (nerrors) { printf("***** %d Virtual Object Layer TEST%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : ""); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } HDputs("All Virtual Object Layer (VOL) tests passed."); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); } /* end main() */ diff --git a/test/vol_plugin.c b/test/vol_plugin.c index d3ff4fd43c6..acf4dfc5d02 100644 --- a/test/vol_plugin.c +++ b/test/vol_plugin.c @@ -343,11 +343,11 @@ main(void) if (nerrors) { printf("***** %d VOL connector plugin TEST%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : ""); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } HDputs("All VOL connector plugin tests passed."); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); } /* end main() */ diff --git a/testpar/API/H5_api_test_parallel.c b/testpar/API/H5_api_test_parallel.c index 47c974d096d..a7f28392caa 100644 --- a/testpar/API/H5_api_test_parallel.c +++ b/testpar/API/H5_api_test_parallel.c @@ -189,7 +189,7 @@ main(int argc, char **argv) */ if (MPI_SUCCESS != MPI_Init_thread(&argc, &argv, required, &provided)) { fprintf(stderr, "MPI_Init_thread failed\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); @@ -442,7 +442,7 @@ main(int argc, char **argv) MPI_Finalize(); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); error: free(vol_connector_string_copy); @@ -457,5 +457,5 @@ main(int argc, char **argv) MPI_Finalize(); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } diff --git a/testpar/t_cache_image.c b/testpar/t_cache_image.c index 96b5b7ae089..c1fb68dcf67 100644 --- a/testpar/t_cache_image.c +++ b/testpar/t_cache_image.c @@ -1741,7 +1741,7 @@ par_insert_cache_image(int file_name_idx, int mpi_rank, int mpi_size) if (!serial_insert_cache_image(file_name_idx, mpi_size)) { fprintf(stderr, "\n\nCache image insertion failed.\n"); fprintf(stderr, " failure mssg = \"%s\"\n", failure_mssg); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } } } @@ -3607,7 +3607,7 @@ main(int argc, char **argv) } else { printf("failed.\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } i++; } diff --git a/testpar/t_pflush1.c b/testpar/t_pflush1.c index 6a7a346aa7e..774087f70ae 100644 --- a/testpar/t_pflush1.c +++ b/testpar/t_pflush1.c @@ -142,7 +142,7 @@ main(int argc, char *argv[]) HDputs(" Test not compatible with current Virtual File Driver"); } MPI_Finalize(); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } if (NULL == (data_g = malloc(100 * 100 * sizeof(*data_g)))) @@ -207,7 +207,7 @@ main(int argc, char *argv[]) * always ignore the failure condition than to handle some * platforms returning success and others failure. */ - HD_exit(EXIT_FAILURE); + _exit(EXIT_FAILURE); error: HDfflush(stdout); @@ -219,5 +219,5 @@ main(int argc, char *argv[]) if (data_g) free(data_g); - HD_exit(EXIT_FAILURE); + _exit(EXIT_FAILURE); } /* end main() */ diff --git a/testpar/t_pflush2.c b/testpar/t_pflush2.c index 6148bb6db2f..ff297e2c07d 100644 --- a/testpar/t_pflush2.c +++ b/testpar/t_pflush2.c @@ -167,7 +167,7 @@ main(int argc, char *argv[]) HDputs(" Test not compatible with current Virtual File Driver"); } MPI_Finalize(); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); } if (NULL == (data_g = malloc(100 * 100 * sizeof(*data_g)))) @@ -223,11 +223,11 @@ main(int argc, char *argv[]) MPI_Finalize(); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); error: if (data_g) free(data_g); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end main() */ diff --git a/testpar/t_pread.c b/testpar/t_pread.c index 55e65160e42..3f8f5b27c9d 100644 --- a/testpar/t_pread.c +++ b/testpar/t_pread.c @@ -1078,17 +1078,17 @@ main(int argc, char **argv) if ((MPI_Init(&argc, &argv)) != MPI_SUCCESS) { fprintf(stderr, "FATAL: Unable to initialize MPI\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } if ((MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank)) != MPI_SUCCESS) { fprintf(stderr, "FATAL: MPI_Comm_rank returned an error\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } if ((MPI_Comm_size(MPI_COMM_WORLD, &mpi_size)) != MPI_SUCCESS) { fprintf(stderr, "FATAL: MPI_Comm_size returned an error\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } H5open(); @@ -1122,7 +1122,7 @@ main(int argc, char **argv) if ((MPI_Comm_split(MPI_COMM_WORLD, which_group, 0, &group_comm)) != MPI_SUCCESS) { fprintf(stderr, "FATAL: MPI_Comm_split returned an error\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* ------ Generate all files ------ */ diff --git a/testpar/t_subfiling_vfd.c b/testpar/t_subfiling_vfd.c index f8043b1b1a3..6e850d49592 100644 --- a/testpar/t_subfiling_vfd.c +++ b/testpar/t_subfiling_vfd.c @@ -2469,7 +2469,7 @@ main(int argc, char **argv) MPI_Finalize(); - HDexit(nerrors ? EXIT_FAILURE : EXIT_SUCCESS); + exit(nerrors ? EXIT_FAILURE : EXIT_SUCCESS); } #else /* H5_HAVE_SUBFILING_VFD */ @@ -2480,7 +2480,7 @@ main(void) h5_reset(); printf("Testing Subfiling VFD functionality\n"); printf("SKIPPED - Subfiling VFD not built\n"); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); } #endif /* H5_HAVE_SUBFILING_VFD */ diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c index dd69eb89d9e..983d4af00d3 100644 --- a/tools/lib/h5tools_utils.c +++ b/tools/lib/h5tools_utils.c @@ -509,7 +509,7 @@ indentation(unsigned x) } else { fprintf(rawerrorstream, "error: the indentation exceeds the number of cols.\n"); - HDexit(1); + exit(1); } } diff --git a/tools/src/h5copy/h5copy.c b/tools/src/h5copy/h5copy.c index deae9a9dda2..3d01635b1cf 100644 --- a/tools/src/h5copy/h5copy.c +++ b/tools/src/h5copy/h5copy.c @@ -63,7 +63,7 @@ leave(int ret) free(str_flag); h5tools_close(); - HDexit(ret); + exit(ret); } /*------------------------------------------------------------------------- diff --git a/tools/src/h5diff/h5diff_main.c b/tools/src/h5diff/h5diff_main.c index fd594db9091..f2ab2f97615 100644 --- a/tools/src/h5diff/h5diff_main.c +++ b/tools/src/h5diff/h5diff_main.c @@ -124,5 +124,5 @@ h5diff_exit(int status) { h5tools_close(); - HDexit(status); + exit(status); } diff --git a/tools/src/h5diff/ph5diff_main.c b/tools/src/h5diff/ph5diff_main.c index d1be2ff94be..a74be6b3730 100644 --- a/tools/src/h5diff/ph5diff_main.c +++ b/tools/src/h5diff/ph5diff_main.c @@ -303,5 +303,5 @@ h5diff_exit(int status) /* Always exit(0), since MPI implementations do weird stuff when they * receive a non-zero exit value. - QAK */ - HDexit(status); + exit(status); } diff --git a/tools/src/h5dump/h5dump.c b/tools/src/h5dump/h5dump.c index 3b17a34a761..0aa2d78971c 100644 --- a/tools/src/h5dump/h5dump.c +++ b/tools/src/h5dump/h5dump.c @@ -159,7 +159,7 @@ leave(int ret) { h5tools_close(); - HDexit(ret); + exit(ret); } /*------------------------------------------------------------------------- diff --git a/tools/src/h5format_convert/h5format_convert.c b/tools/src/h5format_convert/h5format_convert.c index 648b9a82a1e..b39b4514faf 100644 --- a/tools/src/h5format_convert/h5format_convert.c +++ b/tools/src/h5format_convert/h5format_convert.c @@ -178,7 +178,7 @@ leave(int ret) { h5tools_close(); - HDexit(ret); + exit(ret); } /* leave() */ /*------------------------------------------------------------------------- diff --git a/tools/src/h5import/h5import.c b/tools/src/h5import/h5import.c index d6273e275d3..06a160b86b1 100644 --- a/tools/src/h5import/h5import.c +++ b/tools/src/h5import/h5import.c @@ -106,7 +106,7 @@ main(int argc, char *argv[]) if (argv[1] && (HDstrcmp("-V", argv[1]) == 0)) { print_version(PROGRAMNAME); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); } /* @@ -168,7 +168,7 @@ main(int argc, char *argv[]) case 6: /* -h found; help, then exit */ help(argv[0]); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); break; case 7: /* -d found; look for dimensions */ diff --git a/tools/src/h5jam/h5jam.c b/tools/src/h5jam/h5jam.c index 91eb93795f8..04b29ea88a3 100644 --- a/tools/src/h5jam/h5jam.c +++ b/tools/src/h5jam/h5jam.c @@ -89,7 +89,7 @@ leave(int ret) { h5tools_close(); - HDexit(ret); + exit(ret); } /*------------------------------------------------------------------------- @@ -395,7 +395,7 @@ copy_some_to_file(int infid, int outfid, hsize_t starting, hsize_t startout, ssi res = HDfstat(infid, &sbuf); if (res < 0) { error_msg("Can't stat file \n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ howmuch = (ssize_t)sbuf.st_size; @@ -432,12 +432,12 @@ copy_some_to_file(int infid, int outfid, hsize_t starting, hsize_t startout, ssi if (nchars <= 0) { error_msg("Read error \n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ if (HDwrite(outfid, buf, (unsigned)nchars) < 0) { error_msg("Write error \n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } tot += nchars; diff --git a/tools/src/h5jam/h5unjam.c b/tools/src/h5jam/h5unjam.c index 34c817d451b..077f128976a 100644 --- a/tools/src/h5jam/h5unjam.c +++ b/tools/src/h5jam/h5unjam.c @@ -156,7 +156,7 @@ static void leave(int ret) { h5tools_close(); - HDexit(ret); + exit(ret); } /*------------------------------------------------------------------------- diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c index 219abfd7c50..dedba57295c 100644 --- a/tools/src/h5ls/h5ls.c +++ b/tools/src/h5ls/h5ls.c @@ -2630,7 +2630,7 @@ leave(int ret) { h5tools_close(); - HDexit(ret); + exit(ret); } /*------------------------------------------------------------------------- diff --git a/tools/src/h5perf/pio_perf.c b/tools/src/h5perf/pio_perf.c index 3be19f8a970..d34fb087d58 100644 --- a/tools/src/h5perf/pio_perf.c +++ b/tools/src/h5perf/pio_perf.c @@ -1306,7 +1306,7 @@ parse_command_line(int argc, const char *const *argv) } else { fprintf(stderr, "pio_perf: invalid --api option %s\n", buf); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } if (*end == '\0') @@ -1354,7 +1354,7 @@ parse_command_line(int argc, const char *const *argv) for (j = 0; j < 10 && buf[j] != '\0'; ++j) if (!isdigit(buf[j])) { fprintf(stderr, "pio_perf: invalid --debug option %s\n", buf); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } pio_debug_level = atoi(buf); @@ -1380,7 +1380,7 @@ parse_command_line(int argc, const char *const *argv) break; default: fprintf(stderr, "pio_perf: invalid --debug option %s\n", buf); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } } @@ -1524,7 +1524,7 @@ parse_size_directive(const char *size) break; default: fprintf(stderr, "Illegal size specifier '%c'\n", *endptr); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } } diff --git a/tools/src/h5perf/sio_perf.c b/tools/src/h5perf/sio_perf.c index a991e19ae4e..9bbc92fe5e6 100644 --- a/tools/src/h5perf/sio_perf.c +++ b/tools/src/h5perf/sio_perf.c @@ -873,7 +873,7 @@ parse_command_line(int argc, const char *const *argv) } else { fprintf(stderr, "sio_perf: invalid --api option %s\n", buf); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } if (*end == '\0') @@ -937,7 +937,7 @@ parse_command_line(int argc, const char *const *argv) for (j = 0; j < 10 && buf[j] != '\0'; ++j) if (!HDisdigit(buf[j])) { fprintf(stderr, "sio_perf: invalid --debug option %s\n", buf); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } sio_debug_level = atoi(buf); @@ -963,7 +963,7 @@ parse_command_line(int argc, const char *const *argv) break; default: fprintf(stderr, "sio_perf: invalid --debug option %s\n", buf); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } } @@ -1035,7 +1035,7 @@ parse_command_line(int argc, const char *const *argv) } else { fprintf(stderr, "sio_perf: invalid --api option %s\n", H5_optarg); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } break; case 'w': @@ -1199,7 +1199,7 @@ parse_size_directive(const char *size) default: fprintf(stderr, "Illegal size specifier '%c'\n", *endptr); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } } diff --git a/tools/src/h5repack/h5repack_main.c b/tools/src/h5repack/h5repack_main.c index a164d6a6dcc..1265a9d6a76 100644 --- a/tools/src/h5repack/h5repack_main.c +++ b/tools/src/h5repack/h5repack_main.c @@ -371,7 +371,7 @@ static void leave(int ret) { h5tools_close(); - HDexit(ret); + exit(ret); } /*------------------------------------------------------------------------- diff --git a/tools/src/h5repack/h5repack_opttable.c b/tools/src/h5repack/h5repack_opttable.c index 64f3011a96d..2018527a4f6 100644 --- a/tools/src/h5repack/h5repack_opttable.c +++ b/tools/src/h5repack/h5repack_opttable.c @@ -200,7 +200,7 @@ options_add_layout(obj_list_t *obj_list, unsigned n_objs, pack_info_t *pack, pac /* already chunk info inserted for this one; exit */ if (table->objs[i].chunk.rank > 0) { H5TOOLS_INFO("chunk information already inserted for <%s>\n", obj_list[j].obj); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* insert the layout info */ else { diff --git a/tools/src/h5repack/h5repack_parse.c b/tools/src/h5repack/h5repack_parse.c index d4fa990e9fc..551027f51e0 100644 --- a/tools/src/h5repack/h5repack_parse.c +++ b/tools/src/h5repack/h5repack_parse.c @@ -105,7 +105,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t if (obj_list) free(obj_list); error_msg("input Error: Invalid compression type in <%s>\n", str); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* get filter additional parameters */ @@ -136,7 +136,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t if (obj_list) free(obj_list); error_msg("compression parameter not digit in <%s>\n", str); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } if (l == -1) stype[m] = c; @@ -152,7 +152,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t filt->cd_values[j++] = H5_SZIP_EC_OPTION_MASK; else { error_msg("szip mask must be 'NN' or 'EC' \n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } } } @@ -186,7 +186,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t if (obj_list) free(obj_list); error_msg("compression parameter is not a digit in <%s>\n", str); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } if (l == -1) stype[m] = c; @@ -202,7 +202,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t filt->cd_values[j++] = H5Z_SO_FLOAT_DSCALE; else { error_msg("scale type must be 'IN' or 'DS' \n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } } } @@ -246,13 +246,13 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t if (obj_list) free(obj_list); error_msg("filter number parameter is not a digit in <%s>\n", str); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } else if (!HDisdigit(c) && f == -1) { if (obj_list) free(obj_list); error_msg("filter flag parameter is not a digit in <%s>\n", str); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } stype[q] = c; } /* for u */ @@ -271,7 +271,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t if (obj_list) free(obj_list); error_msg("compression parameter is not a digit in <%s>\n", str); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } stype[m] = c; } /* u */ @@ -314,7 +314,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t if (obj_list) free(obj_list); error_msg("missing compression parameter in <%s>\n", str); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } } @@ -329,7 +329,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t if (obj_list) free(obj_list); error_msg("missing compression parameter in <%s>\n", str); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } } @@ -344,7 +344,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t if (obj_list) free(obj_list); error_msg("extra parameter in SHUF <%s>\n", str); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } } /*------------------------------------------------------------------------- @@ -358,7 +358,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t if (obj_list) free(obj_list); error_msg("extra parameter in FLET <%s>\n", str); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } } /*------------------------------------------------------------------------- @@ -372,7 +372,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t if (obj_list) free(obj_list); error_msg("extra parameter in NBIT <%s>\n", str); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } } /*------------------------------------------------------------------------- @@ -386,7 +386,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t if (obj_list) free(obj_list); error_msg("missing compression parameter in <%s>\n", str); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } } /*------------------------------------------------------------------------- @@ -399,14 +399,14 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t if (obj_list) free(obj_list); error_msg("incorrect number of compression parameters in <%s>\n", str); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } } else { if (obj_list) free(obj_list); error_msg("invalid filter type in <%s>\n", str); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } break; } @@ -427,7 +427,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t if (obj_list) free(obj_list); error_msg("invalid compression parameter in <%s>\n", str); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } break; /*------------------------------------------------------------------------- @@ -440,19 +440,19 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t if (obj_list) free(obj_list); error_msg("pixels_per_block is not even in <%s>\n", str); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } if (pixels_per_block > H5_SZIP_MAX_PIXELS_PER_BLOCK) { if (obj_list) free(obj_list); error_msg("pixels_per_block is too large in <%s>\n", str); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } if ((HDstrcmp(smask, "NN") != 0) && (HDstrcmp(smask, "EC") != 0)) { if (obj_list) free(obj_list); error_msg("szip mask must be 'NN' or 'EC' \n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } break; default: @@ -543,7 +543,7 @@ parse_layout(const char *str, unsigned *n_objs, pack_info_t *pack, /* info about if (obj_list) free(obj_list); error_msg("in parse layout, no characters after : in <%s>\n", str); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* get layout info */ @@ -558,7 +558,7 @@ parse_layout(const char *str, unsigned *n_objs, pack_info_t *pack, /* info about pack->layout = H5D_CHUNKED; else { error_msg("in parse layout, not a valid layout in <%s>\n", str); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } } else { @@ -577,7 +577,7 @@ parse_layout(const char *str, unsigned *n_objs, pack_info_t *pack, /* info about if (obj_list) free(obj_list); error_msg("in parse layout, <%s> Chunk dimensions missing\n", str); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } for (i = j, c_index = 0; i < len; i++) { @@ -589,7 +589,7 @@ parse_layout(const char *str, unsigned *n_objs, pack_info_t *pack, /* info about if (obj_list) free(obj_list); error_msg("in parse layout, <%s> Not a valid character in <%s>\n", sdim, str); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } if (c == 'x' || i == len - 1) { @@ -601,7 +601,7 @@ parse_layout(const char *str, unsigned *n_objs, pack_info_t *pack, /* info about if (obj_list) free(obj_list); error_msg("in parse layout, <%s> conversion to number in <%s>\n", sdim, str); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } c_index++; } @@ -617,7 +617,7 @@ parse_layout(const char *str, unsigned *n_objs, pack_info_t *pack, /* info about if (obj_list) free(obj_list); error_msg("in parse layout, <%s> conversion to number in <%s>\n", sdim, str); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } pack->chunk.rank = c_index + 1; } diff --git a/tools/src/h5stat/h5stat.c b/tools/src/h5stat/h5stat.c index 23bde1a9b62..fc651a11aeb 100644 --- a/tools/src/h5stat/h5stat.c +++ b/tools/src/h5stat/h5stat.c @@ -192,7 +192,7 @@ static void leave(int ret) { h5tools_close(); - HDexit(ret); + exit(ret); } /*------------------------------------------------------------------------- diff --git a/tools/src/misc/h5clear.c b/tools/src/misc/h5clear.c index 4a6029cc33e..da9c7e5ddbc 100644 --- a/tools/src/misc/h5clear.c +++ b/tools/src/misc/h5clear.c @@ -189,7 +189,7 @@ static void leave(int ret) { h5tools_close(); - HDexit(ret); + exit(ret); } /* leave() */ /*------------------------------------------------------------------------- diff --git a/tools/src/misc/h5mkgrp.c b/tools/src/misc/h5mkgrp.c index a359db6b813..08d8f331200 100644 --- a/tools/src/misc/h5mkgrp.c +++ b/tools/src/misc/h5mkgrp.c @@ -69,7 +69,7 @@ leave(int ret) error_msg("Could not close file access property list\n"); h5tools_close(); - HDexit(ret); + exit(ret); } /* end leave() */ /*------------------------------------------------------------------------- diff --git a/tools/src/misc/h5repart.c b/tools/src/misc/h5repart.c index 843e9a3f394..17c3a97fd31 100644 --- a/tools/src/misc/h5repart.c +++ b/tools/src/misc/h5repart.c @@ -65,7 +65,7 @@ usage(const char *progname) "'k' for kB.\n"); fprintf(stderr, "File family names include an integer printf " "format such as '%%d'\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /*------------------------------------------------------------------------- @@ -204,7 +204,7 @@ main(int argc, char *argv[]) else if (!HDstrcmp(argv[argno], "-V")) { printf("This is %s version %u.%u release %u\n", prog_name, H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); } else if (!HDstrcmp(argv[argno], "-family_to_sec2")) { family_to_single = TRUE; @@ -227,9 +227,9 @@ main(int argc, char *argv[]) /* allocate names */ if (NULL == (src_name = (char *)calloc((size_t)NAMELEN, sizeof(char)))) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); if (NULL == (dst_name = (char *)calloc((size_t)NAMELEN, sizeof(char)))) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); /* * Get the name for the source file and open the first member. The size @@ -243,12 +243,12 @@ main(int argc, char *argv[]) if ((src = HDopen(src_name, O_RDONLY)) < 0) { HDperror(src_name); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } if (HDfstat(src, &sb) < 0) { HDperror("fstat"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } src_size = src_act_size = sb.st_size; if (verbose) @@ -265,7 +265,7 @@ main(int argc, char *argv[]) if ((dst = HDopen(dst_name, O_RDWR | O_CREAT | O_TRUNC, H5_POSIX_CREATE_MODE_RW)) < 0) { HDperror(dst_name); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } if (verbose) fprintf(stderr, "> %s\n", dst_name); @@ -295,11 +295,11 @@ main(int argc, char *argv[]) n = (size_t)MIN((off_t)n, src_act_size - src_offset); if ((nio = HDread(src, buf, n)) < 0) { HDperror("read"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } else if ((size_t)nio != n) { fprintf(stderr, "%s: short read\n", src_name); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } for (i = 0; i < n; i++) { if (buf[i]) @@ -321,15 +321,15 @@ main(int argc, char *argv[]) if (need_write) { if (need_seek && HDlseek(dst, dst_offset, SEEK_SET) < 0) { HDperror("HDlseek"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } if ((nio = HDwrite(dst, buf, n)) < 0) { HDperror("write"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } else if ((size_t)nio != n) { fprintf(stderr, "%s: short write\n", dst_name); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } need_seek = FALSE; } @@ -359,11 +359,11 @@ main(int argc, char *argv[]) } else if (src < 0) { HDperror(src_name); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } if (HDfstat(src, &sb) < 0) { HDperror("fstat"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } src_act_size = sb.st_size; if (src_act_size > src_size) { @@ -384,26 +384,26 @@ main(int argc, char *argv[]) if (0 == dst_membno) { if (HDlseek(dst, dst_size - 1, SEEK_SET) < 0) { HDperror("HDHDlseek"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } if (HDread(dst, buf, 1) < 0) { HDperror("read"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } if (HDlseek(dst, dst_size - 1, SEEK_SET) < 0) { HDperror("HDlseek"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } if (HDwrite(dst, buf, 1) < 0) { HDperror("write"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } } HDclose(dst); HDsnprintf(dst_name, NAMELEN, dst_gen_name, ++dst_membno); if ((dst = HDopen(dst_name, O_RDWR | O_CREAT | O_TRUNC, H5_POSIX_CREATE_MODE_RW)) < 0) { HDperror(dst_name); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } dst_offset = 0; need_seek = FALSE; @@ -420,19 +420,19 @@ main(int argc, char *argv[]) if (need_seek) { if (HDlseek(dst, dst_offset - 1, SEEK_SET) < 0) { HDperror("HDlseek"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } if (HDread(dst, buf, 1) < 0) { HDperror("read"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } if (HDlseek(dst, dst_offset - 1, SEEK_SET) < 0) { HDperror("HDlseek"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } if (HDwrite(dst, buf, 1) < 0) { HDperror("write"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } } HDclose(dst); @@ -441,7 +441,7 @@ main(int argc, char *argv[]) * These private properties are for this tool only. */ if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) { HDperror("H5Pcreate"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } if (family_to_single) { @@ -451,7 +451,7 @@ main(int argc, char *argv[]) */ if (H5Pset(fapl, H5F_ACS_FAMILY_TO_SINGLE_NAME, &family_to_single) < 0) { HDperror("H5Pset"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } } else { @@ -460,14 +460,14 @@ main(int argc, char *argv[]) * This private property is for this tool only. */ if (H5Pset_fapl_family(fapl, H5F_FAMILY_DEFAULT, H5P_DEFAULT) < 0) { HDperror("H5Pset_fapl_family"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* Set the property of the new member size as hsize_t */ hdsize = (hsize_t)dst_size; if (H5Pset(fapl, H5F_ACS_FAMILY_NEWSIZE_NAME, &hdsize) < 0) { HDperror("H5Pset"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } } @@ -488,13 +488,13 @@ main(int argc, char *argv[]) if (file >= 0) { if (H5Fclose(file) < 0) { HDperror("H5Fclose"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ } /* end if */ if (H5Pclose(fapl) < 0) { HDperror("H5Pclose"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ /* Free resources and return */ diff --git a/tools/test/h5format_convert/h5fc_chk_idx.c b/tools/test/h5format_convert/h5fc_chk_idx.c index ffa3327e456..49fbbab61a4 100644 --- a/tools/test/h5format_convert/h5fc_chk_idx.c +++ b/tools/test/h5format_convert/h5fc_chk_idx.c @@ -51,7 +51,7 @@ main(int argc, char *argv[]) /* h5fc_chk_idx fname dname */ if (argc != 3) { usage(); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ /* Duplicate the file name & dataset name */ @@ -61,39 +61,39 @@ main(int argc, char *argv[]) /* Try opening the file */ if ((fid = h5tools_fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT, FALSE, NULL, (size_t)0)) < 0) { fprintf(stderr, "h5fc_chk_idx: unable to open the file\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ /* Open the dataset */ if ((did = H5Dopen2(fid, dname, H5P_DEFAULT)) < 0) { fprintf(stderr, "h5fc_chk_idx: unable to open the dataset\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ /* Get the dataset's chunk indexing type */ if (H5Dget_chunk_index_type(did, &idx_type) < 0) { fprintf(stderr, "h5fc_chk_idx: unable to get chunk index type for the dataset\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ /* Close the dataset */ if (H5Dclose(did) < 0) { fprintf(stderr, "h5fc_chk_idx: unable to close the dataset\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ /* Close the file */ if (H5Fclose(fid) < 0) { fprintf(stderr, "h5fc_chk_idx_type: cannot close the file\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ /* Return success when the chunk indexing type is version 1 B-tree */ if (idx_type == H5D_CHUNK_IDX_BTREE) - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); else { fprintf(stderr, "Error: chunk indexing type is %d\n", idx_type); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ } /* main() */ diff --git a/tools/test/h5jam/getub.c b/tools/test/h5jam/getub.c index 5ac9c7ff773..139ead6b2d7 100644 --- a/tools/test/h5jam/getub.c +++ b/tools/test/h5jam/getub.c @@ -64,14 +64,14 @@ parse_command_line(int argc, const char *const *argv) case '?': default: usage(h5tools_getprogname()); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end switch */ } /* end while */ if (argc <= H5_optind) { error_msg("missing file name\n"); usage(h5tools_getprogname()); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ } /* end parse_command_line() */ diff --git a/tools/test/h5jam/tellub.c b/tools/test/h5jam/tellub.c index ba0457bc4fc..4b5606c7ea2 100644 --- a/tools/test/h5jam/tellub.c +++ b/tools/test/h5jam/tellub.c @@ -85,7 +85,7 @@ static void leave(int ret) { h5tools_close(); - HDexit(ret); + exit(ret); } /*------------------------------------------------------------------------- diff --git a/tools/test/misc/clear_open_chk.c b/tools/test/misc/clear_open_chk.c index b57eb4a9e62..ec86ec46512 100644 --- a/tools/test/misc/clear_open_chk.c +++ b/tools/test/misc/clear_open_chk.c @@ -45,7 +45,7 @@ main(int argc, char *argv[]) /* Check the # of arguments */ if (argc != 2) { usage(); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* Get the file name */ @@ -55,16 +55,16 @@ main(int argc, char *argv[]) if ((fid = h5tools_fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT, FALSE, NULL, (size_t)0)) < 0) { fprintf(stderr, "clear_open_chk: unable to open the file\n"); free(fname); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } free(fname); /* Close the file */ if (H5Fclose(fid) < 0) { fprintf(stderr, "clear_open_chk: cannot close the file\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* Return success */ - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); } /* main() */ diff --git a/tools/test/misc/h5clear_gentest.c b/tools/test/misc/h5clear_gentest.c index 3636c98172d..d2a50687d85 100644 --- a/tools/test/misc/h5clear_gentest.c +++ b/tools/test/misc/h5clear_gentest.c @@ -600,10 +600,10 @@ main(void) fflush(stderr); /* Not going through library closing by calling _exit(0) with success */ - HD_exit(0); + _exit(0); error: /* Exit with failure */ - HD_exit(1); + _exit(1); } diff --git a/tools/test/misc/h5repart_gentest.c b/tools/test/misc/h5repart_gentest.c index 1f26c4d354c..5d5cb2f2ea1 100644 --- a/tools/test/misc/h5repart_gentest.c +++ b/tools/test/misc/h5repart_gentest.c @@ -38,11 +38,11 @@ main(void) /* Set up data array */ if (NULL == (buf_data = (int *)calloc(FAMILY_NUMBER * FAMILY_SIZE, sizeof(int)))) { HDperror("calloc"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } if (NULL == (buf = (int **)calloc(FAMILY_NUMBER, sizeof(buf_data)))) { HDperror("calloc"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } for (i = 0; i < FAMILY_NUMBER; i++) buf[i] = buf_data + (i * FAMILY_SIZE); @@ -50,28 +50,28 @@ main(void) /* Set property list and file name for FAMILY driver */ if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) { HDperror("H5Pcreate"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } if (H5Pset_fapl_family(fapl, (hsize_t)FAMILY_SIZE, H5P_DEFAULT) < 0) { HDperror("H5Pset_fapl_family"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } if ((file = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) { HDperror("H5Fcreate"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* Create and write dataset */ if ((space = H5Screate_simple(2, dims, NULL)) < 0) { HDperror("H5Screate_simple"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } if ((dset = H5Dcreate2(file, dname, H5T_NATIVE_INT, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { HDperror("H5Dcreate2"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } for (i = 0; i < FAMILY_NUMBER; i++) @@ -80,27 +80,27 @@ main(void) if (H5Dwrite(dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_data) < 0) { HDperror("H5Dwrite"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } if (H5Sclose(space) < 0) { HDperror("H5Sclose"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } if (H5Dclose(dset) < 0) { HDperror("H5Dclose"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } if (H5Pclose(fapl) < 0) { HDperror("H5Pclose"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } if (H5Fclose(file) < 0) { HDperror("H5Fclose"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } free(buf); diff --git a/tools/test/misc/repart_test.c b/tools/test/misc/repart_test.c index 1ff6230f721..3857ee29fee 100644 --- a/tools/test/misc/repart_test.c +++ b/tools/test/misc/repart_test.c @@ -142,10 +142,10 @@ main(void) if (nerrors) goto error; - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); error: nerrors = MAX(1, nerrors); printf("***** %d FAMILY FILE TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end main() */ diff --git a/tools/test/perform/zip_perf.c b/tools/test/perform/zip_perf.c index c891bf92eb3..752771669f7 100644 --- a/tools/test/perform/zip_perf.c +++ b/tools/test/perform/zip_perf.c @@ -90,7 +90,7 @@ error(const char *fmt, ...) H5_GCC_CLANG_DIAG_ON("format-nonliteral") fprintf(stderr, "\n"); va_end(ap); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* diff --git a/utils/mirror_vfd/mirror_server.c b/utils/mirror_vfd/mirror_server.c index 5278e7cd4d1..521ceb7f60d 100644 --- a/utils/mirror_vfd/mirror_server.c +++ b/utils/mirror_vfd/mirror_server.c @@ -569,7 +569,7 @@ handle_requests(struct server_run *run) } HDclose(connfd); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); } /* end if writer side of fork */ else { /* parent process (server side of fork) */ mirror_log(run->loginfo, V_INFO, "tidying up from handshake"); @@ -614,7 +614,7 @@ main(int argc, char **argv) run = init_server_run(argc, argv); if (NULL == run) { mirror_log(NULL, V_ERR, "can't initialize run"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } if (handle_requests(run) < 0) { @@ -623,10 +623,10 @@ main(int argc, char **argv) if (term_server_run(run) < 0) { mirror_log(NULL, V_ERR, "problem closing server run"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); } /* end main() */ #else /* H5_HAVE_MIRROR_VFD */ @@ -635,7 +635,7 @@ int main(void) { printf("Mirror VFD was not built -- cannot launch server.\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } #endif /* H5_HAVE_MIRROR_VFD */ diff --git a/utils/mirror_vfd/mirror_server_stop.c b/utils/mirror_vfd/mirror_server_stop.c index 1546d7075ab..8dbbf37452f 100644 --- a/utils/mirror_vfd/mirror_server_stop.c +++ b/utils/mirror_vfd/mirror_server_stop.c @@ -184,20 +184,20 @@ main(int argc, char **argv) if (parse_args(argc, argv, &opts) < 0) { printf("Unable to parse arguments\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } if (opts.help) { usage(); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } if (send_shutdown(&opts) < 0) { printf("Unable to send shutdown command\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); } /* end main() */ #else /* H5_HAVE_MIRROR_VFD */ @@ -207,7 +207,7 @@ int main(void) { printf("Mirror VFD not built -- unable to perform shutdown.\n"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } #endif /* H5_HAVE_MIRROR_VFD */ diff --git a/utils/tools/h5dwalk/h5dwalk.c b/utils/tools/h5dwalk/h5dwalk.c index 5f0cf79e644..cdb4ce13402 100644 --- a/utils/tools/h5dwalk/h5dwalk.c +++ b/utils/tools/h5dwalk/h5dwalk.c @@ -1708,5 +1708,5 @@ h5dwalk_exit(int status) if (require_finalize) MPI_Finalize(); - HDexit(status); + exit(status); }