diff options
author | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2012-03-20 04:23:10 (GMT) |
---|---|---|
committer | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2012-03-20 04:23:10 (GMT) |
commit | 5e202882c906ea1b144d26c0b7a837d4fb8a8b10 (patch) | |
tree | 2e0b79d5c5ae29582985acca16db2cb205fe02bd /hl/test | |
parent | 16591dbcc509a908e4edc509aa43081f9938c05d (diff) | |
download | hdf5-5e202882c906ea1b144d26c0b7a837d4fb8a8b10.zip hdf5-5e202882c906ea1b144d26c0b7a837d4fb8a8b10.tar.gz hdf5-5e202882c906ea1b144d26c0b7a837d4fb8a8b10.tar.bz2 |
[svn-r22096] Desciption: Added cyclic path test for H5LTpath_valid.
Tested: jam (gnu and intel)
Diffstat (limited to 'hl/test')
-rw-r--r-- | hl/test/test_lite.c | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/hl/test/test_lite.c b/hl/test/test_lite.c index 59da1f1..eb00cd7 100644 --- a/hl/test/test_lite.c +++ b/hl/test/test_lite.c @@ -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; |