TL;DR: Test 44 is not going to succeed in a regular user's cmd.exe windows due to restrictions Windows places on symlink creation. Its failure does not indicate a failure in Rakudo or MoarVM. On Windows, the test should be optional and should only be run on versions of Windows which allow regular users to create symlinks.
Failed to create symlink called 'symlink-test-source' on target 'C:\Users\sinan\src\perl6\rakudo\symlink-test-target': Failed to symlink file: operation not permitted
in block <unit> at t\spec\S16-filehandles\filetest.rakudo.moar line 141
Actually thrown at:
in block <unit> at t\spec\S16-filehandles\filetest.rakudo.moar line 141
# Looks like you planned 44 tests, but ran 43
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 1/44 subtests
While Windows indeed have symlinks, creating them is still cumbersome because you have to have started cmd.exe with "Run as Administrator". Rumor has it that Windows 10 Creators Update will allow symlinks to be created without privilege elevation, but, as things currently stand this test cannot succeed as is on Windows and its failure does not indicate a failure of any part of Rakudo or MoarVM (unless one thinks MoarVM should incorporate privilege elevation functionality).
For example, the simple following program:
#include<windows.h>
#include<stdio.h>intmain(void)
{
if (CreateSymbolicLink("mylink.t", "mylink.c", 0)) {
puts("symlink created");
return0;
}
printf("failed to create symlink: %d\n", GetLastError());
return1;
}
fails in a regular cmd.exe window:
$ mylink
failed to create symlink: 1314
$ perl -MWin32 -E "say Win32::FormatMessage(1314)"
A required privilege is not held by the client.
but succeeds in an Administrator cmd.exe window:
$ mylink
symlink created
$ dir
...
2017-02-15 11:53 AM 251 mylink.c
2017-02-15 11:53 AM 113,664 mylink.exe
2017-02-15 11:53 AM 2,557 mylink.obj
2017-02-15 11:54 AM <SYMLINK> mylink.t [mylink.c]
...
The text was updated successfully, but these errors were encountered:
TL;DR: Test 44 is not going to succeed in a regular user's
cmd.exe
windows due to restrictions Windows places on symlink creation. Its failure does not indicate a failure in Rakudo or MoarVM. On Windows, the test should be optional and should only be run on versions of Windows which allow regular users to create symlinks.As mentioned in issue #232, I get:
While Windows indeed have symlinks, creating them is still cumbersome because you have to have started
cmd.exe
with "Run as Administrator". Rumor has it that Windows 10 Creators Update will allow symlinks to be created without privilege elevation, but, as things currently stand this test cannot succeed as is on Windows and its failure does not indicate a failure of any part of Rakudo or MoarVM (unless one thinks MoarVM should incorporate privilege elevation functionality).For example, the simple following program:
fails in a regular
cmd.exe
window:but succeeds in an Administrator
cmd.exe
window:The text was updated successfully, but these errors were encountered: