Commit Graph

143 Commits

Author SHA1 Message Date
Quincey Koziol
97e1ed4fc8
Refactor allocation of API context (#4942)
Since each API context is local to a thread, use the stack to
store the context instead of allocating & releasing it each time.
This improves performance (slightly), reduces alloc/free calls,
and eliminates the H5FL package from the push & pop operations,
which helps simplify threadsafe operation.

One effect of this change is that the H5VLstart_lib_state /
H5VLfinish_lib_state API routines for pass through connector
authors now require a parameter that can be used to store
the library's context. It was probably a mistake to assume
that these two routines would not do this previously, so this
is essentially a bug fix for them.

Some other minor things:

 * Added API context push+pop operations to cache tests
  (I'm not actually certain why this was working before) and
  a few other places
* Cleaned up a bunch of warnings in test code (calloc args, mainly)
* Made header file inclusions more standard in some source files
2024-10-24 10:09:22 -07:00
Dana Robinson
7f1e49206d
Renamed COPYING to LICENSE (#4978)
This is where most people will expect to find license information. The
COPYING_LBNL_HDF5 file has also been renamed to LICENSE_LBNL_HDF5.
The licenses are unchanged.
2024-10-18 21:13:04 -07:00
Allen Byrne
162f01292c
Rework the TestExpress usage and refactor dead code (#4590) 2024-06-20 14:01:43 -07:00
jhendersonHDF
86ca181bd8
Fix 'make check-vfd' target for Autotools (#4211)
Changes Autotools testing to use HDF5_TEST_DRIVER environment
variable to avoid running tests that don't work well with several
VFDs

Restores old h5_get_vfd_fapl() testing function to setup a FAPL
with a particular VFD

Adds a macro for the default VFD name
2024-03-22 21:31:16 -05:00
Scot Breitenfeld
a87ca572fe
Replaces HDgetenv with getenv (#3599) 2023-09-26 13:11:22 -07:00
Dana Robinson
44a00ef876
Strip HD prefix from string/char C API calls (#3540)
* Strip HD prefix from string/char C API calls

* HD(f)(put|get)(s|c)
* HDstr*
* HDv*printf
* HD(s)(print|scan)f
* HDperror

But NOT:

* HDstrcase*
* HDvasprintf
* HDstrtok_r
* HDstrndup

As those are not C99 and have portability work-around
implementations. They will be handled later.

* Fix th5_system.c screwup
2023-09-15 15:13:18 -07:00
Scot Breitenfeld
117d579c32
Consistent initialization of hid_t in the tests (#3521) 2023-09-08 18:06:23 -05:00
Dana Robinson
9208697960
Convert hbool_t --> bool in test (#3494) 2023-09-05 13:11:52 -07:00
Dana Robinson
39e6bf48c9
Remove HD from HDmem* calls (#3211) 2023-06-29 12:33:46 -07:00
Dana Robinson
fd933f30b1
Remove programmer/date from comments (#3210)
* Removes Programmer: and Date: fields
* Fixes a few Modifications: fields leftover from previous work
2023-06-29 12:13:29 -07:00
Dana Robinson
a5f1fb01b9
Remove some "Programmer" comments (#3209)
These are meaningless noise.

Removes the "Programmer" lines on comment start lines:

    /* Programmer: John Smith

These complicate my sed script that will rip out the rest of
the comments.
2023-06-29 06:33:49 -07:00
Dana Robinson
aebac33a1f
Remove HD from memory allocate/free calls (#3195)
* HDcalloc
* HDfree
* HDmalloc
* HDrealloc
2023-06-28 15:48:12 -07:00
Sean McBride
65d8c93470
Many fixes to various compiler warnings (#3124)
* Fixed various -Wmissing-variable-declarations by adding static keyword
* In a few cases, renamed the variable suffix from _g to _s.
* Fixed some -Wmissing-variable-declarations by using different declaration macros
* Fixed various -Wconditional-uninitialized warnings by just initializing variable to zero
* Fixed various -Wcomma warnings
* Fixed clang -Wstrict-prototypes warnings
* Fixed various -Wunused-variable warnings
* Updated some casts to fix the only 3 -Wcast-qual warnings
* Fixed the only -Wsometimes-uninitialized warning
2023-06-18 22:13:38 -07:00
Sean McBride
68eba3da69
Many clang -Wextra-semi-stmt fixes (#2537)
* Adds semicolons to function-like macros
* Adds a do..while(0) loop to some macros
* Removes semicolons when inappropriate, especially H5E_TRY_BEGIN/END
2023-06-15 21:49:02 -07:00
Larry Knox
11dfa25910
Update copyright headers (#2184)
* Updated source file copyright headers to remove "Copyright by the Board of Trustees
of the University of Illinois", which is kept in the top-level COPYING file.
2022-11-01 16:02:27 -05:00
Allen Byrne
ae414872f5
Develop clang 13 format (#1933)
* Update format source to clang 13

* More format changes
2022-07-26 14:45:46 -07:00
Sean McBride
c064d3481b
sprintf to snprintf (#1815)
* Straightforward conversion of sprintf to the safer snprintf

* Trickier conversion of sprintf to safer snprintf

This involved minor changes to private function signatures to take the size of the buffer.

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-06-22 11:58:18 -07:00
Dana Robinson
838d050a63
h5test.h testing macros get enclosed in do..while loops (#1721)
* h5test.h testing macros get enclosed in do..while loops

* Adds missed macro in hl C++ code

* Fixes macro in Windows code
2022-05-04 08:49:01 -07:00
Scot Breitenfeld
f859cb732b
Fixed Spelling Errors (#1166)
* fixed missed closing of a dataset

* fixed missed closing of a dataset

* fixed typo in error return

* Committing clang-format changes

* minor edits

* code format

* Committing clang-format changes

* code format

* minor edit

* switched from using MPI_count, to actual bytes written for H5FD_mpio_debug rw debugging

* Committing clang-format changes

* changed size_i in printf to reflect the I/O.

* Committing clang-format changes

* Fixed seg fault with xlf on BE with -qintsize=8

* fixed error function string

* spelling corrections via codespell, added new spell check github actions

* Committing clang-format changes

* misc

* misc

* misc

* misc

* misc

* misc

* misc

* misc

* misc

* misc

* misc

* misc

* misc

* misc

* Committing clang-format changes

* misc

* misc

* misc

* misc

* misc

* misc

* Committing clang-format changes

* misc

* work around for https://github.com/codespell-project/codespell/issues/2137

* misc

* added missing file

* misc

* misc.

* misc

* switch to using Codespell with GitHub Actions

* misc.

* misc.

* fixed more sp errors

* Fix new typos found by codespell.

* fixed proceed with precede

* fixed variable in fortran test

* fixed minnum

* updated spelling list

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
2021-12-07 08:27:29 -06:00
jhendersonHDF
3da0802c40
VFD plugins (#602)
* Implement support for loading of Virtual File Drivers as plugins

Fix plugin caching for VOL connector and VFD plugins

Fix plugin iteration to skip paths that can't be opened

* Enable dynamic loading of VFDs with HDF5_DRIVER environment variable

* Temporarily disable error reporting during H5F_open double file open

* Default to using HDstat in h5_get_file_size for unknown VFDs

* Use macros for some environment variables that HDF5 interprets

* Update "null" and "ctl testing" VFDs
2021-09-29 13:28:12 -05:00
jhendersonHDF
cd2ca91875
Fix several warnings (#720) 2021-09-14 15:24:01 -05:00
Dana Robinson
b5c66529e9
Fixes a bad memory read and unfreed memory in fsinfo code (#893)
* Fixes a bad memory read and unfreed memory in fsinfo code

The segfaul from CVE-2020-10810 was fixed some time ago, but the
illegal memory read and unfreed memory were not.

This fix tracks some buffer sizes and errors out gracefully on errors,
ensuring buffers are cleaned up and avoiding the H5FL infinite loop +
abort on library close.

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-08-12 07:21:50 -05:00
Quincey Koziol
c6e4e53546
Update clang config (#473)
* Update clang config to put H5E_BEGIN_TRY / H5E_END_TRY on separate lines, empty C++ methods on separate lines, understand that ALL_MEMBERS / UNIQUE_MEMBERS are foreach macros, and properly skip the 'config' directory in the find command without emiting a warning

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-03-17 10:25:39 -05:00
Sean McBride
d7b40604ef
Fixed all clang-tidy bugprone-suspicious-string-compare warnings (#451)
* Fixed all clang-tidy bugprone-suspicious-string-compare warnings

This change was generated entirely by clang-tidy itself.

* Reformat code with clang v10.0.1.

Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
2021-03-10 12:42:35 -06:00
Sean McBride
a7a013782f
Various clang tidy warning fixes (#448)
* Fixed clang-tidy bugprone-reserved-identifier warnings

* Fixed clang-tidy bugprone-assert-side-effect warnings

* Fixed clang-tidy bugprone-copy-constructor-init warning

* Fixed clang-tidy readability-redundant-preprocessor warning

For error_test.c the removed code was already dead, because it was in the else of an `#if H5_USE_16_API` block.

Based on H5Location.h, I think p_get_ref_obj_type was meant to be in `#ifndef DOXYGEN_SHOULD_SKIP_THIS` and an `#endif` was missing.  Similarly, in the header, getObjTypeByIdx is only in H5_NO_DEPRECATED_SYMBOLS, not DOXYGEN_SHOULD_SKIP_THIS.

* Fixed clang-tidy readability-redundant-string-init warnings

* Fixed some clang-tidy performance-type-promotion-in-math-fn warnings

* Fixed clang-tidy performance-unnecessary-value-param warnings

* Reformat source with clang v10.0.1.

Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
2021-03-10 12:41:34 -06:00
Larry Knox
4819f89d3f
Update license url (#332)
* Modify temporary rpath for testing in java example scripts.

* Update URL in source file Copyright headers for web copy of COPYING
file - src and test directories.
2021-02-17 08:52:04 -06:00
Quincey Koziol
adf7b1d4cf
Add flag to H5CX_pop that allow setting the properties to return to application to be skipped. (#134) 2020-12-01 10:15:34 -06:00
Allen Byrne
b2d661b508 Clang-format of source files 2020-09-30 09:27:10 -05:00
mainzer
3202416936 Merge branch 'develop' into mdc_sl_opt 2020-08-13 11:31:16 -05:00
Dana Robinson
5ce2a17804 Removes staff email addresses from the repository
Removes redundant C library headers from hl library
2020-08-06 17:58:07 -07:00
mainzer
33f35183cb When flushing, the metadata cache attempts to flush entries in increasing
address order.  To facilitate this, the metadata cache needs a list of
of dirty entries in increasing address order.  This is implemented via a
skip list of all dirty entries in the cache.

To date this skip list has been maintained at all times.

However, profiling indicates that we can avoid significant overhead by
constructing the skip list of dirty entries just before a flush, taking
it down afterwareds, and not maintaining it during normal operation.

This commit implements this optimization for both serial and parallel.

Tested serial and parallel, debug and production on charis and jelly.
2020-08-05 15:39:49 -05:00
Quincey Koziol
9e5dbf6906 Trim trailing whitespace 2020-04-20 18:12:00 -05:00
David Young
3e93aa9514 So that I can use PASSED(); anywhere a statement can go, #define PASSED() with
a do-while wrapper.
2020-02-28 16:51:55 -06:00
Dana Robinson
a92c735c9b Squashed commit of the token_refactoring branch: 2020-01-16 13:29:34 -08:00
Quincey Koziol
0225e6d596 Small changes from the token_refactoring branch, to reduce the delta to develop 2020-01-03 22:16:38 -06:00
Dana Robinson
1ad02a4459 Yanked -Wc++-compat from the flags used to build the C library in both
the Autotools and CMake.
2019-12-04 00:49:52 -08:00
Allen Byrne
9f12d83975 Cleanup HD prefix 2019-08-05 16:57:27 -05:00
Quincey Koziol
3b594992d6 Add support for GCC9, update warnhist script, and clean up warnings. 2019-07-02 23:43:45 -05:00
Dana Robinson
f250815151 Cleaned up misc warnings. 2019-06-29 02:38:14 -07:00
Dana Robinson
6a1e9a1fbe Fixed a problem in the ohdr test where hard-coded strings passed
to H5Awrite() triggered -fsanitize failures.
2019-06-18 17:28:37 -07:00
Vailin Choi
0073f19897 Set V112 as the latest format and extend the arrays of version bounds. 2019-04-04 16:29:37 -05:00
Dana Robinson
97cdcc47e4 Used the H5_INC_ENUM macro to squash enum value increment warnings. 2019-03-21 01:15:09 -07:00
Neil Fortner
b043126e5e Delay checking if decoded message's "shareable" flag is appropriate for
the message type until we've verified we understand the message type.
Reduce size of H5O_msg_class_g to *not* include space for
H5O_BOGUS_INVALID.  Make bogus messages shareable.  Add new bogus
message test with shareable messages to cover the formerly problematic
code.  Re-run gen_bogus.c to add this test case and also to fix the
bogus_invalid messages that were no longer H5O_BOGUS_INVLAID due to a
new message class being added in a previous commit.  Added comment to
remind developers to run gen_bogus.c when adding a new message class.
2019-01-07 15:40:44 -06:00
Quincey Koziol
92300f954f Corrected comment in src/H5VLint.c, fixed pass-through info size in
src/H5VLpassthru.c, switched to stashing VOL connector ID & info in
API context (in src/H5CX.c, src/H5CXprivate.h, src/H5F.c, src/H5Fint.c, and
src/H5Fefc.c), patched up all sorts of issues in the tests, to make them work
with 'check-vfd' (and 'check-vol' again).
2019-01-05 23:06:45 -06:00
Jacob Smith
3b53747b3a Update calls: H5Dcreate to H5Dcreate2, H5Acreate to H5Acreate2. 2019-01-03 14:44:57 -06:00
Jacob Smith
8324be7fad fix wrong function name that is missed by correctional macro 2018-12-31 15:18:13 -06:00
Jacob Smith
b2afa88fa0 OHDR tests now accept h5_fileaccess() fapls.
Formatting, informative comments, and minor renaming.
2018-12-26 14:35:22 -06:00
Jacob Smith
2b4e540fad Add "compact" storage test to relative header size comparisons. 2018-12-19 14:57:38 -06:00
Jacob Smith
99bc714c4b Move H5Fset_dset_no_attrs_hint VOL operations to native.
Move minimzied object header tests from separate file to test/ohdr.c
Some formatting changes.
2018-12-18 13:42:03 -06:00
Quincey Koziol
0df6e44a6e Squashed commit of private branch changes to support stackable VOL plugins.
modified:   test/dsets.c
2018-10-24 23:52:47 -05:00