Commit Graph

3300 Commits

Author SHA1 Message Date
Quincey Koziol
53e62bcbeb Refactor H5Dvlen_get_buf_size to use optional dataset operation, with generic fallback for VOL connectors that don't implement operation 2020-05-20 09:20:21 -05:00
Quincey Koziol
996e12e796 Refactor all the 'H5VL_*_optional' callbacks to move the type of operation out
of the va_list, so it's at least possible for another connector to know what
the operation is and decide whether to implement it or not.

Added a new VOL sub-class called "introspect" where callbacks that report
information about the connector or container can be placed.  Added an
'opt_query' callback to this sub-class, for a connector to report back
to the library whether a particular optional callback operation is supported.
Also added a 'get_conn_cls' introspection callback, to retrieve the H5VL_class_t
of a connector (either the "current" connector, H5VL_GET_CONN_LVL_CURR, or
the terminal connector, H5VL_GET_CONN_LVL_TERM).

Moved the "post open" operation from a file 'specific' operation to a file
'optional' operation, now that it's possible to detect (with the 'opt_query'
introspection callback) whether a VOL connector implements an optional
operation, without just returning an error.

Added new internal VOL helper routines: H5VL_object_is_native, to determine
if an object is in (or is a) native file, and H5VL_file_is_same, to determine
if two objects are in (or are) the same terminal VOL connector's container.
(And moved the special handling for FILE_IS_EQUAL operation out of internal VOL
callback routine into H5VL_file_is_same)

Made new dataset 'get' operation for H5Dvlen_get_buf_size, aligning it better
with other 'get' operations in API.

Fixed several issues with pass-through connectors, which are now passing the
'make check-passthrough-vol' tests again.

A bunch of warning and style cleanups as well.
2020-05-20 09:20:21 -05:00
Allen Byrne
9f5fdc677a Remove const 2020-05-20 09:20:21 -05:00
Allen Byrne
344f4139d7 Fix compile error - declaration after executable statement 2020-05-20 09:20:21 -05:00
Allen Byrne
def01d7676 Adjust cache.c only variables. 2020-05-20 09:20:21 -05:00
Allen Byrne
2cff38d38e Fix include to correct memory calls - big-endian issue. 2020-05-20 09:20:21 -05:00
Vailin Choi
19934f8654 More fixes for previous committed PR #2079 dated Dec 5 2019.
(1) H5O_dtype_ver_bounds[] for V112 should be H5O_DTYPE_VRESION_4
(2) The tests for the new reference types should work for V112 and beyond
2020-05-20 09:20:21 -05:00
Allen Byrne
5b50f47f31 HDFFV-10979 cleanup globals 2020-05-20 09:20:20 -05:00
Allen Byrne
59d5321a33 HDFFV-10979 fix global name clash 2020-05-20 09:20:20 -05:00
David Young
7bbe57d309 Change hdset_reg_ref_t and H5R_ref_t from arrays of unsigned char to
structs containing those arrays.  Encapsulating the arrays in this way
makes it easier to write and think about pointers to these types, casts
to/from these types, etc.

An interesting side-effect that we probably should *not* rely on is
that the struct-encapsulation changes the alignment so that some GCC
warnings about casts that increase the alignment requirement of the
operand go away.  Warnings like that have to be taken seriously:  I will
add -Werror=cast-align to the default compiler flags so that they stop
the build quickly.

GCC warnings led me to some surprising casts in test/trefer.c. I found
that it was possible to make many simplifications after introducing the
struct-encapsulation that I described, above.

In test objcopy_ref `same_file` is assigned but never used.  Delete it.
2020-05-20 09:20:19 -05:00
Vailin Choi
44e8fe048b Two fixes:
(1) Set the version for reference datatype messge to H5O_DTYPE_VERSION_4.
(2) Verify the decoded version for hyperslab selection.
2020-05-20 09:20:19 -05:00
Dana Robinson
e4f9ad3dbb Yanked -Wc++-compat from the flags used to build the C library in both
the Autotools and CMake.
2020-05-20 09:20:18 -05:00
Dana Robinson
57b38f58bd Fixed missing blob callbacks in test VOL connectors. 2020-05-20 09:20:18 -05:00
Jordan Henderson
f56dbdc823 Add OAPL parameter to H5Rcreate_ APIs 2020-05-20 09:20:18 -05:00
Jerome Soumagne
267b97c3ea H5R: fix H5Tconv to check for null references
Valid for both deprecated and non-deprecated references

Update test
2020-05-20 09:20:17 -05:00
David Young
77144641df Revert "Make a squash commit of 'Quiet some warnings by adjusting warnings level and fixing some code.' (commit 5c911d8baf)" 2020-05-20 09:20:17 -05:00
David Young
e07ca4b4a5 Revert "Oops, remove more C99 designated initializers for VS 2010 compatibility."
This reverts commit f907b511d0.
2020-05-20 09:19:38 -05:00
David Young
10911a1176 Oops, remove more C99 designated initializers for VS 2010 compatibility. 2020-05-20 09:19:38 -05:00
David Young
4a4f4b76cf Add new source files to CMakeLists.txt. 2020-05-20 09:19:37 -05:00
David Young
a7c153fff1 free -> HDfree 2020-05-20 09:19:37 -05:00
David Young
d1ceb04c5d Quiet decleration-after-statement warnings. 2020-05-20 09:19:37 -05:00
David Young
b1be318a62 Undo accidental test deletion. 2020-05-20 09:19:37 -05:00
David Young
3a65ddc936 Oops, delete a debug printf that snuck in here. 2020-05-20 09:19:37 -05:00
David Young
224653db64 Change hdset_reg_ref_t and H5R_ref_t from arrays of unsigned char to
structs containing those arrays.  Encapsulating the arrays in this way
makes it easier to write and think about pointers to these types, casts
to/from these types, etc.

