Details
Description
This reduced test representing test_setReadOnly of org.apache.harmony.luni.tests.java.io.FileTest.java fails under root user.
import java.io.*;
class test_setReadOnly {
public static void main(String args[]) throws Exception
void test() throws Exception
{
File f = File.createTempFile("hyts_tf", ".tmp");
f.setReadOnly();
try
catch (IOException ioe)
{ System.err.println("pass: IOException expected"); } f.delete();
}
}
Under root user, DRL vm prints:
failure: IOException not thrown
From non root user:
pass: IOException expected