@@ -39,7 +39,7 @@ async fn test_hard_links(dir: &Descriptor) {
3939 assert_eq ! ( ln( "a.txt" , "/a.txt" ) . await , Err ( ErrorCode :: NotPermitted ) ) ;
4040 assert_eq ! ( ln( ".." , "a.txt" ) . await , Err ( ErrorCode :: NotPermitted ) ) ;
4141 assert_eq ! ( ln( "a.txt" , ".." ) . await , Err ( ErrorCode :: NotPermitted ) ) ;
42- // FIXME: https://github.com/WebAssembly/wasi-filesystem /issues/191
42+ // FIXME: https://github.com/WebAssembly/WASI /issues/710
4343 // assert_eq!(ln_follow("parent/foo", "a.txt").await,
4444 // Err(ErrorCode::NotPermitted));
4545 assert_eq ! ( ln( "parent/foo" , "a.txt" ) . await ,
@@ -51,9 +51,11 @@ async fn test_hard_links(dir: &Descriptor) {
5151 mkdir ( "d.cleanup" ) . await . unwrap ( ) ;
5252 ln ( "a.txt" , "d.cleanup/q.txt" ) . await . unwrap ( ) ;
5353 rm ( "d.cleanup/q.txt" ) . await . unwrap ( ) ;
54- // https://github.com/WebAssembly/wasi-filesystem/issues/184
55- assert_eq ! ( ln( "d.cleanup" , "e.cleanup" ) . await ,
56- Err ( ErrorCode :: NotPermitted ) ) ;
54+ match ln ( "d.cleanup" , "e.cleanup" ) . await {
55+ Err ( ErrorCode :: NotPermitted | ErrorCode :: Access ) => ( ) ,
56+ Err ( e) => panic ! ( "unexpected error hard-linking directories: {}" , e) ,
57+ Ok ( _) => panic ! ( "unexpected success hard-linking directories" )
58+ }
5759 rmdir ( "d.cleanup" ) . await . unwrap ( ) ;
5860}
5961
0 commit comments