hi Mark,

Thanks for coming back to me. This helper function in the test led me to 
believe this test should not be running on the Windows platform (












*    private static boolean isPosixSupported(File newFile) throws 
IOException {        // Check Posix calls are supported (to avoid running 
this test on Windows for instance)        boolean posixSupported = 
true;        try {            
Files.getPosixFilePermissions(newFile.toPath());        } catch 
(UnsupportedOperationException e) {            posixSupported = 
false;        }        return posixSupported;    }*however when i check 
using gpedit.msc, i see that symlinks are allowed for Admin group users (of 
which i am one on the machine). So running the IDE as an Admin user allows 
me to pass the test.

Perhaps the comment in the unit test above is old, pre-symlinks on Windows 
...

Thanks again, 
regards
Jonathan


On Saturday, 14 April 2018 11:36:10 UTC+2, Jonathan Bergh wrote:
>
> hi all,
>
> i have just cloned and tried to test build all the Jenkins modules, 
> including core, and i am getting a test failure for AtomicFileWriter 
> complaining about permissions to generate a symlink.
>
> I am getting this on Win10 so am a little confused? 
> 1) Should this test even be running (do we have symlinks on Windows? I am 
> not a everyday Windows user)
> 2) Where is it trying to link to? various test files in '/target/'?
> 3) How can i solve? Since '/target' is compile time generated, i wonder 
> why there are any permission issues?
>
> many thanks and regards
> jonathan
>
>
>
>
>
>
>
>
>
> *Tests run: 8, Failures: 0, Errors: 1, Skipped: 1, Time elapsed: 0.064 s 
> <<< FAILURE! - in 
> hudson.util.AtomicFileWriterTestsymlinkToDirectory(hudson.util.AtomicFileWriterTest)
>   
> Time elapsed: 0.009 s  <<< ERROR!java.nio.file.FileSystemException: 
> C:\Users\User1\Documents\NetBeansProjects\jenkins\core\target\junit4546323911809935589\junit2633652506541301542\ze_symlink:
>  
> A required privilege is not held by the client.    at 
> sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:86)  
>   
> at 
> sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)    
> at 
> sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)   
>  
> at 
> sun.nio.fs.WindowsFileSystemProvider.createSymbolicLink(WindowsFileSystemProvider.java:585)*
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/93022f46-1139-44aa-90e0-141d3f69aadc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to