Reviewer needed - fix for regression test: test/java/io/IOException/LastErrorString.java

Pavel Tisnovsky ptisnovs at redhat.com
Tue Feb 22 02:26:40 PST 2011


Dr Andrew John Hughes wrote:
> On 17:40 Mon 21 Feb     , Pavel Tisnovsky wrote:
>> Hi all,
>>
>> I'd like to add new patch into IcedTea6 HEAD and probably backport it
>> into IcedTea6-1.9 too. This patch fixes issue found in regression test
>> test/java/io/IOException/LastErrorString.java:
>> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=634
>>
>> Besides the problem described above original version of this test also
>> does not distinguish between the unreadable and unwriteable files, which
>> I've also fixed.
>>
> 
> Can you elaborate on what changes you made?
> It's not very obvious from the patch.

Sure. The test is now started from (new) shell script which detects the
proper working directory (such directory is created for each test by
JTreg harness) and then this script creates four empty files and one
subdirectory there:

- one readable file (u+r)
- one writeable file (u+w)
- one unreadable file (a-r)
- one unwriteable file (a-w)
- unwriteable directory

Then the Java part of this test is started with one parameter - path to
working directory. This part of test tries to open files/directories for
reading/writing and check if proper exception is thrown when such
files/directories could not be opened for various reasons (it's not
possible to open read-only file for writing etc.).

> 
> Does the test now avoid /etc/shadow?
yes, perfectly :-)

>>
>> PS: if this fix will be approved for IcedTea6, I'd like to push this
>> change to OpenJDK6 and OpenJDK7 too.
> 
> I can't give approval for that.
> 
Yeah, I just wanted to inform you that this change should be included in
O6 and O7 too in the future.



More information about the distro-pkg-dev mailing list