summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2020-06-22 12:31:08 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2020-06-22 12:31:08 (GMT)
commitcafb6e572822c0a7bb985f237b600944f9fcdb3c (patch)
tree4e528337878a2ddf67a1ff92c1190e1174bfa838 /test
parent8e62f1fe7b38b630f1a41007a03341cb66dec4b3 (diff)
parent3c9eaf294fb1862af75837f0150990112c735530 (diff)
downloadhdf5-cafb6e572822c0a7bb985f237b600944f9fcdb3c.zip
hdf5-cafb6e572822c0a7bb985f237b600944f9fcdb3c.tar.gz
hdf5-cafb6e572822c0a7bb985f237b600944f9fcdb3c.tar.bz2
Merge pull request #2658 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:1_10_normalization to hdf5_1_10
* commit '3c9eaf294fb1862af75837f0150990112c735530': Reduce overhead for H5open, which is involved in the public symbols like H5T_NATIVE_INT, etc. H5PB and H5Faccum normalization with develop. H5F normalizations with develop.
Diffstat (limited to 'test')
-rw-r--r--test/accum.c6
-rw-r--r--test/mount.c54
2 files changed, 33 insertions, 27 deletions
diff --git a/test/accum.c b/test/accum.c
index fb07580..8006112 100644
--- a/test/accum.c
+++ b/test/accum.c
@@ -62,9 +62,9 @@ void accum_printf(const H5F_t *f);
/* Private Test H5Faccum Function Wrappers */
#define accum_write(a,s,b) H5F_block_write(f, H5FD_MEM_DEFAULT, (haddr_t)(a), (size_t)(s), (b))
#define accum_read(a,s,b) H5F_block_read(f, H5FD_MEM_DEFAULT, (haddr_t)(a), (size_t)(s), (b))
-#define accum_free(f,a,s) H5F__accum_free(f, H5FD_MEM_DEFAULT, (haddr_t)(a), (hsize_t)(s))
-#define accum_flush(f) H5F__accum_flush(f)
-#define accum_reset(f) H5F__accum_reset(f, TRUE)
+#define accum_free(f,a,s) H5F__accum_free(f->shared, H5FD_MEM_DEFAULT, (haddr_t)(a), (hsize_t)(s))
+#define accum_flush(f) H5F__accum_flush(f->shared)
+#define accum_reset(f) H5F__accum_reset(f->shared, TRUE)
/* ================= */
/* Main Test Routine */
diff --git a/test/mount.c b/test/mount.c
index b7d2858..181b8cb 100644
--- a/test/mount.c
+++ b/test/mount.c
@@ -404,39 +404,42 @@ test_hide(hid_t fapl)
char filename1[1024], filename2[1024];
TESTING("name hiding under mount point");
- h5_fixname(FILENAME[0], fapl, filename1, sizeof filename1);
- h5_fixname(FILENAME[1], fapl, filename2, sizeof filename2);
+ h5_fixname(FILENAME[0], fapl, filename1, sizeof(filename1));
+ h5_fixname(FILENAME[1], fapl, filename2, sizeof(filename2));
if((file1 = H5Fopen(filename1, H5F_ACC_RDONLY, fapl)) < 0 ||
(file2 = H5Fopen(filename2, H5F_ACC_RDONLY, fapl)) < 0)
FAIL_STACK_ERROR
/* Get information about file1:/mnt1/file1 for later */
- if(H5Oget_info_by_name2(file1, "/mnt1/file1", &oi1, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Oget_info_by_name2(file1, "/mnt1/file1", &oi1, H5O_INFO_BASIC, H5P_DEFAULT) < 0)
+ FAIL_STACK_ERROR
/* Build the virtual file */
- if(H5Fmount(file1, "/mnt1", file2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Fmount(file1, "/mnt1", file2, H5P_DEFAULT) < 0)
+ FAIL_STACK_ERROR
/* Original names under file1:/mnt1 should not be accessible */
H5E_BEGIN_TRY {
- grp = H5Gopen2(file1, "/mnt1/file1", H5P_DEFAULT);
+ grp = H5Gopen2(file1, "/mnt1/file1", H5P_DEFAULT);
} H5E_END_TRY;
if(grp >= 0) {
- H5_FAILED();
- HDputs(" Name is still accessible under mount point.");
- TEST_ERROR
- } /* end if */
+ H5_FAILED();
+ HDputs(" Name is still accessible under mount point.");
+ TEST_ERROR
+ }
/*
* The original objects under file1:/mnt1 are still accessible by their
* other names. This is a rather stupid test but demonstrates a point.
*/
- if(H5Oget_info_by_name2(file1, "/file1", &oi2, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Oget_info_by_name2(file1, "/file1", &oi2, H5O_INFO_BASIC, H5P_DEFAULT) < 0)
+ FAIL_STACK_ERROR
if(oi1.fileno != oi2.fileno || H5F_addr_ne(oi1.addr, oi2.addr)) {
- H5_FAILED();
- HDputs(" Hard link failed for hidden object.");
- TEST_ERROR
- } /* end if */
+ H5_FAILED();
+ HDputs(" Hard link failed for hidden object.");
+ TEST_ERROR
+ }
/* Unmount and close objects */
if(H5Funmount(file1, "/mnt1") < 0) FAIL_STACK_ERROR
@@ -448,9 +451,9 @@ test_hide(hid_t fapl)
error:
H5E_BEGIN_TRY {
- H5Gclose(grp);
- H5Fclose(file1);
- H5Fclose(file2);
+ H5Gclose(grp);
+ H5Fclose(file1);
+ H5Fclose(file2);
} H5E_END_TRY;
return 1;
} /* end test_hide() */
@@ -490,20 +493,23 @@ test_assoc(hid_t fapl)
FAIL_STACK_ERROR
/* Get information about the root of file2 */
- if(H5Oget_info2(file2, &oi1, H5O_INFO_BASIC) < 0) FAIL_STACK_ERROR
+ if(H5Oget_info2(file2, &oi1, H5O_INFO_BASIC) < 0)
+ FAIL_STACK_ERROR
/* Create the virtual file */
- if(H5Fmount(file1, "/mnt1", file2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Fmount(file1, "/mnt1", file2, H5P_DEFAULT) < 0)
+ FAIL_STACK_ERROR
/*
* Get info about the mount point -- should be the same as the root group
* of file2.
*/
- if(H5Oget_info_by_name2(file1, "/mnt1", &oi2, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Oget_info_by_name2(file1, "/mnt1", &oi2, H5O_INFO_BASIC, H5P_DEFAULT) < 0)
+ FAIL_STACK_ERROR
if(oi1.fileno != oi2.fileno || H5F_addr_ne(oi1.addr, oi2.addr)) {
- H5_FAILED();
- HDputs(" Association failed.");
+ H5_FAILED();
+ HDputs(" Association failed.");
TEST_ERROR
} /* end if */
@@ -517,8 +523,8 @@ test_assoc(hid_t fapl)
error:
H5E_BEGIN_TRY {
- H5Fclose(file2);
- H5Fclose(file1);
+ H5Fclose(file2);
+ H5Fclose(file1);
} H5E_END_TRY;
return 1;
} /* end test_assoc() */