diff options
Diffstat (limited to 'test/select_io_dset.c')
-rw-r--r-- | test/select_io_dset.c | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/test/select_io_dset.c b/test/select_io_dset.c index b498458..0f38aba 100644 --- a/test/select_io_dset.c +++ b/test/select_io_dset.c @@ -2751,9 +2751,6 @@ test_set_get_select_io_mode(hid_t fid) if (H5Pget_selection_io(dxpl, &selection_io_mode) < 0) TEST_ERROR; - if (selection_io_mode != H5D_SELECTION_IO_MODE_DEFAULT) - TEST_ERROR; - /* Disable case */ if (H5Pset_selection_io(dxpl, H5D_SELECTION_IO_MODE_OFF) < 0) TEST_ERROR; @@ -3063,11 +3060,29 @@ static herr_t test_get_no_selection_io_cause(const char *filename, hid_t fapl) { - int errs = 0; + hid_t dxpl = H5I_INVALID_HID; + H5D_selection_io_mode_t selection_io_mode; + int errs = 0; printf("\n"); TESTING("H5Pget_no_selection_io_cause()"); + if ((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0) + FAIL_STACK_ERROR; + + if (H5Pget_selection_io(dxpl, &selection_io_mode) < 0) + TEST_ERROR; + + if (H5Pclose(dxpl) < 0) + FAIL_STACK_ERROR; + + /* The following tests are based on H5D_SELECTION_IO_MODE_DEFAULT as the + default setting in the library; skip the tests if that is not true */ + if (selection_io_mode != H5D_SELECTION_IO_MODE_DEFAULT) { + SKIPPED(); + return SUCCEED; + } + errs += test_no_selection_io_cause_mode(filename, fapl, TEST_DISABLE_BY_API); errs += test_no_selection_io_cause_mode(filename, fapl, TEST_NOT_CONTIGUOUS_OR_CHUNKED_DATASET); errs += test_no_selection_io_cause_mode(filename, fapl, TEST_CONTIGUOUS_SIEVE_BUFFER); @@ -3083,6 +3098,7 @@ test_get_no_selection_io_cause(const char *filename, hid_t fapl) errs += test_no_selection_io_cause_mode(filename, fapl, TEST_PAGE_BUFFER); #endif +error: if (errs) { printf(" FAILED\n"); return FAIL; |