RFR: 8325201: (zipfs) Disable TestPosix.setPermissionsShouldConvertToUnix which fails on Windows

Lance Andersen lancea at openjdk.org
Sun Feb 4 19:26:03 UTC 2024


On Sun, 4 Feb 2024 18:23:45 GMT, Eirik Bjørsnøs <eirbjo at openjdk.org> wrote:

> > I think we should use a separate PR to disable the test and keep this bug open
> 
> Lance,
> 
> I did create a separate issue for this PR to disable the test. We can keep the other bug open, yes. Or did I misunderstand something here..?

Hi Eirik,

Apologies for not being clearer

Sorry I missed that, thank you :-)
> 
> I’m not sure how to disable this test specially for Windows.

You could:
` private static final boolean isWindows = System.getProperty("os.name") .startsWith("Windows");
`
and in the test:


if(isWindows) {
   return;  
}


You could also use the jtreg SkippedException


import jtreg.SkippedException;

if(isWindows) {
   throw new SkippedException("Running on windows, temporarily by-passing running this test");  
}


See the [JTREG FAQ](https://openjdk.org/jtreg/faq.html) 4.34

-------------

PR Comment: https://git.openjdk.org/jdk/pull/17700#issuecomment-1925888483


More information about the nio-dev mailing list