Source
if((attr_id = H5Acreate_by_name(dset_id[i], ".", "int array_addr", H5T_NATIVE_INT, attr_space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the files COPYING and Copyright.html. COPYING can be found at the root *
* of the source code distribution tree; Copyright.html can be found at the *
* root level of an installed copy of the electronic HDF5 document set and *
* is linked from the top-level documents page. It can also be found at *
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Test of file image operations.
The following code provides a means to thoroughly test the file image
operations. Main objectives are testing operations with multiple open
images and using all possible flag combinations, which are set in the
main calling routine. Since the number of open images and flag combinations
may differ, the flag combinations are assigned to the images in round-robin
fashion. In order to simulate a realistic operation environment, the code
operates on as many open objects as possible by using several for-loops
instead of using a single loop that opens image i, accesses it, and closes
it. The first loop creates the files and obtains images using the function
H5Fget_file_image(); two images are set incorrectly (one image is filled
with "wrong" data while the other image is not valid). The second loop opens
the images using the function H5LTopen_file_image(), and test whether the
images have been copied in accordance to the H5LT_FILE_IMAGE_DONT_COPY flag.
The third loop reads the open images and verifies that the contents are
correct. The fourth loop first perform writes in the images that do not
extend the image, and then performs writes that extend the images. The fifth
loop reads the extended images and verify that the content are correct. The
sixth and final loop closes the file images and deallocates the image
buffers if appropriate. */
/*-------------------------------------------------------------------------
* test file image operations
*-------------------------------------------------------------------------
*/
static int
test_file_image(size_t open_images, size_t nflags, unsigned *flags)
{