Reviewer needed - fix for regression test java/awt/FontClass/CreateFont/DeleteFont
Pavel Tisnovsky
ptisnovs at redhat.com
Tue Nov 16 05:46:26 PST 2010
Dr Andrew John Hughes wrote:
> On 15:04 Mon 15 Nov , Pavel Tisnovsky wrote:
>> Hi all,
>>
>> can anybody please review fix for regression test
>> java/awt/FontClass/CreateFont/DeleteFont?
>>
>> This test check, if the temporary file containing font is properly
>> deleted when JVM finishes. The check is based on counting of files in
>> temporary dir - if temporary font file is not deleted, the number of
>> files before and after running the test differs.
>>
>> BUT JVM also creates hsperfdata_* subdirectory so the check described
>> above always fails (presence of this subdirectory add +1 to number of
>> files in temporary directory). I've added simple filter to resolve this
>> issue.
>>
>
> Do we not just know the name of the temporary font file to check for?
> Or some part of it?
The name of temporary file is generated each time the test is started.
It looks like:
+~JF7534461295183941137.tmp
So we know (probably) only the extension.
>
>> (I also tried to acquire bug ID to push this fix to OpenJDK7, but still
>> without success ;-)
>>
>> Diffstat produced against IcedTea6 HEAD is stored in attachment.
>>
>
> Ok if you drop the 'icedtea-' prefix on the patch!
>
>> Thank you in advance
>> Pavel
>
>> # HG changeset patch
>> # User ptisnovs
>> # Date 1289829138 -3600
>> # Node ID 553291a55fce4a6ab5730a0e9dae4570766451d0
>> # Parent ad1c77031a41739f3a912d27459a23a930ef4b88
>> Testcase correction.
>>
>> diff -r ad1c77031a41 -r 553291a55fce ChangeLog
>> --- a/ChangeLog Fri Nov 12 18:17:22 2010 +0000
>> +++ b/ChangeLog Mon Nov 15 14:52:18 2010 +0100
>> @@ -1,3 +1,9 @@
>> +2010-11-15 Pavel Tisnovsky <ptisnovs at redhat.com>
>> +
>> + * Makefile.am:
>> + * patches/icedtea-jtreg-DeleteFont.patch:
>> + Testcase correction - the test now ignores directory created by HS.
>> +
>> 2010-11-12 Andrew John Hughes <ahughes at redhat.com>
>>
>> * Makefile.am:
>> diff -r ad1c77031a41 -r 553291a55fce Makefile.am
>> --- a/Makefile.am Fri Nov 12 18:17:22 2010 +0000
>> +++ b/Makefile.am Mon Nov 15 14:52:18 2010 +0100
>> @@ -300,7 +300,8 @@
>> patches/openjdk/6622432-bigdecimal_performance.patch \
>> patches/openjdk/6850606-bigdecimal_regression.patch \
>> patches/openjdk/6876282-bigdecimal_divide.patch \
>> - patches/f14-fonts.patch
>> + patches/f14-fonts.patch \
>> + patches/icedtea-jtreg-DeleteFont.patch
>>
>> if WITH_ALT_HSBUILD
>> ICEDTEA_PATCHES += \
>> diff -r ad1c77031a41 -r 553291a55fce patches/icedtea-jtreg-DeleteFont.patch
>> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
>> +++ b/patches/icedtea-jtreg-DeleteFont.patch Mon Nov 15 14:52:18 2010 +0100
>> @@ -0,0 +1,20 @@
>> +--- openjdk-old/jdk/test/java/awt/FontClass/CreateFont/DeleteFont.sh 2010-06-21 23:15:49.000000000 +0200
>> ++++ openjdk/jdk/test/java/awt/FontClass/CreateFont/DeleteFont.sh 2010-11-15 14:13:13.000000000 +0100
>> +@@ -46,7 +46,7 @@
>> +
>> + cd ${TESTCLASSES}
>> +
>> +-numfiles0=`ls ${TESTCLASSES} | wc -l`
>> ++numfiles0=`ls ${TESTCLASSES} | grep -v "^hsperfdata*" | wc -l`
>> + ${TESTJAVA}/bin/java -Djava.io.tmpdir=${TESTCLASSES} DeleteFont
>> +
>> + if [ $? -ne 0 ]
>> +@@ -55,7 +55,7 @@
>> + exit 1
>> + fi
>> +
>> +-numfiles1=`ls ${TESTCLASSES} | wc -l`
>> ++numfiles1=`ls ${TESTCLASSES} | grep -v "^hsperfdata*" | wc -l`
>> +
>> + if [ $numfiles0 -ne $numfiles1 ]
>> + then
>
>
More information about the distro-pkg-dev
mailing list