diff options
author | Raymond Lu <songyulu@hdfgroup.org> | 2002-10-01 14:35:01 (GMT) |
---|---|---|
committer | Raymond Lu <songyulu@hdfgroup.org> | 2002-10-01 14:35:01 (GMT) |
commit | 09325c1da67ed0b747b70951f1e373ddd42f9478 (patch) | |
tree | 9f5733d3495e4b67b1791d95a32174c71d89f51a /test | |
parent | 8410a8536536ad6bdde5f09e643a9123df555460 (diff) | |
download | hdf5-09325c1da67ed0b747b70951f1e373ddd42f9478.zip hdf5-09325c1da67ed0b747b70951f1e373ddd42f9478.tar.gz hdf5-09325c1da67ed0b747b70951f1e373ddd42f9478.tar.bz2 |
[svn-r5955]
Purpose:
a bug fix
Description:
modify the condition check for the file close degree.
Platforms tested:
Linux 2.2(eirene), Solaris 2.7(arabica), IRIX64 6.5(modi4)
Diffstat (limited to 'test')
-rw-r--r-- | test/tfile.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/tfile.c b/test/tfile.c index 27b3601..2ad50cb 100644 --- a/test/tfile.c +++ b/test/tfile.c @@ -406,6 +406,31 @@ test_file_close(void) CHECK(ret, FAIL, "H5Fclose"); + /* Test behavior while opening file multiple times with different file + * close degree + */ + fid1 = H5Fcreate(FILE1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + CHECK(fid1, FAIL, "H5Fcreate"); + + ret = H5Pset_fclose_degree(fapl_id, H5F_CLOSE_WEAK); + CHECK(ret, FAIL, "H5Pset_fclose_degree"); + + ret = H5Pget_fclose_degree(fapl_id, &fc_degree); + VERIFY(fc_degree, H5F_CLOSE_WEAK, "H5Pget_fclose_degree"); + + /* should succeed */ + fid2 = H5Fopen(FILE1, H5F_ACC_RDWR, fapl_id); + CHECK(fid2, FAIL, "H5Fopen"); + + /* Close first open */ + ret = H5Fclose(fid1); + CHECK(ret, FAIL, "H5Fclose"); + + /* Close second open */ + ret = H5Fclose(fid2); + CHECK(ret, FAIL, "H5Fclose"); + + /* Test behavior while opening file multiple times with file close * degree STRONG */ ret = H5Pset_fclose_degree(fapl_id, H5F_CLOSE_STRONG); |