mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-03-13 16:47:58 +08:00
[svn-r22096] Desciption: Added cyclic path test for H5LTpath_valid.
Tested: jam (gnu and intel)
This commit is contained in:
parent
16591dbcc5
commit
5e202882c9
@ -1841,8 +1841,11 @@ static int test_valid_path(void)
|
||||
* / / \
|
||||
* G2 DS4 G7
|
||||
* | (hard link (dangled soft link
|
||||
* | to /G1/DS3) to /G1/G20 )
|
||||
* / \
|
||||
* | to /G1/DS3) to /G1/G20 )
|
||||
* |
|
||||
* |
|
||||
* | --- Gcyc (soft link to /G1)
|
||||
* / \
|
||||
* / \
|
||||
* G5 \
|
||||
* (soft link G6 (external link /G1 in FILENAME4)
|
||||
@ -1901,7 +1904,7 @@ static int test_valid_path(void)
|
||||
goto out;
|
||||
|
||||
/*
|
||||
* Create a group named "/G3/G5" in the file.
|
||||
* Create a hard link
|
||||
*/
|
||||
if(H5Lcreate_hard(file_id, "/G2/DS4", file_id, "/G1/DS3",H5P_DEFAULT, H5P_DEFAULT)<0)
|
||||
goto out;
|
||||
@ -1917,6 +1920,12 @@ static int test_valid_path(void)
|
||||
if(H5Lcreate_soft("/G2", file_id, "/G1/G2/G5", H5P_DEFAULT, H5P_DEFAULT)<0)
|
||||
goto out;
|
||||
|
||||
/*
|
||||
* Create a cyclic soft link
|
||||
*/
|
||||
if(H5Lcreate_soft("/G1", file_id, "/G1/G2/Gcyc", H5P_DEFAULT, H5P_DEFAULT)<0)
|
||||
goto out;
|
||||
|
||||
if(H5Gclose(group)<0)
|
||||
goto out;
|
||||
|
||||
@ -2007,6 +2016,12 @@ static int test_valid_path(void)
|
||||
if( (path_valid = H5LTpath_valid(file_id, "/G1/G2/G5", TRUE)) != TRUE)
|
||||
goto out;
|
||||
|
||||
if( (path_valid = H5LTpath_valid(file_id, "/G1/G2/Gcyc/DS1", FALSE)) != TRUE)
|
||||
goto out;
|
||||
|
||||
if( (path_valid = H5LTpath_valid(file_id, "/G1/G2/Gcyc/DS1", TRUE)) != TRUE)
|
||||
goto out;
|
||||
|
||||
if( (path_valid = H5LTpath_valid(file_id, "/G2", TRUE)) != TRUE)
|
||||
goto out;
|
||||
|
||||
@ -2092,6 +2107,12 @@ static int test_valid_path(void)
|
||||
if( (path_valid = H5LTpath_valid(file_id, "/G1/G2/G6/ExternalLink", TRUE)) != TRUE)
|
||||
goto out;
|
||||
|
||||
if( (path_valid = H5LTpath_valid(file_id, "/G1/G2/Gcyc/G2/G6/ExternalLink/DS1", TRUE)) != TRUE)
|
||||
goto out;
|
||||
|
||||
if( (path_valid = H5LTpath_valid(file_id, "/G1/G2/Gcyc/G2/G6/ExternalLink/G20", FALSE)) != TRUE)
|
||||
goto out;
|
||||
|
||||
if( (path_valid = H5LTpath_valid(file_id, "/G1/G2/G6/ExternalLink/DS1", TRUE)) != TRUE)
|
||||
goto out;
|
||||
|
||||
@ -2102,6 +2123,10 @@ static int test_valid_path(void)
|
||||
if( (path_valid = H5LTpath_valid(file_id, "/G1/G2/G6/ExternalLink/G20", TRUE)) == TRUE)
|
||||
goto out;
|
||||
|
||||
if( (path_valid = H5LTpath_valid(file_id, "/G1/G2/Gcyc/G2/G6/ExternalLink/G20", TRUE)) == TRUE)
|
||||
goto out;
|
||||
|
||||
|
||||
if(H5Fclose(file_id)<0)
|
||||
goto out;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user