Skip to content

Commit

Permalink
Update with missing changes
Browse files Browse the repository at this point in the history
Signed-off-by: Quincey Koziol <[email protected]>
  • Loading branch information
qkoziol committed Apr 19, 2024
1 parent 90aa8b1 commit 981eeb4
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/H5FDpkg.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,30 @@ H5_DLL herr_t H5FD__free_real(H5FD_t *file, H5FD_mem_t type, haddr_t addr, hsiz

/* Testing functions */
#ifdef H5FD_TESTING
H5_DLL H5FD_t *H5FDopen_test(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr);
H5_DLL herr_t H5FDclose_test(H5FD_t *file);
H5_DLL haddr_t H5FDalloc_test(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size);
H5_DLL haddr_t H5FDget_eoa_test(H5FD_t *file, H5FD_mem_t type);
H5_DLL herr_t H5FDset_eoa_test(H5FD_t *file, H5FD_mem_t type, haddr_t eoa);
H5_DLL haddr_t H5FDget_eof_test(H5FD_t *file, H5FD_mem_t type);
H5_DLL herr_t H5FDread_test(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size,
void *buf);
H5_DLL herr_t H5FDwrite_test(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size,
const void *buf);
H5_DLL herr_t H5FDread_vector_test(H5FD_t *file, hid_t dxpl_id, uint32_t count, H5FD_mem_t types[],
haddr_t addrs[], size_t sizes[], void *bufs[]);
H5_DLL herr_t H5FDwrite_vector_test(H5FD_t *file, hid_t dxpl_id, uint32_t count, H5FD_mem_t types[],
haddr_t addrs[], size_t sizes[], const void *bufs[]);
H5_DLL herr_t H5FDread_selection_test(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, uint32_t count,
hid_t mem_spaces[], hid_t file_spaces[], haddr_t offsets[],
size_t element_sizes[], void *bufs[]);
H5_DLL herr_t H5FDwrite_selection_test(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, uint32_t count,
hid_t mem_spaces[], hid_t file_spaces[], haddr_t offsets[],
size_t element_sizes[], const void *bufs[]);
H5_DLL herr_t H5FDtruncate_test(H5FD_t *file, hid_t dxpl_id, hbool_t closing);
H5_DLL herr_t H5FDlock_test(H5FD_t *file, hbool_t rw);
H5_DLL herr_t H5FDunlock_test(H5FD_t *file);
H5_DLL herr_t H5FDctl_test(H5FD_t *file, uint64_t op_code, uint64_t flags, const void *input, void **output);
H5_DLL bool H5FD__supports_swmr_test(const char *vfd_name);
#endif /* H5FD_TESTING */

Expand Down
54 changes: 54 additions & 0 deletions src/H5FDtest.c
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,60 @@ H5FDtruncate_test(H5FD_t *file, hid_t dxpl_id, hbool_t closing)
FUNC_LEAVE_API(ret_value)
} /* end H5FDtruncate_test() */

/*-------------------------------------------------------------------------
* Function: H5FDlock_test()
*
* Purpose: Wrapper for using H5FDlock() in internal tests. Pushes
* an API context, so that the internal routines will have
* one to get values from.
*
* This function is only intended for use in the test code.
*
* Return: Value from underlying routine
*
*-------------------------------------------------------------------------
*/
herr_t
H5FDlock_test(H5FD_t *file, hbool_t rw)
{
herr_t ret_value;

FUNC_ENTER_API(FAIL)

/* Call developer routine */
ret_value = H5FDlock(file, rw);

done:
FUNC_LEAVE_API(ret_value)
} /* end H5FDlock_test() */

/*-------------------------------------------------------------------------
* Function: H5FDunlock_test()
*
* Purpose: Wrapper for using H5FDunlock() in internal tests. Pushes
* an API context, so that the internal routines will have
* one to get values from.
*
* This function is only intended for use in the test code.
*
* Return: Value from underlying routine
*
*-------------------------------------------------------------------------
*/
herr_t
H5FDunlock_test(H5FD_t *file)
{
herr_t ret_value;

FUNC_ENTER_API(FAIL)

/* Call developer routine */
ret_value = H5FDunlock(file);

done:
FUNC_LEAVE_API(ret_value)
} /* end H5FDunlock_test() */

/*-------------------------------------------------------------------------
* Function: H5FDctl_test()
*
Expand Down

0 comments on commit 981eeb4

Please sign in to comment.