Revert Sencode h5dump test

This commit is contained in:
Allen Byrne
2018-07-27 09:51:27 -05:00
parent 2b193845d2
commit 2c5c115a61
5 changed files with 0 additions and 101 deletions

View File

@@ -21,7 +21,6 @@
# --------------------------------------------------------------------
set (HDF5_REFERENCE_FILES
${HDF5_TOOLS_DIR}/testfiles/charsets.ddl
${HDF5_TOOLS_DIR}/testfiles/err_attr_dspace.ddl
${HDF5_TOOLS_DIR}/testfiles/file_space.ddl
${HDF5_TOOLS_DIR}/testfiles/filter_fail.ddl
${HDF5_TOOLS_DIR}/testfiles/non_existing.ddl
@@ -218,7 +217,6 @@
)
set (HDF5_REFERENCE_TEST_FILES
${HDF5_TOOLS_DIR}/testfiles/charsets.h5
${HDF5_TOOLS_DIR}/testfiles/err_attr_dspace.h5
${HDF5_TOOLS_DIR}/testfiles/file_space.h5
${HDF5_TOOLS_DIR}/testfiles/filter_fail.h5
${HDF5_TOOLS_DIR}/testfiles/packedbits.h5
@@ -1535,9 +1533,6 @@
# test for non-existing file
ADD_H5_TEST (non_existing 1 --enable-error-stack tgroup.h5 non_existing.h5)
# test to verify HDFFV-10333: error similar to H5O_attr_decode in the jira issue
ADD_H5_TEST (err_attr_dspace 1 err_attr_dspace.h5)
##############################################################################
### P L U G I N T E S T S
##############################################################################

View File

@@ -113,7 +113,6 @@
#define FILE83 "tvlenstr_array.h5"
#define FILE84 "tudfilter.h5"
#define FILE85 "tgrpnullspace.h5"
#define FILE86 "err_attr_dspace.h5"
/*-------------------------------------------------------------------------
* prototypes
@@ -10477,89 +10476,6 @@ static void gent_null_space_group(void)
H5Fclose(fid);
}
/*-------------------------------------------------------------------------
* Function: gent_err_attr_dspace
*
* Purpose: Generate a file with shared dataspace message.
* Then write an illegal version to the shared dataspace message
* to trigger the error.
* This is to verify HDFFV-10333 that h5dump will exit
* gracefully when encountered error similar to
* H5O_attr_decode in the jira issue.
*
*-------------------------------------------------------------------------
*/
static void
gent_err_attr_dspace()
{
hid_t fid = -1; /* File identifier */
hid_t fcpl = -1; /* File access property list */
hid_t sid = -1; /* Dataspace identifier */
hid_t aid = -1; /* Attribute identifier */
hsize_t dims = 2; /* Dimensino size */
int wdata[2] = {7, 42}; /* The buffer to write */
int fd = -1; /* The file descriptor */
char val = 6; /* An invalid version */
/* Create an fcpl */
if((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
goto error;
/* Set up the dataspace message to be shared */
if(H5Pset_shared_mesg_nindexes(fcpl, 1) < 0)
goto error;
if(H5Pset_shared_mesg_index(fcpl, 0, H5O_SHMESG_SDSPACE_FLAG, 1) < 0)
goto error;
/* Create the file with the shared message setting */
if((fid = H5Fcreate(FILE86, H5F_ACC_TRUNC, fcpl, H5P_DEFAULT)) < 0)
goto error;
/* Create the dataspace */
if((sid = H5Screate_simple(1, &dims, &dims)) < 0)
goto error;
/* Create an attribute with shared dataspace */
if((aid = H5Acreate2(fid, "attribute", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
if(H5Awrite(aid, H5T_NATIVE_INT, wdata) < 0)
goto error;
/* Closing */
if(H5Aclose(aid) < 0)
goto error;
if(H5Sclose(sid) < 0)
goto error;
if(H5Pclose(fcpl) < 0)
goto error;
if(H5Fclose(fid) < 0)
goto error;
/* This section of code will write an illegal version to the "version" field
of the shared dataspace message */
if((fd = HDopen(FILE86, O_RDWR, 0633)) < 0)
goto error;
/* Offset of the "version" field to modify is as follows: */
/* 1916: offset of the object header containing the attribute message */
/* 32: offset of the attribute message in the object header */
/* 30: offset in the attribute message containing the version of the shared dataspace message */
if(HDlseek(fd, 1916+32+30, SEEK_SET) < 0)
goto error;
if(HDwrite(fd, &val, 1) < 0)
goto error;
if(HDclose(fd) < 0)
goto error;
error:
H5E_BEGIN_TRY {
H5Pclose(fcpl);
H5Aclose(aid);
H5Sclose(sid);
H5Fclose(fid);
} H5E_END_TRY;
} /* gen_err_attr_dspace() */
int main(void)
{
gent_group();
@@ -10653,8 +10569,6 @@ int main(void)
gent_udfilter();
gent_err_attr_dspace();
return 0;
}

View File

@@ -175,7 +175,6 @@ $SRC_H5DUMP_TESTFILES/tvldtypes5.h5
$SRC_H5DUMP_TESTFILES/tvlenstr_array.h5
$SRC_H5DUMP_TESTFILES/tvlstr.h5
$SRC_H5DUMP_TESTFILES/tvms.h5
$SRC_H5DUMP_TESTFILES/err_attr_dspace.h5
"
LIST_OTHER_TEST_FILES="
@@ -361,7 +360,6 @@ $SRC_H5DUMP_TESTFILES/twithddlfile.exp
$SRC_H5DUMP_TESTFILES/h5dump-help.txt
$SRC_H5DUMP_TESTFILES/out3.h5import
$SRC_H5DUMP_TESTFILES/tbinregR.exp
$SRC_H5DUMP_TESTFILES/err_attr_dspace.ddl
"
LIST_ERROR_TEST_FILES="
@@ -1366,9 +1364,6 @@ TOOLTEST2 tall-6.exp --enable-error-stack -y -o tall-6.txt -d /g1/g1.1/dset1.1.1
# test for non-existing file
TOOLTEST3 non_existing.ddl --enable-error-stack tgroup.h5 non_existing.h5
# test to verify HDFFV-10333: error similar to H5O_attr_decode in the jira issue
TOOLTEST err_attr_dspace.ddl err_attr_dspace.h5
# Clean up temporary files/directories
CLEAN_TESTFILES_AND_TESTDIR

View File

@@ -1,5 +0,0 @@
HDF5 "err_attr_dspace.h5" {
GROUP "/" {
}
}
h5dump error: error getting attribute information

Binary file not shown.