H5Dget_offset Test Review

  1. Purpose:

    This document describes the API test review results for H5Dget_offset().

  2. Serial Review:

    Test case Test source file Test method Expected test results Notes
    Chunked dataset dsets.c
    1. Create chunked dataset
    2. Query dataset offset
    FAIL

    Because dataset is stored in chunks that are indexed by a B-tree, there is no single piece of data to query the offset of.

    It may be possible in the future to enhance this function by querying the offset of a particular chunk (or chunks), but that has limited use because chunks could be compressed, etc. with an I/O filter.

    Compact dataset dsets.c
    1. Create chunked dataset
    2. Query dataset offset
    FAIL

    Because dataset is stored in the object header of the dataset, there is no separate piece of data to query the offset of.

    It may be possible in the future to get the offset of the data in the object header, but this is problematic due to the fact that the messages in the object header can get relocated in the file when changes (like adding attributes, etc.) are made to the dataset, invalidating the address given to the user. filter.

    Contiguous dataset, [user block size] == 0, not external dsets.c
    1. Create file with 0 sized user-block (the default)
    2. Create contigous dataset
    3. Query dataset offset

    Succeed in getting the proper address and be able to verify that the data at that address in the file is what was written out.

    When data storage allocation is "late" (the default), querying the offset should fail if performed before data is written to the dataset.

    Needs additional test to verify that the data written out is located at the correct offset in the file.
    Contiguous dataset, [user block size] != 0, not external dsets.c
    1. Create file with non-0 sized user-block
    2. Create contigous dataset
    3. Query dataset offset

    Succeed in getting the proper address and be able to verify that the data at that address in the file is what was written out.

    When data storage allocation is "late" (the default), querying the offset should fail if performed before data is written to the dataset.

    Needs test for this case.
    Contiguous dataset, [user block size] == 0, external data storage external.c
    1. Create contigous dataset with external storage
    2. Query dataset offset
    FAIL

    In theory, it's easy to return the offset of the data in the external file, but this wasn't done because it would be too easy for users to assume that the offset returned was in the HDF5 file instead of the external file.


  3. Parallel Review:

    The H5Dget_offset() function is not tested in parallel. Currently, there does not appear to be a need for this.