mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-11-27 02:10:55 +08:00
[svn-r11365] Purpose:
Add more assertion error check Description: Solution: Platforms tested: heping Misc. update:
This commit is contained in:
parent
3280e08b9b
commit
629c693d82
@ -144,10 +144,14 @@ void tts_acreate(void)
|
||||
}
|
||||
|
||||
/* close remaining resources */
|
||||
H5Sclose(dataspace);
|
||||
H5Tclose(datatype);
|
||||
H5Dclose(dataset);
|
||||
H5Fclose(file);
|
||||
ret=H5Sclose(dataspace);
|
||||
assert(ret>=0);
|
||||
ret=H5Tclose(datatype);
|
||||
assert(ret>=0);
|
||||
ret=H5Dclose(dataset);
|
||||
assert(ret>=0);
|
||||
ret=H5Fclose(file);
|
||||
assert(ret>=0);
|
||||
}
|
||||
|
||||
void *tts_acreate_thread(void *client_data)
|
||||
|
@ -140,7 +140,7 @@ void *tts_cancel_thread(void UNUSED *arg)
|
||||
|
||||
/* create a new dataset within the file */
|
||||
dataset = H5Dcreate(cancel_file, DATASETNAME, datatype, dataspace, H5P_DEFAULT);
|
||||
assert(dataset>=0);
|
||||
assert(dataset>=0);
|
||||
|
||||
/* If thread is cancelled, make cleanup call */
|
||||
cleanup_structure = (cancel_cleanup_t*)malloc(sizeof(cancel_cleanup_t));
|
||||
@ -152,7 +152,7 @@ void *tts_cancel_thread(void UNUSED *arg)
|
||||
|
||||
datavalue = 1;
|
||||
ret=H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &datavalue);
|
||||
assert(ret>=0);
|
||||
assert(ret>=0);
|
||||
|
||||
buffer = malloc(sizeof(int));
|
||||
ret=H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buffer);
|
||||
|
@ -139,8 +139,10 @@ void tts_dcreate(void)
|
||||
if (datavalue != i) {
|
||||
TestErrPrintf("Wrong value read %d for dataset name %s - test failed\n",
|
||||
datavalue, dsetname[i]);
|
||||
H5Dclose(dataset);
|
||||
H5Fclose(file);
|
||||
ret=H5Dclose(dataset);
|
||||
assert(ret>=0);
|
||||
ret=H5Fclose(file);
|
||||
assert(ret>=0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user