An interesting side-effect that we probably should *not* rely on is
that the struct-encapsulation changes the alignment so that some GCC
warnings about casts that increase the alignment requirement of the
operand go away.  Warnings like that have to be taken seriously:  I will
add -Werror=cast-align to the default compiler flags so that they stop
the build quickly.

GCC warnings led me to some surprising casts in test/trefer.c. I found
that it was possible to make many simplifications after introducing the
struct-encapsulation that I described, above.
2020-05-20 09:19:37 -05:00
David Young
386138daa3 In every instance, x is initialized by memcpy, but GCC isn't smart
enough to figure that out.  Quiet some warnings by always initializing
`x` to 0.
2020-05-20 09:19:37 -05:00
David Young
7605df3cf0 same_file is assigned but never used. Delete it. 2020-05-20 09:19:37 -05:00
David Young
354fca5b59 Don't assign a constant string to a pointer to non-constant character. 2020-05-20 09:19:37 -05:00
David Young
cbd2e29914 GCC isn't smart enough to realize that fill_c is always initialized
and exclusively used in `datatype == H5T_COMPOUND` branches, so just
initialize it at its declaration so that GCC doesn't warn.
2020-05-20 09:19:37 -05:00
David Young
7638fbb258 I'm not sure what the previous code was trying to do, casting an array
of `hsize_t`, `start`, to `long long`, but I think the way that I have
rewritten it, it probably produces a more useful result?  As a bonus,
GCC has stopped warning about it.
2020-05-20 09:19:37 -05:00
David Young
1132ed87bc Quiet a warning about an unused variable. This code looks like it
should be heavily restructured to avoid the use of globals like `pass`,
but that's a project for another day and another person.
2020-05-20 09:19:37 -05:00
David Young
6b80036fde Straggler from previous commit: build and link the new .c files where I
moved some previously-static variables and functions that were causing
unused-variable/function warnings.
2020-05-20 09:19:37 -05:00
David Young
0206b1055e Move some static functions and variables to .c files to avoid unused
function/variable warnings.
2020-05-20 09:17:27 -05:00
David Young
46ed46aa72 Avoid unused-variable warnings: change static const strings in a couple
of header-file templates to #defines.
2020-05-20 09:17:27 -05:00
David Young
2b863a8119 Change some GCC warnings to errors. Fix code to quiet some warnings. 2020-05-20 09:17:27 -05:00
David Young
e067612d25 Use HD prefix. 2020-05-20 09:17:26 -05:00
David Young
2943ab87e0 Add missing newline to dbgf() statement. 2020-05-15 12:26:40 -05:00
David Young
eb69be608d Make -q actually quiet the program. 2020-05-15 12:24:52 -05:00
David Young
a2ad44f419 Make the personality detection more robust like I did for
vfd_swmr_zoo_writer, previously.
2020-05-15 12:20:21 -05:00
David Young
ad79ca8ae7 Let us change the chunk size with command-line options, -r rows and -c
columns.  If the number of datasets is greater than the number of steps,
then only pause between steps, do not pause between individual datasets
written/verified.  Otherwise, pause between each dataset written/verified.
2020-05-15 11:36:00 -05:00
David Young
2fe43bd423 Fix inverted logic: report "soft" errors if there were *not* 0 of them. 2020-05-13 11:46:54 -05:00
David Young
89bf6de17f This test doesn't need to log/modify traps in the global heap, so don't
provide a H5HG_trap() routine.
2020-05-13 11:46:30 -05:00
David Young
cc6e4055cb Don't initialize seed without need. NFCI. 2020-05-11 17:24:53 -05:00
David Young
562d5beab2 Look for the personality in the program name *suffix*, because on
`jelly` libtool adds an `lt-` prefix to the program name.
2020-05-11 15:17:42 -05:00
David Young
35a4bfb551 Extend VFD SWMR tick length and maximum lag parameters. 2020-05-08 19:32:24 -05:00
David Young
d1de9d695f Delete extra line. NFCI. 2020-05-08 19:32:09 -05:00
David Young
561974d329 Add missing return-value check. 2020-05-08 19:31:54 -05:00
David Young
a69c33af13 Take care not to leak property lists or data spaces. 2020-05-08 19:31:32 -05:00
David Young
b7c05d2231 Fix bugs in the dataset dimensions checks. 2020-05-07 14:34:34 -05:00
David Young
5d4b109abf Create a reader for the extensible datasets tests. 2020-05-07 12:09:15 -05:00
David Young
f8e494ba80 Add my work-in-progress dataset test. It writes a handful of datasets
that expand in one or two dimensions, depending on the setting of the -d
option argument.
2020-05-06 15:01:29 -05:00