diff --git a/test/Makefile.in b/test/Makefile.in index b8c6b717a6b..a0669697c99 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -48,7 +48,8 @@ MOSTLYCLEAN=cmpd_dset.h5 dataset.h5 extend.h5 istore.h5 tfile1.h5 tfile2.h5 \ mount_[0-9].h5 testmeta.h5 ttime.h5 trefer[12].h5 tvltypes.h5 \ tvlstr.h5 flush.h5 enum1.h5 titerate.h5 ttsafe.h5 tarray1.h5 \ tgenprop.h5 tmisc.h5 tmisc2a.h5 tmisc2b.h5 tmisc3.h5 tmisc4a.h5 \ - tmisc4b.h5 tmisc5.h5 set_extent_read.h5 set_extent_create.h5 + tmisc4b.h5 tmisc5.h5 tmisc6.h5 set_extent_read.h5 \ + set_extent_create.h5 CLEAN=$(TIMINGS) ## Source and object files for programs... The TEST_SRC list contains all the diff --git a/test/tmisc.c b/test/tmisc.c index 3112e98522b..6b3caaca9f2 100644 --- a/test/tmisc.c +++ b/test/tmisc.c @@ -106,6 +106,12 @@ typedef struct misc5_struct2_hndl *st1h_st2hndl; } misc5_struct1_hndl; +/* Definitions for misc. test #6 */ +#define MISC6_FILE "tmisc6.h5" +#define MISC6_DSETNAME1 "dset1" +#define MISC6_DSETNAME2 "dset2" +#define MISC6_NUMATTR 16 + /**************************************************************** ** ** test_misc1(): test unlinking a dataset from a group and immediately @@ -795,6 +801,108 @@ test_misc5(void) } /* end test_misc5() */ +/**************************************************************** +** +** test_misc6(): Test that object header continuation messages are +** created correctly. +** +****************************************************************/ +static void +test_misc6(void) +{ + hid_t loc_id, space_id, dataset_id; + hid_t attr_id; + char attr_name[16]; + unsigned u; + herr_t ret; + + /* Output message about test being performed */ + MESSAGE(5, ("Testing object header continuation code \n")); + + /* Create the file */ + loc_id=H5Fcreate(MISC6_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + CHECK(loc_id,FAIL,"H5Fcreate"); + + /* Create the dataspace */ + space_id=H5Screate(H5S_SCALAR); + CHECK(space_id,FAIL,"H5Screate"); + + /* Create the first dataset */ + dataset_id=H5Dcreate(loc_id, MISC6_DSETNAME1, H5T_NATIVE_INT, space_id, H5P_DEFAULT); + CHECK(dataset_id,FAIL,"H5Dcreate"); + + /* Close dataset */ + ret=H5Dclose(dataset_id); + CHECK(ret,FAIL,"H5Dclose"); + + /* Create the second dataset */ + dataset_id=H5Dcreate(loc_id, MISC6_DSETNAME2, H5T_NATIVE_INT, space_id, H5P_DEFAULT); + CHECK(dataset_id,FAIL,"H5Dcreate"); + + /* Close dataset */ + ret=H5Dclose(dataset_id); + CHECK(ret,FAIL,"H5Dclose"); + + /* Close file */ + ret=H5Fclose(loc_id); + CHECK(ret,FAIL,"H5Fclose"); + + /* Loop through adding attributes to each dataset */ + for(u=0; u