diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2010-05-20 12:43:30 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2010-05-20 12:43:30 (GMT) |
commit | 83f50e5a722f7a58562a0885fef695f74bce7285 (patch) | |
tree | 604f4dad662be4824a77eb85cffa3639cd35a9de /test/ohdr.c | |
parent | 02a23331992c618bb3cacb35bc0ea52f36ba1482 (diff) | |
download | hdf5-83f50e5a722f7a58562a0885fef695f74bce7285.zip hdf5-83f50e5a722f7a58562a0885fef695f74bce7285.tar.gz hdf5-83f50e5a722f7a58562a0885fef695f74bce7285.tar.bz2 |
[svn-r18865] Description:
Bring r18864 from trunk to 1.8 branch:
General cleanups to align metadata journaling branch and trunk
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
(h5committested on trunk)
Diffstat (limited to 'test/ohdr.c')
-rw-r--r-- | test/ohdr.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/ohdr.c b/test/ohdr.c index e416b80..6ae399d 100644 --- a/test/ohdr.c +++ b/test/ohdr.c @@ -500,6 +500,8 @@ main(void) HDputs("Accessing objects with unknown header messages:"); { hid_t file2; /* File ID for 'bogus' object file */ + hid_t sid; /* Dataspace ID */ + hid_t aid; /* Attribute ID */ char testpath[512] = ""; char testfile[512] = ""; char *srcdir = HDgetenv("srcdir"); @@ -580,6 +582,22 @@ main(void) if((dset = H5Dopen2(file, "/Dataset3", H5P_DEFAULT)) < 0) TEST_ERROR + /* Create data space */ + if((sid = H5Screate(H5S_SCALAR)) < 0) + FAIL_STACK_ERROR + + /* Create an attribute, to get the object header into write access */ + if((aid = H5Acreate2(dset, "Attr", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0) + FAIL_STACK_ERROR + + /* Close dataspace */ + if(H5Sclose(sid) < 0) + FAIL_STACK_ERROR + + /* Close attribute */ + if(H5Aclose(aid) < 0) + FAIL_STACK_ERROR + /* Close the dataset */ if(H5Dclose(dset) < 0) TEST_ERROR |