summaryrefslogtreecommitdiffstats
path: root/test/ttsafe_cancel.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2020-11-17 13:47:52 (GMT)
committerGitHub <noreply@github.com>2020-11-17 13:47:52 (GMT)
commit5d0be1b196570ac2c08ffe0b61ac6a45b6ab7f3f (patch)
treedbe8a76bcb211babe9900647eb1f515d8623ad9b /test/ttsafe_cancel.c
parentec48fb8dfdb4f2f59f22a5efb6b950aafcac449d (diff)
downloadhdf5-5d0be1b196570ac2c08ffe0b61ac6a45b6ab7f3f.zip
hdf5-5d0be1b196570ac2c08ffe0b61ac6a45b6ab7f3f.tar.gz
hdf5-5d0be1b196570ac2c08ffe0b61ac6a45b6ab7f3f.tar.bz2
Manual sync with develop (#95)
Brings all features from develop. Note that RELEASE.txt has not been updated (will be done in a future PR).
Diffstat (limited to 'test/ttsafe_cancel.c')
-rw-r--r--test/ttsafe_cancel.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/test/ttsafe_cancel.c b/test/ttsafe_cancel.c
index 1e40c58..2ec9a20 100644
--- a/test/ttsafe_cancel.c
+++ b/test/ttsafe_cancel.c
@@ -65,46 +65,46 @@ tts_cancel(void)
/* make thread scheduling global */
ret = pthread_attr_init(&attribute);
- assert(ret == 0);
+ HDassert(ret == 0);
#ifdef H5_HAVE_SYSTEM_SCOPE_THREADS
ret = pthread_attr_setscope(&attribute, PTHREAD_SCOPE_SYSTEM);
- assert(ret == 0);
+ HDassert(ret == 0);
#endif /* H5_HAVE_SYSTEM_SCOPE_THREADS */
/* Initialize mutex & condition variables */
ret = pthread_mutex_init(&mutex, NULL);
- assert(ret == 0);
+ HDassert(ret == 0);
ret = pthread_cond_init(&cond, NULL);
- assert(ret == 0);
+ HDassert(ret == 0);
/*
* Create a hdf5 file using H5F_ACC_TRUNC access, default file
* creation plist and default file access plist
*/
cancel_file = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- assert(cancel_file >= 0);
+ HDassert(cancel_file >= 0);
ret = pthread_create(&childthread, &attribute, tts_cancel_thread, NULL);
- assert(ret == 0);
+ HDassert(ret == 0);
tts_cancel_barrier();
ret = pthread_cancel(childthread);
- assert(ret == 0);
+ HDassert(ret == 0);
dataset = H5Dopen2(cancel_file, DATASETNAME, H5P_DEFAULT);
- assert(dataset >= 0);
+ HDassert(dataset >= 0);
ret = H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &buffer);
- assert(ret >= 0);
+ HDassert(ret >= 0);
if (buffer != 11)
TestErrPrintf("operation unsuccessful with value at %d instead of 11\n", buffer);
ret = H5Dclose(dataset);
- assert(ret >= 0);
+ HDassert(ret >= 0);
ret = H5Fclose(cancel_file);
- assert(ret >= 0);
+ HDassert(ret >= 0);
/* Destroy the thread attribute */
ret = pthread_attr_destroy(&attribute);
- assert(ret == 0);
+ HDassert(ret == 0);
} /* end tts_cancel() */
void *