summaryrefslogtreecommitdiffstats
path: root/test/ohdr.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-05-20 12:27:02 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-05-20 12:27:02 (GMT)
commit00aa7f1d8a39d900e90e1f68a58c7bce7eb3b113 (patch)
tree02ffa1aa09dd35b032c0b2ff220a57257533f5b7 /test/ohdr.c
parentd41b5be368dbfc9298fdae92ec4aa752593915b8 (diff)
downloadhdf5-00aa7f1d8a39d900e90e1f68a58c7bce7eb3b113.zip
hdf5-00aa7f1d8a39d900e90e1f68a58c7bce7eb3b113.tar.gz
hdf5-00aa7f1d8a39d900e90e1f68a58c7bce7eb3b113.tar.bz2
[svn-r18864] Description:
General cleanups to align metadata journaling branch and trunk Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in debug mode Mac OS X/32 10.6.3 (amazon) in debug mode Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'test/ohdr.c')
-rw-r--r--test/ohdr.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/ohdr.c b/test/ohdr.c
index ad83ec1..37699e5 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 */
const char *testfile = H5_get_srcdir_filename(FILE_BOGUS);
TESTING("object with unknown header message and no flags set");
@@ -567,6 +569,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