summaryrefslogtreecommitdiffstats
path: root/test/mount.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2005-11-15 02:55:39 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2005-11-15 02:55:39 (GMT)
commita1708eb023f2c8f8ac6c2c17bf1e598c8dff956e (patch)
tree34c87a3753b36c4c8d689d58bf456eaf261cd235 /test/mount.c
parentbea1e576c5ef5500678f7ce913d835341b625e8f (diff)
downloadhdf5-a1708eb023f2c8f8ac6c2c17bf1e598c8dff956e.zip
hdf5-a1708eb023f2c8f8ac6c2c17bf1e598c8dff956e.tar.gz
hdf5-a1708eb023f2c8f8ac6c2c17bf1e598c8dff956e.tar.bz2
[svn-r11712] Purpose:
New feature Description: Check in baseline for compact group revisions, which radically revises the source code for managing groups and object headers. WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! This initiates the "unstable" phase of the 1.7.x branch, leading up to the 1.8.0 release. Please test this code, but do _NOT_ keep files created with it - the format will change again before the release and you will not be able to read your old files!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! Solution: There's too many changes to really describe them all, but some of them include: - Stop abusing the H5G_entry_t structure and split it into two separate structures for non-symbol table node use within the library: H5O_loc_t for object locations in a file and H5G_name_t to store the path to an opened object. H5G_entry_t is now only used for storing symbol table entries on disk. - Retire H5G_namei() in favor of a more general mechanism for traversing group paths and issuing callbacks on objects located. This gets us out of the business of hacking H5G_namei() for new features, generally. - Revised H5O* routines to take a H5O_loc_t instead of H5G_entry_t - Lots more... Platforms tested: h5committested and maybe another dozen configurations.... :-)
Diffstat (limited to 'test/mount.c')
-rw-r--r--test/mount.c33
1 files changed, 20 insertions, 13 deletions
diff --git a/test/mount.c b/test/mount.c
index 6c19143..a0c5842 100644
--- a/test/mount.c
+++ b/test/mount.c
@@ -336,7 +336,7 @@ test_hide(hid_t fapl)
static int
test_assoc(hid_t fapl)
{
- hid_t file1=-1, file2=-1;
+ hid_t file1 = -1, file2 = -1;
H5G_stat_t sb1, sb2;
char filename1[1024], filename2[1024];
@@ -345,35 +345,42 @@ test_assoc(hid_t fapl)
h5_fixname(FILENAME[1], fapl, filename2, sizeof filename2);
/* Open the files */
- if ((file1=H5Fopen(filename1, H5F_ACC_RDONLY, fapl))<0 ||
- (file2=H5Fopen(filename2, H5F_ACC_RDONLY, fapl))<0)
- goto error;
+ if((file1 = H5Fopen(filename1, H5F_ACC_RDONLY, fapl)) < 0 ||
+ (file2 = H5Fopen(filename2, H5F_ACC_RDONLY, fapl)) < 0)
+ TEST_ERROR
/* Get information about the root of file2 */
- if (H5Gget_objinfo(file2, "/", TRUE, &sb1)<0) goto error;
+ if(H5Gget_objinfo(file2, "/", TRUE, &sb1) < 0)
+ TEST_ERROR
/* Create the virtual file */
- if (H5Fmount(file1, "/mnt1", file2, H5P_DEFAULT)<0) goto error;
+ if(H5Fmount(file1, "/mnt1", file2, H5P_DEFAULT) < 0)
+ TEST_ERROR
/*
* Get info about the mount point -- should be the same as the root group
* of file2.
*/
- if (H5Gget_objinfo(file1, "/mnt1", TRUE, &sb2)<0) goto error;
- if (sb1.fileno!=sb2.fileno || sb1.u.obj.objno!=sb2.u.obj.objno) {
+ if(H5Gget_objinfo(file1, "/mnt1", TRUE, &sb2) < 0)
+ TEST_ERROR
+ if(sb1.fileno != sb2.fileno || sb1.u.obj.objno != sb2.u.obj.objno) {
H5_FAILED();
puts(" Association failed.");
- goto error;
+ AT();
+ goto error;
}
/* Shut down */
- if (H5Funmount(file1, "/mnt1_link")<0) goto error;
- if (H5Fclose(file1)<0) goto error;
- if (H5Fclose(file2)<0) goto error;
+ if(H5Funmount(file1, "/mnt1_link") < 0)
+ TEST_ERROR
+ if(H5Fclose(file1) < 0)
+ TEST_ERROR
+ if(H5Fclose(file2) < 0)
+ TEST_ERROR
PASSED();
return 0;
- error:
+error:
H5E_BEGIN_TRY {
H5Fclose(file2);
H5Fclose(file1);