diff options
author | Vailin Choi <vchoi@hdfgroup.org> | 2018-02-19 04:38:05 (GMT) |
---|---|---|
committer | Vailin Choi <vchoi@hdfgroup.org> | 2018-02-19 04:38:05 (GMT) |
commit | a4cb96a34fa91d5abdc394f5c38e3bf98a0b071b (patch) | |
tree | 1d66326f9f662bbee2e487e5699823233fe8816b | |
parent | db60f70286910498ca40291841a55114cf0ea3f7 (diff) | |
parent | 2fb0b8c3538df641deca73a8a694996bb5e61cdd (diff) | |
download | hdf5-a4cb96a34fa91d5abdc394f5c38e3bf98a0b071b.zip hdf5-a4cb96a34fa91d5abdc394f5c38e3bf98a0b071b.tar.gz hdf5-a4cb96a34fa91d5abdc394f5c38e3bf98a0b071b.tar.bz2 |
Merge pull request #902 in HDFFV/hdf5 from ~VCHOI/my_hdf5_fork:develop to develop
* commit '2fb0b8c3538df641deca73a8a694996bb5e61cdd':
Fix for daily test failure for test/fheap.c The failure occurs when HDF5TestExpress is set to 0. The check for file size check fails due to persisting free-space when creating the file. The fix is to set libver bounds (v18, latest) when creating the test file.
Fixed daily test failure Description: Added missing H5Pclose that caused daily test failure. Platforms tested: Linux/64 (jelly) Linux/64 (moohan) Darwin (osx1010test)
-rw-r--r-- | test/fheap.c | 27 | ||||
-rw-r--r-- | test/set_extent.c | 13 |
2 files changed, 38 insertions, 2 deletions
diff --git a/test/fheap.c b/test/fheap.c index 6c3a8ac..1be952f 100644 --- a/test/fheap.c +++ b/test/fheap.c @@ -16458,6 +16458,33 @@ main(void) if(H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, (hsize_t)1) < 0) TEST_ERROR fapl = def_fapl; + /* This is a fix for the daily test failure from the checkin for libver bounds. */ + /* + * Many tests failed the file size check when comparing (a) and (b) as below: + * --Create a file and close the file. Got the initial file size (a). + * --Reopen the file, perform fractal heap operations, and close the file. + * Got the file size (b). + * The cause for the file size differences: + * When the file is initially created with persisting free-space and with + * (earliest, latest) libver bounds, the file will have version 2 superblock + * due to non-default free-space handling. As the low bound is earliest, + * the library uses version 1 object header when creating the superblock + * extension message. + * When the file is reopened with the same libver bounds, the file's low + * bound is upgraded to v18 because the file has version 2 superblock. + * When the library creates the superblock extension message on file close, + * the library uses version 2 object header for the superblock extension + * message since the low bound is v18. + * This leads to the discrepancy in file sizes as the file is persisting + * free-space and there is object header version differences. + * The fix: + * Set libver bounds in fapl to (v18, latest) so that the file created in the + * test routines will have low bound set to v18. This will cause the + * library to use version 2 object header for the superblock extension + * message. + */ + if(H5Pset_libver_bounds(fapl, H5F_LIBVER_V18, H5F_LIBVER_LATEST) < 0) + TEST_ERROR break; case 2: if(H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)1) < 0) diff --git a/test/set_extent.c b/test/set_extent.c index 0467073..5d11819 100644 --- a/test/set_extent.c +++ b/test/set_extent.c @@ -427,6 +427,7 @@ error: */ static int do_layouts( hid_t fapl ) { + hid_t new_fapl = -1; H5F_libver_t low, high; /* Low and high bounds */ herr_t ret; /* Generic return value */ @@ -435,8 +436,6 @@ static int do_layouts( hid_t fapl ) for(low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; low++) { for(high = H5F_LIBVER_EARLIEST; high < H5F_LIBVER_NBOUNDS; high++) { - hid_t new_fapl; - /* Copy plist to use locally to avoid modifying the original */ new_fapl = H5Pcopy(fapl); @@ -446,7 +445,11 @@ static int do_layouts( hid_t fapl ) } H5E_END_TRY; if (ret < 0) /* Invalid low/high combinations */ + { + if (H5Pclose(new_fapl) < 0) + goto error; continue; + } if (test_layouts( H5D_COMPACT, new_fapl ) < 0) goto error; @@ -454,6 +457,8 @@ static int do_layouts( hid_t fapl ) if (test_layouts( H5D_CONTIGUOUS, new_fapl ) < 0) goto error; + if (H5Pclose(new_fapl) < 0) + goto error; } /* end for high */ } /* end for low */ @@ -462,6 +467,10 @@ static int do_layouts( hid_t fapl ) return 0; error: + H5E_BEGIN_TRY + { + H5Pclose(new_fapl); + } H5E_END_TRY; return -1; } |