File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -32,9 +32,6 @@ void setup() {
3232 create_file ("file" , "abcdef" , 0777 );
3333 create_file ("otherfile" , "abcdef" , 0777 );
3434 symlink ("file" , "file-link" );
35- // some platforms use 777, some use 755 by default for symlinks
36- // make sure we're using 777 for the test
37- lchmod ("file-link" , 0777 );
3835 mkdir ("folder" , 0777 );
3936}
4037
@@ -113,6 +110,10 @@ void test() {
113110 assert (s .st_ctime != lastctime );
114111
115112#ifndef WASMFS // TODO https://github.com/emscripten-core/emscripten/issues/15948
113+ lstat ("file-link" , & s );
114+ int link_mode = s .st_mode ;
115+ assert ((link_mode & 0777 ) != S_IRUSR );
116+
116117 //
117118 // chmod a symlink's target
118119 //
@@ -125,7 +126,7 @@ void test() {
125126
126127 // but the link didn't
127128 lstat ("file-link" , & s );
128- assert (s .st_mode == ( 0777 | S_IFLNK ) );
129+ assert (s .st_mode == link_mode );
129130
130131 //
131132 // chmod the actual symlink
You can’t perform that action at this time.
0 commit comments