summaryrefslogtreecommitdiffstats
path: root/test/ttsafe_dcreate.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-10-08 19:59:36 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-10-08 19:59:36 (GMT)
commit16683943c6edb42f9129cc5d6c8f340c74014dad (patch)
treed1ed13b0b7677e56d4253b4fe5e0640f851e27ca /test/ttsafe_dcreate.c
parentd3ee3988b68292524b3a893b9db55c074f4b9e87 (diff)
downloadhdf5-16683943c6edb42f9129cc5d6c8f340c74014dad.zip
hdf5-16683943c6edb42f9129cc5d6c8f340c74014dad.tar.gz
hdf5-16683943c6edb42f9129cc5d6c8f340c74014dad.tar.bz2
[svn-r14193] Description:
Make H5Dopen versioned and change all internal usage to use H5Dopen2 Add simple regression test for H5Dopen1 Tested on: FreeBSD/32 6.2 (duty) in debug mode FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Mac OS X/32 10.4.10 (amazon) in debug mode
Diffstat (limited to 'test/ttsafe_dcreate.c')
-rw-r--r--test/ttsafe_dcreate.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/test/ttsafe_dcreate.c b/test/ttsafe_dcreate.c
index 5ed4181..4faf2bc 100644
--- a/test/ttsafe_dcreate.c
+++ b/test/ttsafe_dcreate.c
@@ -110,51 +110,51 @@ void tts_dcreate(void)
* creation plist and default file access plist
*/
file = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- assert(file>=0);
+ assert(file >= 0);
/* simultaneously create a large number of datasets within the file */
- for (i = 0; i < NUM_THREAD; i++) {
+ for(i = 0; i < NUM_THREAD; i++) {
thread_out[i].id = i;
thread_out[i].file = file;
thread_out[i].dsetname = dsetname[i];
ret=pthread_create(&threads[i], NULL, tts_dcreate_creator, &thread_out[i]);
assert(ret==0);
- }
+ } /* end for */
- for (i = 0;i < NUM_THREAD; i++) {
- ret=pthread_join(threads[i], NULL);
- assert(ret==0);
+ for(i = 0;i < NUM_THREAD; i++) {
+ ret = pthread_join(threads[i], NULL);
+ assert(ret == 0);
} /* end for */
/* compare data to see if it is written correctly */
- for (i = 0; i < NUM_THREAD; i++) {
- if ((dataset = H5Dopen(file,dsetname[i])) < 0) {
+ for(i = 0; i < NUM_THREAD; i++) {
+ if((dataset = H5Dopen2(file, dsetname[i], H5P_DEFAULT)) < 0) {
TestErrPrintf("Dataset name not found - test failed\n");
H5Fclose(file);
return;
} else {
- ret=H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &datavalue);
- assert(ret>=0);
+ ret = H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &datavalue);
+ assert(ret >= 0);
- if (datavalue != i) {
+ if(datavalue != i) {
TestErrPrintf("Wrong value read %d for dataset name %s - test failed\n",
datavalue, dsetname[i]);
- ret=H5Dclose(dataset);
- assert(ret>=0);
- ret=H5Fclose(file);
- assert(ret>=0);
+ ret = H5Dclose(dataset);
+ assert(ret >= 0);
+ ret = H5Fclose(file);
+ assert(ret >= 0);
return;
}
- ret=H5Dclose(dataset);
- assert(ret>=0);
+ ret = H5Dclose(dataset);
+ assert(ret >= 0);
}
}
/* close remaining resources */
- ret=H5Fclose(file);
- assert(ret>=0);
+ ret = H5Fclose(file);
+ assert(ret >= 0);
/* Destroy the thread attribute */
ret=pthread_attr_destroy(&attribute);