mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-11-21 01:04:10 +08:00
[svn-r7320] Purpose:
Refactored code Description: Chase changes for the 'fileno' and 'objno' fields in H5G_stat_t Platforms tested: h5committested
This commit is contained in:
parent
a89594728a
commit
95bf191857
14
test/links.c
14
test/links.c
@ -264,7 +264,7 @@ cklinks(hid_t fapl)
|
||||
puts(" Unexpected object type should have been a dataset");
|
||||
goto error;
|
||||
}
|
||||
if (sb1.objno[0]!=sb2.objno[0] || sb1.objno[1]!=sb2.objno[1]) {
|
||||
if (sb1.objno!=sb2.objno) {
|
||||
H5_FAILED();
|
||||
puts(" Hard link test failed. Link seems not to point to the ");
|
||||
puts(" expected file location.");
|
||||
@ -278,7 +278,7 @@ cklinks(hid_t fapl)
|
||||
puts(" Unexpected object type should have been a dataset");
|
||||
goto error;
|
||||
}
|
||||
if (sb1.objno[0]!=sb2.objno[0] || sb1.objno[1]!=sb2.objno[1]) {
|
||||
if (sb1.objno!=sb2.objno) {
|
||||
H5_FAILED();
|
||||
puts(" Soft link test failed. Link seems not to point to the ");
|
||||
puts(" expected file location.");
|
||||
@ -398,10 +398,7 @@ ck_new_links(hid_t fapl)
|
||||
puts(" Unexpected object type, should have been a dataset");
|
||||
goto error;
|
||||
}
|
||||
if( sb_dset.objno[0]!=sb_hard1.objno[0] ||
|
||||
sb_dset.objno[1]!=sb_hard1.objno[1] ||
|
||||
sb_dset.objno[0]!=sb_hard2.objno[0] ||
|
||||
sb_dset.objno[1]!=sb_hard2.objno[1] ) {
|
||||
if( sb_dset.objno!=sb_hard1.objno || sb_dset.objno!=sb_hard2.objno ) {
|
||||
H5_FAILED();
|
||||
puts(" Hard link test failed. Link seems not to point to the ");
|
||||
puts(" expected file location.");
|
||||
@ -419,10 +416,7 @@ ck_new_links(hid_t fapl)
|
||||
goto error;
|
||||
}
|
||||
|
||||
if( sb_dset.objno[0]!=sb_soft1.objno[0] ||
|
||||
sb_dset.objno[1]!=sb_soft1.objno[1] ||
|
||||
sb_dset.objno[0]!=sb_soft2.objno[0] ||
|
||||
sb_dset.objno[1]!=sb_soft2.objno[1] ) {
|
||||
if( sb_dset.objno!=sb_soft1.objno || sb_dset.objno!=sb_soft2.objno ) {
|
||||
H5_FAILED();
|
||||
puts(" Soft link test failed. Link seems not to point to the ");
|
||||
puts(" expected file location.");
|
||||
|
@ -274,8 +274,7 @@ test_hide(hid_t fapl)
|
||||
* other names. This is a rather stupid test but demonstrates a point.
|
||||
*/
|
||||
if (H5Gget_objinfo(file1, "/file1", TRUE, &sb2)<0) goto error;
|
||||
if (sb1.fileno[0]!=sb2.fileno[0] || sb1.fileno[1]!=sb2.fileno[1] ||
|
||||
sb1.objno[0]!=sb2.objno[0] || sb1.objno[1]!=sb2.objno[1]) {
|
||||
if (sb1.fileno!=sb2.fileno || sb1.objno!=sb2.objno) {
|
||||
H5_FAILED();
|
||||
puts(" Hard link failed for hidden object.");
|
||||
goto error;
|
||||
@ -342,8 +341,7 @@ test_assoc(hid_t fapl)
|
||||
* of file2.
|
||||
*/
|
||||
if (H5Gget_objinfo(file1, "/mnt1", TRUE, &sb2)<0) goto error;
|
||||
if (sb1.fileno[0]!=sb2.fileno[0] || sb1.fileno[1]!=sb2.fileno[1] ||
|
||||
sb1.objno[0]!=sb2.objno[0] || sb1.objno[1]!=sb2.objno[1]) {
|
||||
if (sb1.fileno!=sb2.fileno || sb1.objno!=sb2.objno) {
|
||||
H5_FAILED();
|
||||
puts(" Association failed.");
|
||||
goto error;
|
||||
|
@ -97,8 +97,7 @@ main(void)
|
||||
if (H5Fclose(file)<0) return 1;
|
||||
|
||||
/* Compare times from the two ways of calling H5Gget_objinfo() */
|
||||
if (sb1.objno[0]!=sb2.objno[0] || sb1.objno[1]!=sb2.objno[1] ||
|
||||
sb1.mtime!=sb2.mtime) {
|
||||
if (sb1.objno!=sb2.objno || sb1.mtime!=sb2.mtime) {
|
||||
H5_FAILED();
|
||||
puts(" Calling H5Gget_objinfo() with the dataset ID returned");
|
||||
puts(" different values than calling it with a file and dataset");
|
||||
|
@ -515,15 +515,14 @@ test_misc4(void)
|
||||
CHECK(ret, FAIL, "H5Gget_objinfo");
|
||||
|
||||
/* Verify that the fileno values are the same for groups from file1 */
|
||||
VERIFY(stat1.fileno[0],stat2.fileno[0],"H5Gget_objinfo");
|
||||
VERIFY(stat1.fileno[1],stat2.fileno[1],"H5Gget_objinfo");
|
||||
VERIFY(stat1.fileno,stat2.fileno,"H5Gget_objinfo");
|
||||
|
||||
/* Verify that the fileno values are not the same between file1 & file2 */
|
||||
if(stat1.fileno[0]==stat3.fileno[0] && stat1.fileno[1]==stat3.fileno[1]) {
|
||||
if(stat1.fileno==stat3.fileno) {
|
||||
num_errs++;
|
||||
printf("Error on line %d: stat1.fileno==stat3.fileno\n",__LINE__);
|
||||
} /* end if */
|
||||
if(stat2.fileno[0]==stat3.fileno[0] && stat2.fileno[1]==stat3.fileno[1]) {
|
||||
if(stat2.fileno==stat3.fileno) {
|
||||
num_errs++;
|
||||
printf("Error on line %d: stat1.fileno==stat3.fileno\n",__LINE__);
|
||||
} /* end if */
|
||||
|
@ -453,8 +453,7 @@ check_new_move(void)
|
||||
puts(" Unexpected object type, should have been a group");
|
||||
goto error;
|
||||
}
|
||||
if( sb_hard1.objno[0]!=sb_hard2.objno[0] ||
|
||||
sb_hard1.objno[1]!=sb_hard2.objno[1] ) {
|
||||
if( sb_hard1.objno!=sb_hard2.objno) {
|
||||
H5_FAILED();
|
||||
puts(" Hard link test failed. Link seems not to point to the ");
|
||||
puts(" expected file location.");
|
||||
|
Loading…
Reference in New Issue
Block a user