[classlib][luni] Serialization problem with EnumSet
Hi All: After reading the serialized form of EnumSet, I found an inner class java.util.EnumSet.SerializationProxy. This class does not have any extra explaination. Does any one has any suggestion on how to deal with it? Best regards -- Spark Shen China Software Development Lab, IBM - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: svn commit: r424890 - in /incubator/harmony/enhanced/classlib/trunk/modules/luni/src: main/java/java/io/BufferedInputStream.java test/java/tests/api/java/io/BufferedInputStreamTest.java
Richard Liang wrote: Vladimir Ivanov wrote: No, this test will be fail if the issue 667 returns back :) I see. Thanks a lot. I will try to provide a patch to fix this issue. Harmony-1140 was raised. And Paulex had applied my patch. Thanks a lot. Best regards, Richard Richard Thanks, Vladimir On 8/10/06, Richard Liang [EMAIL PROTECTED] wrote: Paulex Yang wrote: Oops, it's my fault that missed to find this. Would you mind to provide a patch for this? or I'll fix it myself. let me fix it. But I'm not sure if Vladimir Ivanov has any concerns about this issue. Richard. Richard Liang wrote: Hello Paulex, It seems that the test case is invalid, because the tests will always pass whether buf.close() throws IOException or not. +try { +buf.close(); +} catch (IOException e) { +//expected +} } Please have a look at the following tests which passes on RI, but fails on Harmony. public void test_close() throws IOException {//regression for HARMONY-667 BufferedInputStream buf = new BufferedInputStream(null, 5); buf.close(); } Thanks a lot. Best regards, Richard. [EMAIL PROTECTED] wrote: Author: pyang Date: Sun Jul 23 20:29:14 2006 New Revision: 424890 URL: http://svn.apache.org/viewvc?rev=424890view=rev Log: Fix for HARMONY-667 ( [classlib][io]java.io.BufferedInputStream.skip(int n) unexpected NPE) Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/BufferedInputStream.java incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/io/BufferedInputStreamTest.java Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/BufferedInputStream.java URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/BufferedInputStream.java?rev=424890r1=424889r2=424890view=diff == --- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/BufferedInputStream.java (original) +++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/BufferedInputStream.java Sun Jul 23 20:29:14 2006 @@ -1,4 +1,4 @@ -/* Copyright 1998, 2005 The Apache Software Foundation or its licensors, as applicable +/* Copyright 1998, 2006 The Apache Software Foundation or its licensors, as applicable * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. @@ -109,6 +109,9 @@ * If an error occurs attempting to close this stream. */ public synchronized void close() throws IOException { +if(null == in){ +throw new IOException(org.apache.harmony.luni.util.Msg.getString(K0059)); +} super.close(); buf = null; } @@ -311,6 +314,9 @@ * occurs. */ public synchronized long skip(long amount) throws IOException { +if(null == in){ +throw new IOException(org.apache.harmony.luni.util.Msg.getString(K0059)); +} if (amount 1) return 0; Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/io/BufferedInputStreamTest.java URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/io/BufferedInputStreamTest.java?rev=424890r1=424889r2=424890view=diff == --- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/io/BufferedInputStreamTest.java (original) +++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/io/BufferedInputStreamTest.java Sun Jul 23 20:29:14 2006 @@ -1,4 +1,4 @@ -/* Copyright 1998, 2005 The Apache Software Foundation or its licensors, as applicable +/* Copyright 1998, 2006 The Apache Software Foundation or its licensors, as applicable * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. @@ -120,6 +120,14 @@ // Test for method void java.io.BufferedInputStream.close() new BufferedInputStream(isFile); new BufferedInputStream(isFile); + +//regression for HARMONY-667 +BufferedInputStream buf = new BufferedInputStream(null, 5); +try { +buf.close(); +} catch (IOException e) { +//expected +} } /** @@ -310,6 +318,14 @@ } catch (java.io.IOException e) { fail(Exception during skip test); } + +//regression
Re: Re: [general] compatibility packages
On 14/08/06, Geir Magnusson Jr [EMAIL PROTECTED] wrote: 3) Clearly there's value in providing these [sun.* classes], as other implementations (BEA, IBM, Apple) include them. Possibly true, but for different reasons. They license the source code bulk from Sun, not re-implement their own. (They have patches etc. that sit on top of them, of course.) As a result, there's a bunch of internal stuff that is exactly the same as Sun's, and so depends on the sun.* classes. The value (to them) is that they don't have to spend time re-writing the sun.* classes instead of something else. There's no value necessarily to the end user; it's a selfish decision on their part, nothing more. Alex. - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [classlib][summary] Exception throwing compatibility
Harmony-1170 has been raised to reflect our conclusion. I have attached a patch for site/xdocs/subcomponents/classlibrary/compat.xml Best regards, Richard Richard Liang wrote: Hello All, I'd like to update our Exception-throwing compatibility[1] to reflect our discussion in several threads recently. I just created a wiki page here[2], please kindly comment or update the wiki page directly. If there is no objection, I will provide a patch for site/xdocs/subcomponents/classlibrary/compat.xml Thanks a lot. [1] http://incubator.apache.org/harmony/subcomponents/classlibrary/compat.html [2] http://wiki.apache.org/harmony/Exception-throwing_compatibility -- Richard Liang China Software Development Lab, IBM - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [jira] Created: (HARMONY-1113) [classlib][beans]Harmony does not throw IllegalArgumentException for java.beans.PropertyEditorSupport.setAsText() while RI does.
Hi Ilya Is it significant that the test code is in bootclasspath, or it can work from classpath? There were some discussions around the tests that might be interesting, please look at [1]. Please look at the section Utilize JUnit's assert/fail methods and exception handling for clean test code This also might be useful [2] Thanks, Mikhail [1] http://mail-archives.apache.org/mod_mbox/incubator-harmony-dev/200603.mbox/[EMAIL PROTECTED] [2] http://incubator.apache.org/harmony/subcomponents/classlibrary/agreements.html 2006/8/9, Ilya Okomin (JIRA) [EMAIL PROTECTED]: [classlib][beans]Harmony does not throw IllegalArgumentException for java.beans.PropertyEditorSupport.setAsText() while RI does. Key: HARMONY-1113 URL: http://issues.apache.org/jira/browse/HARMONY-1113 Project: Harmony Issue Type: Bug Components: Classlib Reporter: Ilya Okomin Priority: Minor Attachments: PropertyEditorSupport.patch, PropertyEditorSupportTest.patch Harmony does not throw IllegalArgumentException for java.beans.PropertyEditorSupport.setAsText(String) when parameter is invalid while RI throws IllegalArgumentException. Java 1.5.0 spec says:May raise java.lang.IllegalArgumentException if either the String is badly formatted or if this kind of property can't be expressed as text. =test.java== import java.beans.PropertyEditorSupport; public class test { public static void main(String args[]) { PropertyEditorSupport undefPropertyEditorSupport = new PropertyEditorSupport(); try { System.err.print(value is null: ); undefPropertyEditorSupport.setAsText(string); System.err.println(failed: IllegalArgumentException expected, but nothing was thrown!\n); } catch (IllegalArgumentException eE) { System.err.println(success!); eE.printStackTrace(); } PropertyEditorSupport defPropertyEditorSupport = new PropertyEditorSupport(); try { defPropertyEditorSupport.setValue(new Object()); System.err.print(value is Object: ); defPropertyEditorSupport.setAsText(string); System.err.println(failed: IllegalArgumentException expected, but nothing was thrown!\n); } catch (IllegalArgumentException eE) { System.err.println(success!); eE.printStackTrace(); } defPropertyEditorSupport = new PropertyEditorSupport(); try { defPropertyEditorSupport.setValue(new String()); System.err.print(value is String: ); defPropertyEditorSupport.setAsText(string); System.err.println(success!); } catch (IllegalArgumentException eE) { System.err.println(failed!); eE.printStackTrace(); } } } === Output: Harmony: java version 1.5.0 pre-alpha : not complete or compatible svn = r424571, (Jul 22 2006), Windows/ia32/msvc 1310, release build http://incubator.apache.org/harmony value is null: failed: IllegalArgumentException expected, but nothing was thrown! value is Object: failed: IllegalArgumentException expected, but nothing was thrown! value is String: success! RI: java version 1.5.0 Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64) BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC: System optimized over throughput (initial strategy singleparpar)) value is null: success! java.lang.IllegalArgumentException: string at java.beans.PropertyEditorSupport.setAsText(PropertyEditorSupport.java:166) at bugzilla.Test9433.main(Test9433.java:11) value is Object: success! java.lang.IllegalArgumentException: string at java.beans.PropertyEditorSupport.setAsText(PropertyEditorSupport.java:166) at bugzilla.Test9433.main(Test9433.java:23) value is String: success! For this reason, suggested solution is to check in setAsText() method if the value is instanse of String, in case of true - setValue, otherwise - throw an IAE following the spec, ...this kind of property can't be expressed as text. Suggested patch and regression test can be found in the attach -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [testing] metadata approach
Alexei Zakharov wrote: Hi Oliver, So perhaps the build system should be changed temporarily so that we dont self host the test harness? i.e. until we get java.util.concurrent, run Ant and the subsequent TestNG process with RI or other non-Harmony VM, and launch the tests with Harmony VM using the jvm option. The bad news is that TestNG requires j.u.c stuff even for single test execution (i.e. in any case if jvm=path to harmony). :( So if we want to run annotated tests with TestNG (even from the command line) we need j.u.c. But is j.u.c actually required to be in the runtime under test? I was thinking that j.u.c was only required for the VM actually running the harness, and all that gets run on the VM under test is the actual test method. If this was true, then we could run TestNG with the RI (which has j.u.c) and use the jvm option to specify the Harmony VM (which would not need j.u.c). Please correct me if Im wrong - I'm just trying to explore our options in the hope that we can start to move to TestNG soon. That's odd - Thread.class in luni-kernel (VME v4) definitely contains a getId() method. May be I did something wrong - I will check tomorrow. I do like them - in fact I was going to link his mail after that point but couldn't find it. Here is the link: http://mail-archives.apache.org/mod_mbox/incubator-harmony-dev/200607.mbox/[EMAIL PROTECTED] Thanks - it was good to reread. As far as I remember there was additions to the George's list like using @Test (groups={os.any} ) rather than simple @Test for API tests that run on any platform. Yes agreed, it is good to make group membership explicit as it facilitates inclusion/exclusion of groups, and makes it obvious which group tests belong to. Perhaps the same should be done for api tests, so we have a type.api group? I thought I had sent a mail out on this in the original thread, but I guess I never did (unless Thunderbird is hiding mail from me again!). We have had discussions on the list about platform specific native code organisation, and I think organisation of platform specific tests can be handled in a similar way. So we would have an os.shared (or os.any, Im just going with shared as that is what we use for the native code) group that would run on all platforms. If there are platform specific tests, they would be grouped by os, then architecture (and then possibly word size). So, for example, if we were on a Windows x86 32bit machine, the Ant scripts would run test groups os.shared, os.windows, os.windows.x86 and (if we ever get any 32/64bit specific tests) os.windows.x86.32bit, or something similar. I think this tallies with what George was suggesting, and makes sense to me. Are there any objections to this approach? Regards, Oliver I really mean that we should make sure that everyone is happy with a certain set of group names before going ahead and applying them. Once they are decided upon, they should be added to the testing conventions webpage. Yes, agree. With Best Regards, 2006/8/10, Oliver Deakin [EMAIL PROTECTED]: Alexei Zakharov wrote: We now have this, so let the TestNG debate continue :) Unfortunately, we still need java.util.concurrent :-( Yeah, TestNG 5.0 still throws java.lang.NoClassDefFoundError : java.util.concurrent.LinkedBlockingQueue on Harmony+j9v4. So perhaps the build system should be changed temporarily so that we dont self host the test harness? i.e. until we get java.util.concurrent, run Ant and the subsequent TestNG process with RI or other non-Harmony VM, and launch the tests with Harmony VM using the jvm option. At least it will allow us to move forward with TestNG (if that's what we decide) without having to wait for java.util.concurrent. Then when we have j.u.c, start self-hosting again. Comments? I've also got an error while trying to compile TestNG 5.0 tests with Harmony+j9v4+ecj: The method getId() is undefined for the type Thread That's odd - Thread.class in luni-kernel (VME v4) definitely contains a getId() method. I don't know anything about the TestNG tests - how are they run? is luni-kernel.jar definitely at the front of the bootclasspath? - If we go ahead with TestNG, we need to select a set of group names to use to indicate exclusion, platform specificness etc. Don't you like the names suggested by George? I do like them - in fact I was going to link his mail after that point but couldn't find it. I really mean that we should make sure that everyone is happy with a certain set of group names before going ahead and applying them. Once they are decided upon, they should be added to the testing conventions webpage. - Decide whether some physical separation of tests on disk is necessary, for instance to separate classpath and bootclasspath tests IMHO it is ok to separate classpath and bootclasspath tests because it will be easer to implement such solution technically. I agree, although I don't feel strongly about it. Regards,
Re: [classlib][luni] Serialization problem with EnumSet
It looks like EnumSet.SerializationProxy is the class that is serialized instead of EnumSet, since it overrides readResolve method and contains the information, essential for re-creation of EnumSet. Probably, the scheme looks like this: 1) EnumSet overrides writeReplace which returns appropriate EnumSet.SerializationProxy object, which is serialized. 2) When EnumSet.SerializationProxy is deserialized, readResolve method is called to replace deserialized instance of EnumSet.SerializationProxy with appropriate EnumSet object. This method constructs EnumSet object with one of its factory methods (noneOf suits for this, probably) and initializes it properly. See API specification for Serializable interface for the description of readResolve/writeReplace. I am not an expert in serialization, so I am not sure if we need to copy this behavior to be compatible with RI or it is possible just to use SerialVersionUID and serialized form of EnumSet.SerializationProxy for our EnumSet. On 8/14/06, Spark Shen [EMAIL PROTECTED] wrote: Hi All: After reading the serialized form of EnumSet, I found an inner class java.util.EnumSet.SerializationProxy. This class does not have any extra explaination. Does any one has any suggestion on how to deal with it? Best regards -- Spark Shen China Software Development Lab, IBM - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [classlib] [ldap] support for multiple VMs?
Alexey Varlamov wrote: 2006/8/11, Gregory Shimansky [EMAIL PROTECTED]: 2006/8/11, Tim Ellison [EMAIL PROTECTED]: Daniel Gandara wrote: Hi all, We are working on the javax.naming.ldap and we are facing the following issue when thinking about supporting multiple VMs. Following the SPEC there is a method createExtendedResponse in the StartTlsRequest class which states that the returning object must be an instance of a concrete subclass of StartTlsResponse and must have a public zero-argument constructor. The concrete subclass is determined by reading the configuration file located in META-INF/services/javax.naming.ldap.StartTlsResponse (see http://java.sun.com/j2se/1.5.0/docs/api/javax/naming/ldap/StartTlsRequest.html ) The search for this configuration file is done by looking in the classpath, java.home and user.dir; also the Xbootclasspath should be inspected, and that seems to be a problematic situation, since there is not a standard property to look for its value. Different VM implementations have different property names for the boot class path value. In the old Harmony VM implementation was com.ibm.oti.system.class.path; in the new one is org.apache.harmony.boot.class. The property name in the Sun's VM is sun.boot.class.path. We are wondering which property name to use in the code. At first sight the Harmony new VM implementation property seems to be the better option, but maybe looking for the other properties will be interesting for compatibility purposes. We would be very interested in opinions. I'd ignore the com.ibm property and look through the path defined by org.apache.harmony.boot.class.path I don't know what property is set by the DRLVM / JCHEVM / etc., but it would be good if they set the same property (maybe in addition to their current property). DRLVM sets two propeties with the same value. The one which is used by VM is vm.boot.class.path and another added for compatibility with some applications is sun.boot.class.path. It is not used inside of VM. I compared values with org.apache.harmony.boot.class.path with is set in classlib luni and foind that the only difference is with kernel.jar absent in it and present in DRLVM properties. It is logical because they both read the same bootclasspath.properties file but VM also adds kernel.jar before everything. I wonder if DRLVM starts to use the same org.apache.harmony.boot.class.pathproperty wouldn't it be overwritten with luni initialization with value wihout kernel.jar? Besides, the luni init only recognizes -Xbootclasspath: runtime parameter, but not append/prepend variants (-Xbootclasspath[/a|/p]:). Yet another argument to unify and share such code. Is there any reason to do this in classlib? Where else would you do it? As Tim mentioned earlier in this thread, we cannot do this in the launcher. Remember that the Harmony java launcher is not the only launcher that will ever run with Harmony code. If we put the bootclasspath.properties parsing code into the launcher, then that means anyone who writes their own launcher will get an empty bootclasspath unless they parse the file themselves. IMHO, I would say that: - the launcher should not too Harmony specific. Anything special we do there may well have consequences for other more generic launchers. - the bootclasspath.properties file is read by classlib because it relates to the classlib component. It is a file that is specific to the Harmony classlib, and we should not expect any other component (launcher/VM) to have knowledge of it. If bootclasspath.properties parsing is moved out of classlib, there will also be a knock-on effect for VMs that use the Harmony classlib via classlibadapter, as they will no longer get the correct bootclasspath for free. - the VM should prepend its kernel jars to the bootclasspath. They are a part of the VM half of the Harmony runtime (i.e. any other VM provider would have to provide them in its VM bundle, as the IBM VME does), and thus should be handled by the VM itself. At the moment the kernel jars are called luni-kernel.jar and security-kernel.jar, but there is nothing to stop another VM wanting to call them something different and still use Harmony classlib. If the addition of the kernel jars to the bootclasspath was done in classlib, then only the hardcoded names would be valid. I think this adds another contract between the classlib and VM that is unnecessary. All classlib should expect is that the VM will provide those classes at runtime. I think that what really needs to be done is to improve the code that is already, IMO, in the right place, rather than move it elsewhere. Regards, Oliver -- Alexey If you want the code to run on the Sun implementation too then you should *also* search the sun.boot.class.path, and of course be tolerant of o.a.harmony... or sun.boot... being absent. Is running on Sun a goal for you? It's not
Re: [tools] Re: Keytool is done, JarSigner is next.
Mikhail Loenko wrote: Ok, sure. One thing that IMHO worth discussion is: By default the server tries to go to Sun's ssl provider: com.sun.net.ssl.internal.ssl.Provider Though it seems to be possibe to specify a custom provider by defining a property org.w3c.jigsaw.ssl.security.provider But to figure that out I had to grep Jigsaw sources Hm. What does jetty and tomcat do? The question is should we provide our own com.sun...Provider? You probably can guess my answer to this... It would look like this way: package com.sun.net.ssl.internal.ssl; import org.apache.harmony.xnet.provider.jsse.JSSEProvider; public class Provider extends JSSEProvider { } Thanks, Mikhail P.S. I was able to easily start Jigsaw HTTP server and navigate a bit. I used IBM VM+Harmony classlib What happens when you used DRLVM? geir 2006/8/14, Geir Magnusson Jr [EMAIL PROTECTED]: Side note : Can you keep notes so that when you get things working, we can post to website as docs? geir Mikhail Loenko wrote: Hi Anton, I'm trying to run Jigsaw https server. I used Harmony keytool to generate keystore according to Jigsaw mans: keytool -genkey -alias troi.example.com -keypass example -keystore troi.keystore -keyalg RSA so far works OK keytool -selfcert -alias troi.example.com -keystore troi.keystore -keyalg RSA prints this error message: Enter keystore password: example java.security.NoSuchAlgorithmException: The algorithm MD5WithRSAEncryption is not found in the environment. at org.apache.harmony.tools.keytool.KeyCertGenerator.genX509CertImpl(Key CertGenerator.java:40) at org.apache.harmony.tools.keytool.KeyCertGenerator.selfCert(KeyCertGen erator.java:335) at org.apache.harmony.tools.keytool.Main.doWork(Main.java:78) at org.apache.harmony.tools.keytool.Main.run(Main.java:125) at org.apache.harmony.tools.keytool.Main.main(Main.java:141) Any idea how to solve this? Do we miss some functionality in Harmony? Thanks, Mikhail 2006/8/11, Geir Magnusson Jr [EMAIL PROTECTED]: 1) YAY! 2) No objections for jarsigner, but rather thanks and encouragement! 3) You may have been doing the following and I simply missed it, but I'd suggest that you keep a stream of patches coming on things like this so that people can see and get involved and also discuss more of your experience doing this on the list as it happens. 4) Can you add [tools] to your subject lines? :) geir Anton Rusanov wrote: I'm happy to write this - Keytool is done and operative now. :) It has the same functionality as the one from RI with some improvements. In addition to what RI can do the Harmony Keytool is able to * generate X.509 certificates v2, v3. * sign a certificate with another key from the keystore * generate and manage secret keys * convert a keystore to another format * check certificate revocation status * verify a certificate chain * use specific providers for various purposes. There is still a little problem with making an executable of the tool in the build. So you can follow the steps to make it on your own: 1. copy deploy\jdk\jre\bin\java.exe to deploy\jdk\jre\bin\keytool.exe 2. copy deploy\jdk\lib\tools.jar into deploy\jdk\jre\bin\ 3. run keytool.exe I want to thank Mikhail for applying my patches. I'm going to start work on JarSigner tool. Does anyone have objections to me doing this? - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [general] compatibility packages
Alex Blewitt wrote: On 14/08/06, Geir Magnusson Jr [EMAIL PROTECTED] wrote: 3) Clearly there's value in providing these [sun.* classes], as other implementations (BEA, IBM, Apple) include them. Possibly true, but for different reasons. They license the source code bulk from Sun, not re-implement their own. (They have patches etc. that sit on top of them, of course.) As a result, there's a bunch of internal stuff that is exactly the same as Sun's, and so depends on the sun.* classes. Depending on their license choice, we'll be able to do that soon :) If they'd just hurry up... The value (to them) is that they don't have to spend time re-writing the sun.* classes instead of something else. There's no value necessarily to the end user; it's a selfish decision on their part, nothing more. I agree with sentence 1 and 3 above, with s/selfish/pragmatic applied to 3. I'd also bet that IBM wouldn't do it if they could avoid it - I can't imagine they would ship sun.* unless there was customer demand. geir - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [jira] Created: (HARMONY-1113) [classlib][beans]Harmony does not throw IllegalArgumentException for java.beans.PropertyEditorSupport.setAsText() while RI does.
BTW, don't forget to grant license to ASF. Thanks, Stepan. On 8/14/06, Mikhail Loenko wrote: Hi Ilya Is it significant that the test code is in bootclasspath, or it can work from classpath? There were some discussions around the tests that might be interesting, please look at [1]. Please look at the section Utilize JUnit's assert/fail methods and exception handling for clean test code This also might be useful [2] Thanks, Mikhail [1] http://mail-archives.apache.org/mod_mbox/incubator-harmony-dev/200603.mbox/[EMAIL PROTECTED] [2] http://incubator.apache.org/harmony/subcomponents/classlibrary/agreements.html 2006/8/9, Ilya Okomin (JIRA) [EMAIL PROTECTED]: [classlib][beans]Harmony does not throw IllegalArgumentException for java.beans.PropertyEditorSupport.setAsText() while RI does. Key: HARMONY-1113 URL: http://issues.apache.org/jira/browse/HARMONY-1113 Project: Harmony Issue Type: Bug Components: Classlib Reporter: Ilya Okomin Priority: Minor Attachments: PropertyEditorSupport.patch, PropertyEditorSupportTest.patch Harmony does not throw IllegalArgumentException for java.beans.PropertyEditorSupport.setAsText(String) when parameter is invalid while RI throws IllegalArgumentException. Java 1.5.0 spec says:May raise java.lang.IllegalArgumentException if either the String is badly formatted or if this kind of property can't be expressed as text. =test.java== import java.beans.PropertyEditorSupport; public class test { public static void main(String args[]) { PropertyEditorSupport undefPropertyEditorSupport = new PropertyEditorSupport(); try { System.err.print(value is null: ); undefPropertyEditorSupport.setAsText(string); System.err.println(failed: IllegalArgumentException expected, but nothing was thrown!\n); } catch (IllegalArgumentException eE) { System.err.println(success!); eE.printStackTrace(); } PropertyEditorSupport defPropertyEditorSupport = new PropertyEditorSupport(); try { defPropertyEditorSupport.setValue(new Object()); System.err.print(value is Object: ); defPropertyEditorSupport.setAsText(string); System.err.println(failed: IllegalArgumentException expected, but nothing was thrown!\n); } catch (IllegalArgumentException eE) { System.err.println(success!); eE.printStackTrace(); } defPropertyEditorSupport = new PropertyEditorSupport(); try { defPropertyEditorSupport.setValue(new String()); System.err.print(value is String: ); defPropertyEditorSupport.setAsText(string); System.err.println(success!); } catch (IllegalArgumentException eE) { System.err.println(failed!); eE.printStackTrace(); } } } === Output: Harmony: java version 1.5.0 pre-alpha : not complete or compatible svn = r424571, (Jul 22 2006), Windows/ia32/msvc 1310, release build http://incubator.apache.org/harmony value is null: failed: IllegalArgumentException expected, but nothing was thrown! value is Object: failed: IllegalArgumentException expected, but nothing was thrown! value is String: success! RI: java version 1.5.0 Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64) BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC: System optimized over throughput (initial strategy singleparpar)) value is null: success! java.lang.IllegalArgumentException: string at java.beans.PropertyEditorSupport.setAsText(PropertyEditorSupport.java :166) at bugzilla.Test9433.main(Test9433.java:11) value is Object: success! java.lang.IllegalArgumentException: string at java.beans.PropertyEditorSupport.setAsText(PropertyEditorSupport.java :166) at bugzilla.Test9433.main(Test9433.java:23) value is String: success! For this reason, suggested solution is to check in setAsText() method if the value is instanse of String, in case of true - setValue, otherwise - throw an IAE following the spec, ...this kind of property can't be expressed as text. Suggested patch and regression test can be found in the attach -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail:
Re: svn commit: r431219 - in /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test: api/ impl/ java/org/apache/harmony/luni/tests/java/lang/
Hi Nathan, I saw that you've changed tests layout (consolidated) tests in luni module. But I don't understand what the purpose for the change. Is this a first step for migrating to TestNG? (May be I missed something important - sorry for stupid question then.) BTW did we agree on that we won't follow directory-based tests layout [1]? IMHO, not yet. IIRC we agreed that directory-based tests layout is not quite convenient for our needs and we'll try TestNG. But for me it doesn't mean that we'll migrate to TestNG for sure. Also I assume that mixed approach (directory-based layout + annotations) is possible. So it is not time for doing massive tests moves and merges. And the minor comment to the commit log. It says: remove unused folders. But there are a lot of other unrelated changes. Was it possible to make separate commits? Thanks, Stepan. [1] http://incubator.apache.org/harmony/subcomponents/classlibrary/testing.html -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, August 14, 2006 2:56 AM To: [EMAIL PROTECTED] Subject: svn commit: r431219 - in /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test: api/ impl/ java/org/apache/harmony/luni/tests/java/lang/ Author: ndbeyer Date: Sun Aug 13 12:55:54 2006 New Revision: 431219 URL: http://svn.apache.org/viewvc?rev=431219view=rev Log: remove unused folders Removed: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/impl/ Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/DoubleTest.java incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/SecurityManagerTest.java incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/ThreadGroupTest.java Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/DoubleTest.java URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/DoubleTest.java?rev=431219r1=431218r2=431219view=diff == --- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/DoubleTest.java (original) +++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/DoubleTest.java Sun Aug 13 12:55:54 2006 @@ -441,7 +441,7 @@ */ public void test_parseDoubleLjava_lang_String() { assertEquals(Incorrect double returned, expected zero., 0.0, Double -.parseDouble(2.4703282292062327208828439643411e-324)); +.parseDouble(2.4703282292062327208828439643411e-324), 0.0 ); assertTrue(Incorrect double returned, expected minimum double., Double .parseDouble(2.4703282292062327208828439643412e-324) == Double.MIN_VALUE); Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/SecurityManagerTest.java SNIP -- Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [testing] metadata approach
Hi Oliver, But is j.u.c actually required to be in the runtime under test? I was thinking that j.u.c was only required for the VM actually running the harness, and all that gets run on the VM under test is the actual test method. If this was true, then we could run TestNG with the RI (which has j.u.c) and use the jvm option to specify the Harmony VM (which would not need j.u.c). I afraid we cannot do like that. At least I was not successful last time I tried to run tests using the jvm=harmony option. As far as I understand TestNG requires j.u.c for running every single test method because parallel running can be specified on the method level. I mean in TestNG you can write something like this: @Test(threadPoolSize = 7, invocationCount = 29) This means that this method should be invoked from different threads. And it seems that TestNG needs j.u.c to implement multithreading. Yes agreed, it is good to make group membership explicit as it facilitates inclusion/exclusion of groups, and makes it obvious which group tests belong to. Perhaps the same should be done for api tests, so we have a type.api group? So you suggest to add @Test (groups={os.any, type.api}) to every api test (that runs on every platform) without any defaults at all? I thought I had sent a mail out on this in the original thread, but I guess I never did (unless Thunderbird is hiding mail from me again!). Just checked - there is no such mail in my gmail box, at least in the [classlib] Testing conventions - a proposal thread. So, for example, if we were on a Windows x86 32bit machine, the Ant scripts would run test groups os.shared, os.windows, os.windows.x86 and (if we ever get any 32/64bit specific tests) os.windows.x86.32bit, or something similar. Well, I like it in general. The only thing I still feel uncomfortable with is os.shared. When some code is shared among different platforms it makes sense. But here we have a test shared by several OSes. Does this sound natural? But I don't feel strongly about that and will not object if everybody likes this. With Best Regards, 2006/8/14, Oliver Deakin [EMAIL PROTECTED]: Alexei Zakharov wrote: Hi Oliver, So perhaps the build system should be changed temporarily so that we dont self host the test harness? i.e. until we get java.util.concurrent, run Ant and the subsequent TestNG process with RI or other non-Harmony VM, and launch the tests with Harmony VM using the jvm option. The bad news is that TestNG requires j.u.c stuff even for single test execution (i.e. in any case if jvm=path to harmony). :( So if we want to run annotated tests with TestNG (even from the command line) we need j.u.c. But is j.u.c actually required to be in the runtime under test? I was thinking that j.u.c was only required for the VM actually running the harness, and all that gets run on the VM under test is the actual test method. If this was true, then we could run TestNG with the RI (which has j.u.c) and use the jvm option to specify the Harmony VM (which would not need j.u.c). Please correct me if Im wrong - I'm just trying to explore our options in the hope that we can start to move to TestNG soon. That's odd - Thread.class in luni-kernel (VME v4) definitely contains a getId() method. May be I did something wrong - I will check tomorrow. I do like them - in fact I was going to link his mail after that point but couldn't find it. Here is the link: http://mail-archives.apache.org/mod_mbox/incubator-harmony-dev/200607.mbox/[EMAIL PROTECTED] Thanks - it was good to reread. As far as I remember there was additions to the George's list like using @Test (groups={os.any} ) rather than simple @Test for API tests that run on any platform. Yes agreed, it is good to make group membership explicit as it facilitates inclusion/exclusion of groups, and makes it obvious which group tests belong to. Perhaps the same should be done for api tests, so we have a type.api group? I thought I had sent a mail out on this in the original thread, but I guess I never did (unless Thunderbird is hiding mail from me again!). We have had discussions on the list about platform specific native code organisation, and I think organisation of platform specific tests can be handled in a similar way. So we would have an os.shared (or os.any, Im just going with shared as that is what we use for the native code) group that would run on all platforms. If there are platform specific tests, they would be grouped by os, then architecture (and then possibly word size). So, for example, if we were on a Windows x86 32bit machine, the Ant scripts would run test groups os.shared, os.windows, os.windows.x86 and (if we ever get any 32/64bit specific tests) os.windows.x86.32bit, or something similar. I think this tallies with what George was suggesting, and makes sense to me. Are there any objections to this approach? Regards, Oliver I really mean that we should make sure that everyone is happy with a certain
Re: [general] compatibility packages
Hello, There's another issues on compatibility: some applications rely on the existence of JAVA_ROOT/lib/rt.jar - the example is [1]. Some require tools.jar [2]. Harmony doesn't have these jars now so applications can fail on it just because they're bound to the implementation specifics. [1] http://koders.com/java/fid94A9F615DBE6674BB9423D1DF67C8256605B5C24.aspx?s=rt.jar [2] http://koders.com/java/fidDE45C5B81C71D554A7E680A0E64FC1D564BA830A.aspx?s=tools.jar -- Regards, Anton Luht, Intel Middleware Products Division - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [jira] Created: (HARMONY-1113) [classlib][beans]Harmony does not throw IllegalArgumentException for java.beans.PropertyEditorSupport.setAsText() while RI does.
Hello, Mikhail! Provided test case can work from classpath of course. It's my mistake, thanks for noticed it. I'll prepare updated test case' patch with correct packaging and taking into account exceptions handling recommendation ASAP. Thanks, Ilya. On 8/14/06, Mikhail Loenko [EMAIL PROTECTED] wrote: Hi Ilya Is it significant that the test code is in bootclasspath, or it can work from classpath? There were some discussions around the tests that might be interesting, please look at [1]. Please look at the section Utilize JUnit's assert/fail methods and exception handling for clean test code This also might be useful [2] Thanks, Mikhail [1] http://mail-archives.apache.org/mod_mbox/incubator-harmony-dev/200603.mbox/[EMAIL PROTECTED] [2] http://incubator.apache.org/harmony/subcomponents/classlibrary/agreements.html 2006/8/9, Ilya Okomin (JIRA) [EMAIL PROTECTED]: [classlib][beans]Harmony does not throw IllegalArgumentException for java.beans.PropertyEditorSupport.setAsText() while RI does. Key: HARMONY-1113 URL: http://issues.apache.org/jira/browse/HARMONY-1113 Project: Harmony Issue Type: Bug Components: Classlib Reporter: Ilya Okomin Priority: Minor Attachments: PropertyEditorSupport.patch, PropertyEditorSupportTest.patch Harmony does not throw IllegalArgumentException for java.beans.PropertyEditorSupport.setAsText(String) when parameter is invalid while RI throws IllegalArgumentException. Java 1.5.0 spec says:May raise java.lang.IllegalArgumentException if either the String is badly formatted or if this kind of property can't be expressed as text. =test.java== import java.beans.PropertyEditorSupport; public class test { public static void main(String args[]) { PropertyEditorSupport undefPropertyEditorSupport = new PropertyEditorSupport(); try { System.err.print(value is null: ); undefPropertyEditorSupport.setAsText(string); System.err.println(failed: IllegalArgumentException expected, but nothing was thrown!\n); } catch (IllegalArgumentException eE) { System.err.println(success!); eE.printStackTrace(); } PropertyEditorSupport defPropertyEditorSupport = new PropertyEditorSupport(); try { defPropertyEditorSupport.setValue(new Object()); System.err.print(value is Object: ); defPropertyEditorSupport.setAsText(string); System.err.println(failed: IllegalArgumentException expected, but nothing was thrown!\n); } catch (IllegalArgumentException eE) { System.err.println(success!); eE.printStackTrace(); } defPropertyEditorSupport = new PropertyEditorSupport(); try { defPropertyEditorSupport.setValue(new String()); System.err.print(value is String: ); defPropertyEditorSupport.setAsText(string); System.err.println(success!); } catch (IllegalArgumentException eE) { System.err.println(failed!); eE.printStackTrace(); } } } === Output: Harmony: java version 1.5.0 pre-alpha : not complete or compatible svn = r424571, (Jul 22 2006), Windows/ia32/msvc 1310, release build http://incubator.apache.org/harmony value is null: failed: IllegalArgumentException expected, but nothing was thrown! value is Object: failed: IllegalArgumentException expected, but nothing was thrown! value is String: success! RI: java version 1.5.0 Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64) BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC: System optimized over throughput (initial strategy singleparpar)) value is null: success! java.lang.IllegalArgumentException: string at java.beans.PropertyEditorSupport.setAsText(PropertyEditorSupport.java :166) at bugzilla.Test9433.main(Test9433.java:11) value is Object: success! java.lang.IllegalArgumentException: string at java.beans.PropertyEditorSupport.setAsText(PropertyEditorSupport.java :166) at bugzilla.Test9433.main(Test9433.java:23) value is String: success! For this reason, suggested solution is to check in setAsText() method if the value is instanse of String, in case of true - setValue, otherwise - throw an IAE following the spec, ...this kind of property can't be expressed as text. Suggested patch and regression test can be found in the attach -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on
Re: svn commit: r431219 - in /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test: api/ impl/ java/org/apache/harmony/luni/tests/java/lang/
I haven't been following the test discussion too closely, but please don't make it so that only tooling can tell us what is what... geir Stepan Mishura wrote: Hi Nathan, I saw that you've changed tests layout (consolidated) tests in luni module. But I don't understand what the purpose for the change. Is this a first step for migrating to TestNG? (May be I missed something important - sorry for stupid question then.) BTW did we agree on that we won't follow directory-based tests layout [1]? IMHO, not yet. IIRC we agreed that directory-based tests layout is not quite convenient for our needs and we'll try TestNG. But for me it doesn't mean that we'll migrate to TestNG for sure. Also I assume that mixed approach (directory-based layout + annotations) is possible. So it is not time for doing massive tests moves and merges. And the minor comment to the commit log. It says: remove unused folders. But there are a lot of other unrelated changes. Was it possible to make separate commits? Thanks, Stepan. [1] http://incubator.apache.org/harmony/subcomponents/classlibrary/testing.html -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, August 14, 2006 2:56 AM To: [EMAIL PROTECTED] Subject: svn commit: r431219 - in /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test: api/ impl/ java/org/apache/harmony/luni/tests/java/lang/ Author: ndbeyer Date: Sun Aug 13 12:55:54 2006 New Revision: 431219 URL: http://svn.apache.org/viewvc?rev=431219view=rev Log: remove unused folders Removed: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/impl/ Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/DoubleTest.java incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/SecurityManagerTest.java incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/ThreadGroupTest.java Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/DoubleTest.java URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/DoubleTest.java?rev=431219r1=431218r2=431219view=diff == --- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/DoubleTest.java (original) +++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/DoubleTest.java Sun Aug 13 12:55:54 2006 @@ -441,7 +441,7 @@ */ public void test_parseDoubleLjava_lang_String() { assertEquals(Incorrect double returned, expected zero., 0.0, Double -.parseDouble(2.4703282292062327208828439643411e-324)); +.parseDouble(2.4703282292062327208828439643411e-324), 0.0 ); assertTrue(Incorrect double returned, expected minimum double., Double .parseDouble(2.4703282292062327208828439643412e-324) == Double.MIN_VALUE); Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/SecurityManagerTest.java SNIP -- Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [jira] Created: (HARMONY-1113) [classlib][beans]Harmony does not throw IllegalArgumentException for java.beans.PropertyEditorSupport.setAsText() while RI does.
Hi Ilya, FYI there is the existing class org.apache.harmony.beans.tests.java.beans.PropertyEditorSupportTest that contains all tests for PropertyEditorSupport. IMHO it would be better if you embed your tests into this class. BTW, you may also take a look at existent testSetAsText method since it seems it does the same job. Regards, Alexei P.S. thanks for the patch :) 2006/8/14, Ilya Okomin [EMAIL PROTECTED]: Hello, Mikhail! Provided test case can work from classpath of course. It's my mistake, thanks for noticed it. I'll prepare updated test case' patch with correct packaging and taking into account exceptions handling recommendation ASAP. Thanks, Ilya. On 8/14/06, Mikhail Loenko [EMAIL PROTECTED] wrote: Hi Ilya Is it significant that the test code is in bootclasspath, or it can work from classpath? There were some discussions around the tests that might be interesting, please look at [1]. Please look at the section Utilize JUnit's assert/fail methods and exception handling for clean test code This also might be useful [2] Thanks, Mikhail [1] http://mail-archives.apache.org/mod_mbox/incubator-harmony-dev/200603.mbox/[EMAIL PROTECTED] [2] http://incubator.apache.org/harmony/subcomponents/classlibrary/agreements.html 2006/8/9, Ilya Okomin (JIRA) [EMAIL PROTECTED]: [classlib][beans]Harmony does not throw IllegalArgumentException for java.beans.PropertyEditorSupport.setAsText() while RI does. Key: HARMONY-1113 URL: http://issues.apache.org/jira/browse/HARMONY-1113 Project: Harmony Issue Type: Bug Components: Classlib Reporter: Ilya Okomin Priority: Minor Attachments: PropertyEditorSupport.patch, PropertyEditorSupportTest.patch Harmony does not throw IllegalArgumentException for java.beans.PropertyEditorSupport.setAsText(String) when parameter is invalid while RI throws IllegalArgumentException. Java 1.5.0 spec says:May raise java.lang.IllegalArgumentException if either the String is badly formatted or if this kind of property can't be expressed as text. =test.java== import java.beans.PropertyEditorSupport; public class test { public static void main(String args[]) { PropertyEditorSupport undefPropertyEditorSupport = new PropertyEditorSupport(); try { System.err.print(value is null: ); undefPropertyEditorSupport.setAsText(string); System.err.println(failed: IllegalArgumentException expected, but nothing was thrown!\n); } catch (IllegalArgumentException eE) { System.err.println(success!); eE.printStackTrace(); } PropertyEditorSupport defPropertyEditorSupport = new PropertyEditorSupport(); try { defPropertyEditorSupport.setValue(new Object()); System.err.print(value is Object: ); defPropertyEditorSupport.setAsText(string); System.err.println(failed: IllegalArgumentException expected, but nothing was thrown!\n); } catch (IllegalArgumentException eE) { System.err.println(success!); eE.printStackTrace(); } defPropertyEditorSupport = new PropertyEditorSupport(); try { defPropertyEditorSupport.setValue(new String()); System.err.print(value is String: ); defPropertyEditorSupport.setAsText(string); System.err.println(success!); } catch (IllegalArgumentException eE) { System.err.println(failed!); eE.printStackTrace(); } } } === Output: Harmony: java version 1.5.0 pre-alpha : not complete or compatible svn = r424571, (Jul 22 2006), Windows/ia32/msvc 1310, release build http://incubator.apache.org/harmony value is null: failed: IllegalArgumentException expected, but nothing was thrown! value is Object: failed: IllegalArgumentException expected, but nothing was thrown! value is String: success! RI: java version 1.5.0 Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64) BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC: System optimized over throughput (initial strategy singleparpar)) value is null: success! java.lang.IllegalArgumentException: string at java.beans.PropertyEditorSupport.setAsText(PropertyEditorSupport.java :166) at bugzilla.Test9433.main(Test9433.java:11) value is Object: success! java.lang.IllegalArgumentException: string at java.beans.PropertyEditorSupport.setAsText(PropertyEditorSupport.java :166) at bugzilla.Test9433.main(Test9433.java:23)
Re: svn commit: r431219 - in /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test: api/ impl/ java/org/apache/harmony/luni/tests/java/lang/
Our current builds does not allow to run TestNG 5.0 yet. And AFAIK we have not finished the discussion about directory based approach vs metadata based approach. With Best Regards, 2006/8/14, Geir Magnusson Jr [EMAIL PROTECTED]: I haven't been following the test discussion too closely, but please don't make it so that only tooling can tell us what is what... geir Stepan Mishura wrote: Hi Nathan, I saw that you've changed tests layout (consolidated) tests in luni module. But I don't understand what the purpose for the change. Is this a first step for migrating to TestNG? (May be I missed something important - sorry for stupid question then.) BTW did we agree on that we won't follow directory-based tests layout [1]? IMHO, not yet. IIRC we agreed that directory-based tests layout is not quite convenient for our needs and we'll try TestNG. But for me it doesn't mean that we'll migrate to TestNG for sure. Also I assume that mixed approach (directory-based layout + annotations) is possible. So it is not time for doing massive tests moves and merges. And the minor comment to the commit log. It says: remove unused folders. But there are a lot of other unrelated changes. Was it possible to make separate commits? Thanks, Stepan. [1] http://incubator.apache.org/harmony/subcomponents/classlibrary/testing.html -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, August 14, 2006 2:56 AM To: [EMAIL PROTECTED] Subject: svn commit: r431219 - in /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test: api/ impl/ java/org/apache/harmony/luni/tests/java/lang/ Author: ndbeyer Date: Sun Aug 13 12:55:54 2006 New Revision: 431219 URL: http://svn.apache.org/viewvc?rev=431219view=rev Log: remove unused folders Removed: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/impl/ Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/DoubleTest.java incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/SecurityManagerTest.java incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/ThreadGroupTest.java Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/DoubleTest.java URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/DoubleTest.java?rev=431219r1=431218r2=431219view=diff == --- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/DoubleTest.java (original) +++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/DoubleTest.java Sun Aug 13 12:55:54 2006 @@ -441,7 +441,7 @@ */ public void test_parseDoubleLjava_lang_String() { assertEquals(Incorrect double returned, expected zero., 0.0, Double -.parseDouble(2.4703282292062327208828439643411e-324)); +.parseDouble(2.4703282292062327208828439643411e-324), 0.0 ); assertTrue(Incorrect double returned, expected minimum double., Double .parseDouble(2.4703282292062327208828439643412e-324) == Double.MIN_VALUE); Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/SecurityManagerTest.java SNIP -- Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Alexei Zakharov, Intel Middleware Product Division - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [classlib][instrument]Method to terminate VM.
The JVM spec lists a number of abnormal conditions that may occur like this. You might look in the JVM spec in section 5, Loading, Linking, and Initializing, for detailed information about how a JVM is supposed to handle these conditions. Most of them should already be built in to every JVM, but if you need something special, doing it like the JVM is definitely the best way to proceed. Dan Lydick [Original Message] From: Leo Li [EMAIL PROTECTED] To: harmony-dev@incubator.apache.org Date: 8/9/06 9:53:24 PM Subject: [classlib][instrument]Method to terminate VM. Hi, all During the implementaion of instrument, I encounter the choice about how to terminate the VM when some abnormal event occurs, for example, the expected jar file does not exist or the implementation class of Instrumentation cannot be found. The most simple and direct way is just to call exit(), and then the whole process will terminate. Hence OS will treat with all the release of resources. However, I propose to use FatalError of JNI instead, which notifies the VM to suicide, because it gives right to the implementation of VM to take charge of its own funeral affairs, which might include, for example, logging the cause of its crash. Any suggestion from VM guys? Thanks :) -- Leo Li China Software Development Lab, IBM - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: svn commit: r431219 - in /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test: api/ impl/ java/org/apache/harmony/luni/tests/java/lang/
FYI these topics are currently being discussed here [1] [1] http://mail-archives.apache.org/mod_mbox/incubator-harmony-dev/200608.mbox/[EMAIL PROTECTED] With Best Regards, 2006/8/14, Alexei Zakharov [EMAIL PROTECTED]: Our current builds does not allow to run TestNG 5.0 yet. And AFAIK we have not finished the discussion about directory based approach vs metadata based approach. With Best Regards, 2006/8/14, Geir Magnusson Jr [EMAIL PROTECTED]: I haven't been following the test discussion too closely, but please don't make it so that only tooling can tell us what is what... geir Stepan Mishura wrote: Hi Nathan, I saw that you've changed tests layout (consolidated) tests in luni module. But I don't understand what the purpose for the change. Is this a first step for migrating to TestNG? (May be I missed something important - sorry for stupid question then.) BTW did we agree on that we won't follow directory-based tests layout [1]? IMHO, not yet. IIRC we agreed that directory-based tests layout is not quite convenient for our needs and we'll try TestNG. But for me it doesn't mean that we'll migrate to TestNG for sure. Also I assume that mixed approach (directory-based layout + annotations) is possible. So it is not time for doing massive tests moves and merges. And the minor comment to the commit log. It says: remove unused folders. But there are a lot of other unrelated changes. Was it possible to make separate commits? Thanks, Stepan. [1] http://incubator.apache.org/harmony/subcomponents/classlibrary/testing.html -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, August 14, 2006 2:56 AM To: [EMAIL PROTECTED] Subject: svn commit: r431219 - in /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test: api/ impl/ java/org/apache/harmony/luni/tests/java/lang/ Author: ndbeyer Date: Sun Aug 13 12:55:54 2006 New Revision: 431219 URL: http://svn.apache.org/viewvc?rev=431219view=rev Log: remove unused folders Removed: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/impl/ Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/DoubleTest.java incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/SecurityManagerTest.java incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/ThreadGroupTest.java Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/DoubleTest.java URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/DoubleTest.java?rev=431219r1=431218r2=431219view=diff == --- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/DoubleTest.java (original) +++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/DoubleTest.java Sun Aug 13 12:55:54 2006 @@ -441,7 +441,7 @@ */ public void test_parseDoubleLjava_lang_String() { assertEquals(Incorrect double returned, expected zero., 0.0, Double -.parseDouble(2.4703282292062327208828439643411e-324)); +.parseDouble(2.4703282292062327208828439643411e-324), 0.0 ); assertTrue(Incorrect double returned, expected minimum double., Double .parseDouble(2.4703282292062327208828439643412e-324) == Double.MIN_VALUE); Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/SecurityManagerTest.java SNIP -- Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Alexei Zakharov, Intel Middleware Product Division -- Alexei Zakharov, Intel Middleware Product Division - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [jira] Created: (HARMONY-1175) [classlib][io] BufferedWriter.write() exception behavior differ from RI
2006/8/14, Denis Kishenko (JIRA) [EMAIL PROTECTED]: [classlib][io] BufferedWriter.write() exception behavior differ from RI --- Key: HARMONY-1175 URL: http://issues.apache.org/jira/browse/HARMONY-1175 Project: Harmony Issue Type: Bug Components: Classlib Reporter: Denis Kishenko 1. Harmony implementation of BufferedWriter.write(String, int, int) throws an exception if len is negative while spec says (and RI follows it) public void write(String s, int off, int len) throws IOExceptionWrite a portion of a String. If the value of the len parameter is negative then no characters are written. This is contrary to the specification of this method in the superclass, which requires that an IndexOutOfBoundsException be thrown. 2. Harmony implementation of BufferedWriter.write(char[], int, int) throws ArrayIndexOutOfBoundsException while RI throws IndexOutOfBoundsException. I think that this is not a problem since ArrayIndexOutOfBoundsException is a subclass of IndexOutOfBoundsException... SY, Alexey === Test === import java.io.*; public class bug9588 { static void test(String name, Object buf, int offset, int count) { try { System.err.println(name); ByteArrayOutputStream baos = new ByteArrayOutputStream(200); OutputStreamWriter osw = new OutputStreamWriter(baos); BufferedWriter bw = new BufferedWriter((Writer)osw); if (buf instanceof String) { bw.write((String)buf, offset, count); } else { bw.write((char[])buf, offset, count); } bw.flush(); System.err.println(Number of written chars: +(baos.toByteArray()).length); } catch (Exception e) { e.printStackTrace(); } } public static void main (String [] args) throws Exception { String str = abcde; char[] ch = new char[] {'a', 'b', 'c', 'd', 'e'}; test(1, str, 1, -1); test(2, str, -1, 1); test(3, str, -1, -1); test(4, str, 7, 1); test(5, str, 3, 4); test(6, ch, 1, -1); test(7, ch, -1, 1); test(8, ch, -1, -1); test(9, ch, 7, 1); test(10, ch, 3, 4); } } === Output == RI 1 Number of written chars: 0 2 java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.getChars(II[CI)V(Unknown Source) at java.io.BufferedWriter.write(BufferedWriter.java:208) at bug9588.test(bug9588.java:12) at bug9588.main(bug9588.java:27) 3 Number of written chars: 0 4 java.lang.StringIndexOutOfBoundsException: String index out of range: 8 at java.lang.String.getChars(II[CI)V(Unknown Source) at java.io.BufferedWriter.write(BufferedWriter.java:208) at bug9588.test(bug9588.java:12) at bug9588.main(bug9588.java:29) 5 java.lang.StringIndexOutOfBoundsException: String index out of range: 7 at java.lang.String.getChars(II[CI)V(Unknown Source) at java.io.BufferedWriter.write(BufferedWriter.java:208) at bug9588.test(bug9588.java:12) at bug9588.main(bug9588.java:30) 6 java.lang.IndexOutOfBoundsException at java.io.BufferedWriter.write(BufferedWriter.java:160) at bug9588.test(bug9588.java:14) at bug9588.main(bug9588.java:31) 7 java.lang.IndexOutOfBoundsException at java.io.BufferedWriter.write(BufferedWriter.java:160) at bug9588.test(bug9588.java:14) at bug9588.main(bug9588.java:32) 8 java.lang.IndexOutOfBoundsException at java.io.BufferedWriter.write(BufferedWriter.java:160) at bug9588.test(bug9588.java:14) at bug9588.main(bug9588.java:33) 9 java.lang.IndexOutOfBoundsException at java.io.BufferedWriter.write(BufferedWriter.java:160) at bug9588.test(bug9588.java:14) at bug9588.main(bug9588.java:34) 10 java.lang.IndexOutOfBoundsException at java.io.BufferedWriter.write(BufferedWriter.java:160) at bug9588.test(bug9588.java:14) at bug9588.main(bug9588.java:35) Harmony 1 java.lang.StringIndexOutOfBoundsException at java.io.BufferedWriter.write(BufferedWriter.java:291) at bug9588.test(bug9588.java:12) at bug9588.main(bug9588.java:26) 2 java.lang.StringIndexOutOfBoundsException at java.io.BufferedWriter.write(BufferedWriter.java:291) at bug9588.test(bug9588.java:12) at bug9588.main(bug9588.java:27) 3 java.lang.StringIndexOutOfBoundsException at java.io.BufferedWriter.write(BufferedWriter.java:291) at bug9588.test(bug9588.java:12) at bug9588.main(bug9588.java:28) 4 java.lang.StringIndexOutOfBoundsException at java.io.BufferedWriter.write(BufferedWriter.java:291) at bug9588.test(bug9588.java:12) at bug9588.main(bug9588.java:29) 5 java.lang.StringIndexOutOfBoundsException at java.io.BufferedWriter.write(BufferedWriter.java:291) at bug9588.test(bug9588.java:12)
Users mailing list?
So, ehm, * website in quie reasonably shape * wiki sort-of being maintained * brilliant response time on filed jira issues * some snapshots/downloads available * high-traffic developer list and I saw a few comments recently about having a use for more user feedback / people testing things / etc. Maybe this is the right time to start a users list? This does require that there's some people looking out for unanswered e-mails, unanswered jira issues, and in general taking some time to talk to people (eg, active developers should read the user mailing lists and contribute!). But I'm guessing there's quite a few people around here willing to do just that. WDYT? LSD, mac user, so not harmony user yet - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [jira] Created: (HARMONY-1113) [classlib][beans]Harmony does not throw IllegalArgumentException for java.beans.PropertyEditorSupport.setAsText() while RI does.
Ilya, Thus test_setAsTextNull is redundant but other two test cases have to be added. This is exactly what I mean. BTW, If you have more patches (or free time) for java.beans you are highly welcome. I have already tired from working on this package alone. :) Regards, 2006/8/14, Ilya Okomin [EMAIL PROTECTED]: On 8/14/06, Alexei Zakharov [EMAIL PROTECTED] wrote: Hi Ilya, FYI there is the existing class org.apache.harmony.beans.tests.java.beans.PropertyEditorSupportTest that contains all tests for PropertyEditorSupport. IMHO it would be better if you embed your tests into this class. BTW, you may also take a look at existent testSetAsText method since it seems it does the same job. Thanks for suggested solution, I've already done it before read your message :-) Hmmm..you right, existing one test testSetAsText is the same as test_setAsTextNull. Actually existing testSetAsText test doesn't cover the problem, according to the documentation setAsText method behavior depends on the object state (rather newValue field type), thus we have to take into account the type of the newValue before setAsText call, if it is instanse of String or not. I've created tests for these cases. Thus test_setAsTextNull is redundant but other two test cases have to be added. Regards, Alexei P.S. thanks for the patch :) Always welcome! Thanks, Ilya. 2006/8/14, Ilya Okomin [EMAIL PROTECTED]: Hello, Mikhail! Provided test case can work from classpath of course. It's my mistake, thanks for noticed it. I'll prepare updated test case' patch with correct packaging and taking into account exceptions handling recommendation ASAP. Thanks, Ilya. On 8/14/06, Mikhail Loenko [EMAIL PROTECTED] wrote: Hi Ilya Is it significant that the test code is in bootclasspath, or it can work from classpath? There were some discussions around the tests that might be interesting, please look at [1]. Please look at the section Utilize JUnit's assert/fail methods and exception handling for clean test code This also might be useful [2] Thanks, Mikhail [1] http://mail-archives.apache.org/mod_mbox/incubator-harmony-dev/200603.mbox/[EMAIL PROTECTED] [2] http://incubator.apache.org/harmony/subcomponents/classlibrary/agreements.html 2006/8/9, Ilya Okomin (JIRA) [EMAIL PROTECTED]: [classlib][beans]Harmony does not throw IllegalArgumentException for java.beans.PropertyEditorSupport.setAsText() while RI does. Key: HARMONY-1113 URL: http://issues.apache.org/jira/browse/HARMONY-1113 Project: Harmony Issue Type: Bug Components: Classlib Reporter: Ilya Okomin Priority: Minor Attachments: PropertyEditorSupport.patch, PropertyEditorSupportTest.patch Harmony does not throw IllegalArgumentException for java.beans.PropertyEditorSupport.setAsText(String) when parameter is invalid while RI throws IllegalArgumentException. Java 1.5.0 spec says:May raise java.lang.IllegalArgumentExceptionif either the String is badly formatted or if this kind of property can't be expressed as text. =test.java== import java.beans.PropertyEditorSupport; public class test { public static void main(String args[]) { PropertyEditorSupport undefPropertyEditorSupport = new PropertyEditorSupport(); try { System.err.print(value is null: ); undefPropertyEditorSupport.setAsText(string); System.err.println(failed: IllegalArgumentException expected, but nothing was thrown!\n); } catch (IllegalArgumentException eE) { System.err.println(success!); eE.printStackTrace(); } PropertyEditorSupport defPropertyEditorSupport = new PropertyEditorSupport(); try { defPropertyEditorSupport.setValue(new Object()); System.err.print(value is Object: ); defPropertyEditorSupport.setAsText(string); System.err.println(failed: IllegalArgumentException expected, but nothing was thrown!\n); } catch (IllegalArgumentException eE) { System.err.println(success!); eE.printStackTrace(); } defPropertyEditorSupport = new PropertyEditorSupport(); try { defPropertyEditorSupport.setValue(new String()); System.err.print(value is String: ); defPropertyEditorSupport.setAsText(string); System.err.println(success!); } catch (IllegalArgumentException eE) { System.err.println(failed!);
Re: Users mailing list?
Leo Simons wrote: So, ehm, * website in quie reasonably shape * wiki sort-of being maintained * brilliant response time on filed jira issues * some snapshots/downloads available * high-traffic developer list and I saw a few comments recently about having a use for more user feedback / people testing things / etc. Maybe this is the right time to start a users list? I was thinking the same thing this weekend. This does require that there's some people looking out for unanswered e-mails, unanswered jira issues, and in general taking some time to talk to people (eg, active developers should read the user mailing lists and contribute!). But I'm guessing there's quite a few people around here willing to do just that. I don't expect any problem with that happening. geir - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Users mailing list?
and please, prefix the subject lines... Leo Simons wrote: So, ehm, * website in quie reasonably shape * wiki sort-of being maintained * brilliant response time on filed jira issues * some snapshots/downloads available * high-traffic developer list and I saw a few comments recently about having a use for more user feedback / people testing things / etc. Maybe this is the right time to start a users list? This does require that there's some people looking out for unanswered e-mails, unanswered jira issues, and in general taking some time to talk to people (eg, active developers should read the user mailing lists and contribute!). But I'm guessing there's quite a few people around here willing to do just that. WDYT? LSD, mac user, so not harmony user yet - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [jira] Created: (HARMONY-1113) [classlib][beans]Harmony does not throw IllegalArgumentException for java.beans.PropertyEditorSupport.setAsText() while RI does.
2006/8/14, Alexei Zakharov [EMAIL PROTECTED]: Ilya, Thus test_setAsTextNull is redundant but other two test cases have to be added. This is exactly what I mean. BTW, If you have more patches (or free time) for java.beans you are highly welcome. I have already tired from working on this package alone. :) You are not alone :) BTW, I've managed to fix most of the failures in org.apache.harmony.beans.tests.java.beans.PropertyEditorSupportTest they were caused by a bug in no-arg constructor of PropertyEditorSupport I'll commit the fix tomorrow. But there are two remaining failures related to Proxy. That area is completely new for me and I guess it's caused by incorrect process of Object's methods including equals(). Can you guys take a look? Thanks, Mikhail Regards, 2006/8/14, Ilya Okomin [EMAIL PROTECTED]: On 8/14/06, Alexei Zakharov [EMAIL PROTECTED] wrote: Hi Ilya, FYI there is the existing class org.apache.harmony.beans.tests.java.beans.PropertyEditorSupportTest that contains all tests for PropertyEditorSupport. IMHO it would be better if you embed your tests into this class. BTW, you may also take a look at existent testSetAsText method since it seems it does the same job. Thanks for suggested solution, I've already done it before read your message :-) Hmmm..you right, existing one test testSetAsText is the same as test_setAsTextNull. Actually existing testSetAsText test doesn't cover the problem, according to the documentation setAsText method behavior depends on the object state (rather newValue field type), thus we have to take into account the type of the newValue before setAsText call, if it is instanse of String or not. I've created tests for these cases. Thus test_setAsTextNull is redundant but other two test cases have to be added. Regards, Alexei P.S. thanks for the patch :) Always welcome! Thanks, Ilya. 2006/8/14, Ilya Okomin [EMAIL PROTECTED]: Hello, Mikhail! Provided test case can work from classpath of course. It's my mistake, thanks for noticed it. I'll prepare updated test case' patch with correct packaging and taking into account exceptions handling recommendation ASAP. Thanks, Ilya. On 8/14/06, Mikhail Loenko [EMAIL PROTECTED] wrote: Hi Ilya Is it significant that the test code is in bootclasspath, or it can work from classpath? There were some discussions around the tests that might be interesting, please look at [1]. Please look at the section Utilize JUnit's assert/fail methods and exception handling for clean test code This also might be useful [2] Thanks, Mikhail [1] http://mail-archives.apache.org/mod_mbox/incubator-harmony-dev/200603.mbox/[EMAIL PROTECTED] [2] http://incubator.apache.org/harmony/subcomponents/classlibrary/agreements.html 2006/8/9, Ilya Okomin (JIRA) [EMAIL PROTECTED]: [classlib][beans]Harmony does not throw IllegalArgumentException for java.beans.PropertyEditorSupport.setAsText() while RI does. Key: HARMONY-1113 URL: http://issues.apache.org/jira/browse/HARMONY-1113 Project: Harmony Issue Type: Bug Components: Classlib Reporter: Ilya Okomin Priority: Minor Attachments: PropertyEditorSupport.patch, PropertyEditorSupportTest.patch Harmony does not throw IllegalArgumentException for java.beans.PropertyEditorSupport.setAsText(String) when parameter is invalid while RI throws IllegalArgumentException. Java 1.5.0 spec says:May raise java.lang.IllegalArgumentExceptionif either the String is badly formatted or if this kind of property can't be expressed as text. =test.java== import java.beans.PropertyEditorSupport; public class test { public static void main(String args[]) { PropertyEditorSupport undefPropertyEditorSupport = new PropertyEditorSupport(); try { System.err.print(value is null: ); undefPropertyEditorSupport.setAsText(string); System.err.println(failed: IllegalArgumentException expected, but nothing was thrown!\n); } catch (IllegalArgumentException eE) { System.err.println(success!); eE.printStackTrace(); } PropertyEditorSupport defPropertyEditorSupport = new PropertyEditorSupport(); try { defPropertyEditorSupport.setValue(new Object()); System.err.print(value is Object: ); defPropertyEditorSupport.setAsText(string);
Re: [drlvm] HARMONY-956 - problem w/ DRLVM classloader
Anton Luht wrote: Hello, DRLVM has an (undocumented?) option to switch off verifier -Dvm.use_verifier=false . With this option activemq starts without crash. Verifier seem to be the blocker. Odd. even with that switch, I get a crash. Of course, it's not the verifier. Seems like ActiveMQ is a good app to focus on to get running geir On 8/8/06, Geir Magnusson Jr [EMAIL PROTECTED] wrote: Gregory Shimansky wrote: On Tuesday 08 August 2006 00:01 Geir Magnusson Jr wrote: Ok - I made that fix and still seem to have a problem, even after a clean rebuild. I guess I should figure out how to turn on the trace... The problem is that class loader does not chain VerifyError to NoClassDefFoundError so debugging such problems is diffucult without tracing. I think this is a place for improvement in drlvm. I tried to fix the problem and found out that verifier just doesn't understand exception handlers which point to the code length address (code end + 1). It is a surprise that this problem didn't appear earlier. App-oriented testing... :) My patch attached to JIRA attempts to fix the problem in verifier only, the application still fails to start. In default mode it exits silently, I didn't find any exception logs or something. When using interpreter -Xint it fails with ArrayStoreException still without any stack trace. I'll try to find out what is happening. Nice work. Thanks for doing this... geir Anton Luht wrote: Hello, The problem is with verifier. The code in Verifier.cpp: if( ( start_pc = len ) || ( end_pc = len ) || ( handler_pc = len ) ) ... result = VER_ErrorHandler; I've modified error logging a bit to log values of start_pc, end_pc, handler_pc and len and that's the output: Loading message broker from: xbean:activemq.xml vf_debug: VerifyError: (class: edu/emory/mathcs/backport/java/util/concurrent/lo cks/ReentrantLock$NonfairSync, method: lockInterruptibly()V, len: 103, start_pc: 87, end_pc: 103, handler_pc: 21) Handler pc is out of range vf_debug: verifying class edu/emory/mathcs/backport/java/util/concurrent/locks/R eentrantLock (method init()V) couldn't load class edu/emory/mathcs/backport/j ava/util/concurrent/locks/ReentrantLock$NonfairSync vf_debug: VerifyError: edu/emory/mathcs/backport/java/util/concurrent/locks/Reen trantLock$NonfairSync Failed to execute main task. Reason: java.lang.NoClassDefFoundError: edu/emory/m athcs/backport/java/util/concurrent/locks/ReentrantLock$NonfairSync I'm not an expert in verification but seems like end_pc = len should be replaced with end_pc len On 8/5/06, Geir Magnusson Jr [EMAIL PROTECTED] wrote: Anyone interested? :) - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [drlvm] HARMONY-956 - problem w/ DRLVM classloader
Hello, I've found another issue trying to run activemq: HARMONY-1177 . I think it's important - try/catch/return works incorrectly. On 8/14/06, Geir Magnusson Jr [EMAIL PROTECTED] wrote: Anton Luht wrote: Hello, DRLVM has an (undocumented?) option to switch off verifier -Dvm.use_verifier=false . With this option activemq starts without crash. Verifier seem to be the blocker. Odd. even with that switch, I get a crash. Of course, it's not the verifier. Seems like ActiveMQ is a good app to focus on to get running geir On 8/8/06, Geir Magnusson Jr [EMAIL PROTECTED] wrote: Gregory Shimansky wrote: On Tuesday 08 August 2006 00:01 Geir Magnusson Jr wrote: Ok - I made that fix and still seem to have a problem, even after a clean rebuild. I guess I should figure out how to turn on the trace... The problem is that class loader does not chain VerifyError to NoClassDefFoundError so debugging such problems is diffucult without tracing. I think this is a place for improvement in drlvm. I tried to fix the problem and found out that verifier just doesn't understand exception handlers which point to the code length address (code end + 1). It is a surprise that this problem didn't appear earlier. App-oriented testing... :) My patch attached to JIRA attempts to fix the problem in verifier only, the application still fails to start. In default mode it exits silently, I didn't find any exception logs or something. When using interpreter -Xint it fails with ArrayStoreException still without any stack trace. I'll try to find out what is happening. Nice work. Thanks for doing this... geir Anton Luht wrote: Hello, The problem is with verifier. The code in Verifier.cpp: if( ( start_pc = len ) || ( end_pc = len ) || ( handler_pc = len ) ) ... result = VER_ErrorHandler; I've modified error logging a bit to log values of start_pc, end_pc, handler_pc and len and that's the output: Loading message broker from: xbean:activemq.xml vf_debug: VerifyError: (class: edu/emory/mathcs/backport/java/util/concurrent/lo cks/ReentrantLock$NonfairSync, method: lockInterruptibly()V, len: 103, start_pc: 87, end_pc: 103, handler_pc: 21) Handler pc is out of range vf_debug: verifying class edu/emory/mathcs/backport/java/util/concurrent/locks/R eentrantLock (method init()V) couldn't load class edu/emory/mathcs/backport/j ava/util/concurrent/locks/ReentrantLock$NonfairSync vf_debug: VerifyError: edu/emory/mathcs/backport/java/util/concurrent/locks/Reen trantLock$NonfairSync Failed to execute main task. Reason: java.lang.NoClassDefFoundError: edu/emory/m athcs/backport/java/util/concurrent/locks/ReentrantLock$NonfairSync I'm not an expert in verification but seems like end_pc = len should be replaced with end_pc len On 8/5/06, Geir Magnusson Jr [EMAIL PROTECTED] wrote: Anyone interested? :) - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Regards, Anton Luht, Intel Middleware Products Division - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [drlvm] HARMONY-956 - problem w/ DRLVM classloader
Sorry - the bug is not reproduced on the latest build. Someone has fixed it during the weekend :) On 8/14/06, Anton Luht [EMAIL PROTECTED] wrote: Hello, I've found another issue trying to run activemq: HARMONY-1177 . I think it's important - try/catch/return works incorrectly. On 8/14/06, Geir Magnusson Jr [EMAIL PROTECTED] wrote: Anton Luht wrote: Hello, DRLVM has an (undocumented?) option to switch off verifier -Dvm.use_verifier=false . With this option activemq starts without crash. Verifier seem to be the blocker. Odd. even with that switch, I get a crash. Of course, it's not the verifier. Seems like ActiveMQ is a good app to focus on to get running geir On 8/8/06, Geir Magnusson Jr [EMAIL PROTECTED] wrote: Gregory Shimansky wrote: On Tuesday 08 August 2006 00:01 Geir Magnusson Jr wrote: Ok - I made that fix and still seem to have a problem, even after a clean rebuild. I guess I should figure out how to turn on the trace... The problem is that class loader does not chain VerifyError to NoClassDefFoundError so debugging such problems is diffucult without tracing. I think this is a place for improvement in drlvm. I tried to fix the problem and found out that verifier just doesn't understand exception handlers which point to the code length address (code end + 1). It is a surprise that this problem didn't appear earlier. App-oriented testing... :) My patch attached to JIRA attempts to fix the problem in verifier only, the application still fails to start. In default mode it exits silently, I didn't find any exception logs or something. When using interpreter -Xint it fails with ArrayStoreException still without any stack trace. I'll try to find out what is happening. Nice work. Thanks for doing this... geir Anton Luht wrote: Hello, The problem is with verifier. The code in Verifier.cpp: if( ( start_pc = len ) || ( end_pc = len ) || ( handler_pc = len ) ) ... result = VER_ErrorHandler; I've modified error logging a bit to log values of start_pc, end_pc, handler_pc and len and that's the output: Loading message broker from: xbean:activemq.xml vf_debug: VerifyError: (class: edu/emory/mathcs/backport/java/util/concurrent/lo cks/ReentrantLock$NonfairSync, method: lockInterruptibly()V, len: 103, start_pc: 87, end_pc: 103, handler_pc: 21) Handler pc is out of range vf_debug: verifying class edu/emory/mathcs/backport/java/util/concurrent/locks/R eentrantLock (method init()V) couldn't load class edu/emory/mathcs/backport/j ava/util/concurrent/locks/ReentrantLock$NonfairSync vf_debug: VerifyError: edu/emory/mathcs/backport/java/util/concurrent/locks/Reen trantLock$NonfairSync Failed to execute main task. Reason: java.lang.NoClassDefFoundError: edu/emory/m athcs/backport/java/util/concurrent/locks/ReentrantLock$NonfairSync I'm not an expert in verification but seems like end_pc = len should be replaced with end_pc len On 8/5/06, Geir Magnusson Jr [EMAIL PROTECTED] wrote: Anyone interested? :) - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Regards, Anton Luht, Intel Middleware Products Division -- Regards, Anton Luht, Intel Middleware Products Division - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [testing] metadata approach
Alexei Zakharov wrote: Hi Oliver, But is j.u.c actually required to be in the runtime under test? I was thinking that j.u.c was only required for the VM actually running the harness, and all that gets run on the VM under test is the actual test method. If this was true, then we could run TestNG with the RI (which has j.u.c) and use the jvm option to specify the Harmony VM (which would not need j.u.c). I afraid we cannot do like that. At least I was not successful last time I tried to run tests using the jvm=harmony option. As far as I understand TestNG requires j.u.c for running every single test method because parallel running can be specified on the method level. I mean in TestNG you can write something like this: @Test(threadPoolSize = 7, invocationCount = 29) This means that this method should be invoked from different threads. And it seems that TestNG needs j.u.c to implement multithreading. That's a real shame - let's hope we get j.u.c in the not too distant future then! Yes agreed, it is good to make group membership explicit as it facilitates inclusion/exclusion of groups, and makes it obvious which group tests belong to. Perhaps the same should be done for api tests, so we have a type.api group? So you suggest to add @Test (groups={os.any, type.api}) to every api test (that runs on every platform) without any defaults at all? Yes, although I dont feel strongly about it. I just think making it completely explicit avoids any confusion about which group the test is in. I thought I had sent a mail out on this in the original thread, but I guess I never did (unless Thunderbird is hiding mail from me again!). Just checked - there is no such mail in my gmail box, at least in the [classlib] Testing conventions - a proposal thread. Glad Im not going mad (well, not for that reason anyway...) So, for example, if we were on a Windows x86 32bit machine, the Ant scripts would run test groups os.shared, os.windows, os.windows.x86 and (if we ever get any 32/64bit specific tests) os.windows.x86.32bit, or something similar. Well, I like it in general. The only thing I still feel uncomfortable with is os.shared. When some code is shared among different platforms it makes sense. But here we have a test shared by several OSes. Does this sound natural? But I don't feel strongly about that and will not object if everybody likes this. I dont feel strongly either. I think having the group is good, I don't mind what it is called. Regards, Oliver With Best Regards, 2006/8/14, Oliver Deakin [EMAIL PROTECTED]: Alexei Zakharov wrote: Hi Oliver, So perhaps the build system should be changed temporarily so that we dont self host the test harness? i.e. until we get java.util.concurrent, run Ant and the subsequent TestNG process with RI or other non-Harmony VM, and launch the tests with Harmony VM using the jvm option. The bad news is that TestNG requires j.u.c stuff even for single test execution (i.e. in any case if jvm=path to harmony). :( So if we want to run annotated tests with TestNG (even from the command line) we need j.u.c. But is j.u.c actually required to be in the runtime under test? I was thinking that j.u.c was only required for the VM actually running the harness, and all that gets run on the VM under test is the actual test method. If this was true, then we could run TestNG with the RI (which has j.u.c) and use the jvm option to specify the Harmony VM (which would not need j.u.c). Please correct me if Im wrong - I'm just trying to explore our options in the hope that we can start to move to TestNG soon. That's odd - Thread.class in luni-kernel (VME v4) definitely contains a getId() method. May be I did something wrong - I will check tomorrow. I do like them - in fact I was going to link his mail after that point but couldn't find it. Here is the link: http://mail-archives.apache.org/mod_mbox/incubator-harmony-dev/200607.mbox/[EMAIL PROTECTED] Thanks - it was good to reread. As far as I remember there was additions to the George's list like using @Test (groups={os.any} ) rather than simple @Test for API tests that run on any platform. Yes agreed, it is good to make group membership explicit as it facilitates inclusion/exclusion of groups, and makes it obvious which group tests belong to. Perhaps the same should be done for api tests, so we have a type.api group? I thought I had sent a mail out on this in the original thread, but I guess I never did (unless Thunderbird is hiding mail from me again!). We have had discussions on the list about platform specific native code organisation, and I think organisation of platform specific tests can be handled in a similar way. So we would have an os.shared (or os.any, Im just going with shared as that is what we use for the native code) group that would run on all platforms. If there are platform specific tests, they would be grouped by os, then architecture (and then possibly
Re: [DRLVM][JNI]GetByteArrayRegion differs from RI (was Re: Exceptions found while running servlet...)
Ivan Volosyuk wrote: It looks like that it is possible to get zero bytes even at the very end of array. IMHO the order of boundary checks makes sense here. This is an interesting problem. The JNI spec is clear that we should throw an exception when one of the indexes isn't valid, and start == size is arguably not valid, as Gregory points out. So I think the JNI impl is right for now (but I want to test w/ the JNI impl in RI) As for classlibrary : I was testing with the RI vi java.io.OutputStream#write(buff[], offset, len), and the RI is clearly broken as it doesn't throw an NPE when [] is null. However, strictly speaking, an IndexOOBE is thrown when : a) offset is negative or b) len is negative or c) off + len buff.length So in the case of write( byte[count], count, 0); for any value of count = 0, then none of the conditions are true, and it should simply [quickly] return. Therefore, I'll start a new thread re refining OutputStream to match those rules, and then go on to test the JNI impl of the RI. geir -- Ivan On 8/11/06, Gregory Shimansky [EMAIL PROTECTED] wrote: 2006/8/11, Jimmy, Jing Lv [EMAIL PROTECTED]: Hi, As discussed in the former thread, I find that a JNI of DRLVM (GetByteArrayRegion) differs from RI in passing parameter (byte[count],count,0). RI (and J9 VM) returns immediately but DRLVM throws an ArrayIndexOutOfBoundsException. IMHO, it is better to improve here, make it follow RI, as JNI is also a part of API, and users may use it. So if no objections, shall I or someone raise a JIRA for this? I don't know if Martin is urgent in using Harmony in Winstone servlet engine (Martin, can you read this?), so shall I work around in java code before we have conclusion? Any comments/suggestions from DRLVM guys? Thanks! I didn't really understand the condition when vm throws AIOBE. Do you pass start parameter count for the array of count length? But in this case the start points to the element right after the array end. And spec [1] explicitly states that this function should throw AIOBE in this case. Is there something I don't understand? [1] http://java.sun.com/j2se/1.5.0/docs/guide/jni/spec/functions.html#wp6212 -- Gregory Shimansky, Intel Middleware Products Division - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[classlib][luni] Problem with java.io.OutputStream
When looking at HARMONY-1156, it became clear that our java.io.OutputStream isn't right. I'd like to make the following changes : Follow the spec so that an IndexOOBE is thrown when : a) offset is negative or b) len is negative or c) off + len buff.length So in the case of write( byte[count], count, 0); for any value of count = 0, then none of the conditions are true, and it should simply [quickly] return. Now, the spec says that if the array is null, then a NPE should be thrown, but this doesn't happen in the RI when len = 0. This seems to be a reasonable thing to do, and therefore I think that we should match the RI here, and not the spec. Comments? geir - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[DRLVM][GC] Goals for 2006/2007
All, There is rough consensus that the immediate goal for Harmony JVM is to reliably run simple commercial workloads with acceptable performance. In regards to a garbage collector for a Harmony JVM in 2006 there are some data points worth noting. 1) A quick survey shows most basic commercial JVMs implement a generational collector. 2) While the existing drlvm garbage collector, gcv4, implements some interesting advanced concepts, it is not currently a generational collector. 3) The MMTk port to drlvm is not yet finished. Even assuming MMTk's generational configuration is appropriate, it is still too early to put this garbage collector on the roadmap for a 2006 Harmony JVM. It might be worth revisiting in 2007. But it's too far away to debate at this time. Given the above data points, the following is a first stab at requirements for Harmony GCV5. The intention is to set down some basic parameters. 1) Generational Collector with mark/compacting mature object space 2) Parallel collection, no concurrent collection (Editor's note: parallel collection is a specific term meaning that during gc collection, most CPUs in an SMP box are busy collecting garbage. This is fairly straight forward to build. Concurrent collection is a specific term meaning that Java application threads make forward progress while special GC threads are simultaneously collecting. This is hard to build) 3) Parallel allocation. (Again, this is very straight forward. Basically each Java thread gets private chunks of memory to allocate out of.) 4) Write barriers. A generational collector benefits from write barriers that detect whenever a pointer to a younger object is written inside an older object. 5) For expediency, GCV5 should try to plug into the existing JVM/GC interface. However, if this interface is broken, we need to jump at the opportunity to make it right. 6) The goal is to make this code readable/modifiable/debuggable by non-GC engineers. The code should read as nothing more than a basic generational GC. No experimental code should ever be checked into Harmony GCV5 source base. 7) Performance goals should be discussed after the initial implementation is committed. 8) Object pinning is not required at this time. However, be prepared that at a later date we might discover pinning is needed to get acceptable performance from native methods that use JNI. 9) Supports Java 1.5. This means GCV5 must implement functionality such as weak/soft/phantom references and finalization. 10) Though this work will be an investment, it is ultimately necessary for Harmony to meet medium term goals, eg., being maintainable, passing TcK successfully, etc. and be a platform for future, more advanced work, which is a requirement that v4 cannot meet. Thoughts on the above? -- Weldon Washburn Intel Middleware Products Division - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[prefix-goes-here] prefix list? (was: Re: Users mailing list?)
On Mon, Aug 14, 2006 at 10:09:17AM -0400, Geir Magnusson Jr wrote: and please, prefix the subject lines... and change the subject line when you change the subject. And reply inline or at the bottom not at the top. And strip the footer. Yeah yeah yeah. I didn't know what to prefix with. Its not [tools], [DRLVM], [classlib] or [lega] (the ones I've seen). Is there a prefix list? Where? ciao! LSD Leo Simons wrote: snip/ - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[drlvm] src/test side-by-side with vm and build?
Hi, in the below commit Geir has added several dozens files under drlvm/trunk/src/test Since we have two directories on the top-level, build with build system, and vm with everything else (sources, tests, documentation), it seems very confusing to have 'src' directory at the top level. Some time ago DRLVM team had very hot debates on directory structure, and we ended up with following structure: drlvm/trunk + vm + vmcore + jitrino + ... (other components) + doc (documentation) + tests (tests) + include (header files) + build(build system) The tests that are now checked into src/test look like they are put to a wrong place. More correct place would be something like vm/tests/verifier Pavel, could you suggest a convenient place for your verifier tests? -- Salikh Zakirov, Intel Middleware Products Division -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 02, 2006 8:31 PM To: [EMAIL PROTECTED] Subject: svn commit: r428043 - in /incubator/harmony/enhanced/drlvm/trunk: src/test/verifier_aastore/ src/test/verifier_aastore/src/ src/test/verifier_empty_init/ src/test/verifier_empty_init/src/ vm/vmcore/src/verifier/ Author: geirm Date: Wed Aug 2 09:30:51 2006 New Revision: 428043 URL: http://svn.apache.org/viewvc?rev=428043view=rev Log: HARMONY-973 Add check for empty init method Also added both test sets included in JIRA to src/test for further integration Added: incubator/harmony/enhanced/drlvm/trunk/src/test/verifier_aastore/ incubator/harmony/enhanced/drlvm/trunk/src/test/verifier_aastore/HowTo.t xt (with props) incubator/harmony/enhanced/drlvm/trunk/src/test/verifier_aastore/src/ incubator/harmony/enhanced/drlvm/trunk/src/test/verifier_aastore/src/Tes t.java (with props) incubator/harmony/enhanced/drlvm/trunk/src/test/verifier_aastore/src/Tes tAastore.java (with props) incubator/harmony/enhanced/drlvm/trunk/src/test/verifier_aastore/src/Tes tAastore2.j incubator/harmony/enhanced/drlvm/trunk/src/test/verifier_aastore/src/Tes tInterface.java (with props) incubator/harmony/enhanced/drlvm/trunk/src/test/verifier_empty_init/ incubator/harmony/enhanced/drlvm/trunk/src/test/verifier_empty_init/HowT o.txt (with props) incubator/harmony/enhanced/drlvm/trunk/src/test/verifier_empty_init/src/ incubator/harmony/enhanced/drlvm/trunk/src/test/verifier_empty_init/src/ Test.java (with props) incubator/harmony/enhanced/drlvm/trunk/src/test/verifier_empty_init/src/ TestEmptyInit.j Modified: incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier/ver_datafl ow.cpp incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier/ver_utils. cpp Added: incubator/harmony/enhanced/drlvm/trunk/src/test/verifier_aastore/HowTo.t xt URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/src/ test/verifier_aastore/HowTo.txt?rev=428043view=auto == --- incubator/harmony/enhanced/drlvm/trunk/src/test/verifier_aastore/HowTo.t xt (added) +++ incubator/harmony/enhanced/drlvm/trunk/src/test/verifier_aastore/HowTo.t xt Wed Aug 2 09:30:51 2006 @@ -0,0 +1,14 @@ +How to compile and run test: + +1) To compile you need to have a Jasmin version 1.1. +This can be downloaded from http://jasmin.sourceforge.net + +2) The Jasmin distribution contains a jasmin.jar file holding the Jasmin assembler. +To compile sources execute the following commands: + +$ java -jar path to Jasmin 1.1/jasmin.jar src/*.j +$ javac -d . src/*.java + +3) To run test execute the following command: + +$ java Test Propchange: incubator/harmony/enhanced/drlvm/trunk/src/test/verifier_aastore/HowTo.t xt -- svn:eol-style = native Added: incubator/harmony/enhanced/drlvm/trunk/src/test/verifier_aastore/src/Tes t.java URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/src/ test/verifier_aastore/src/Test.java?rev=428043view=auto == --- incubator/harmony/enhanced/drlvm/trunk/src/test/verifier_aastore/src/Tes t.java (added) +++ incubator/harmony/enhanced/drlvm/trunk/src/test/verifier_aastore/src/Tes t.java Wed Aug 2 09:30:51 2006 @@ -0,0 +1,14 @@ +public class Test { +public static void main(String[] args) { +// verify aastore instruction +try { +new TestAastore().test(); +System.out.println(TestAastore: failed); +} catch (LinkageError e) { +System.out.println(TestAastore: passed: + e); +} catch (Throwable e) { +System.out.println(TestAastore: failed: unexpected error + e); +e.printStackTrace(); +} + } +} \ No newline at end of file Propchange:
Re: [prefix-goes-here] prefix list?
Leo Simons wrote: On Mon, Aug 14, 2006 at 10:09:17AM -0400, Geir Magnusson Jr wrote: and please, prefix the subject lines... and change the subject line when you change the subject. And reply inline or at the bottom not at the top. And strip the footer. Yeah yeah yeah. I didn't know what to prefix with. Its not [tools], [DRLVM], [classlib] or [lega] (the ones I've seen). [general] Is there a prefix list? Where? I'll add it right now done. geir ciao! LSD Leo Simons wrote: snip/ - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [drlvm] src/test side-by-side with vm and build?
Zakirov, Salikh wrote: Hi, in the below commit Geir has added several dozens files under drlvm/trunk/src/test Since we have two directories on the top-level, build with build system, and vm with everything else (sources, tests, documentation), it seems very confusing to have 'src' directory at the top level. Yep - I just wanted to park them somewhere as I wanted to close the JIRAs that they came in. I thought that putting them in a conventional place like 'src/test' would cause a violent allergic reaction in people used to the unique innovation that is the DRLVM layout :) Some time ago DRLVM team had very hot debates on directory structure, and we ended up with following structure: drlvm/trunk + vm + vmcore + jitrino + ... (other components) + doc (documentation) + tests (tests) + include (header files) + build(build system) The tests that are now checked into src/test look like they are put to a wrong place. More correct place would be something like vm/tests/verifier Pavel, could you suggest a convenient place for your verifier tests? Actually, we need to come up with a real test framework for these, and hopefully pull the other tests out to join them. I thought I brought this up in a JIRA or note to the dev list. While we're talking about it, should we consider a fresh layout for DRLVM? Maybe we can switch to a make-based build at the same time... right now, the layout w/in vm/ is somewhat arbitrary : 1) There is an include directory in parallel with the modules vm/include/*.h 2) Some modules have their own include directories (vm/vmcore/include) 3) Some don't (vm/em) 4) Some modules have src near the top : vm/em/src 5) Some don't vm/tests/smoke/ 6) Some modules have strange branches by language deep in the path : vm/vmcore/src/kernel_classes /javasrc /native What do you think? geir - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[drlvm] Volunteer to make drlvm artifacts work in a subdirectory of jre?
I haven't had the time to figure out why, but DRLVM artifacts don't seem to work with the launcher when in a subdirectory like default the way the J9 VM does. This is important so we can be a good citizen with respect to the launcher. Otherwise, we need to invoke the launcher with command line arguments such as -vmdir:. which implies we need new binaries called java.exe, etc, that exec() launcher w/ cmd line props. Anyone have an idea? geir - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [DRLVM][JNI]GetByteArrayRegion differs from RI (was Re: Exceptions found while running servlet...)
On Monday 14 August 2006 20:13 Geir Magnusson Jr wrote: Ivan Volosyuk wrote: It looks like that it is possible to get zero bytes even at the very end of array. IMHO the order of boundary checks makes sense here. This is an interesting problem. The JNI spec is clear that we should throw an exception when one of the indexes isn't valid, and start == size is arguably not valid, as Gregory points out. So I think the JNI impl is right for now (but I want to test w/ the JNI impl in RI) I've written a test [1] myself and cannot say I completely understand the result. With length = 0 RI 1.5 allows calling to GettypeArrayRegion with start equal to array length but throws AIOOBE if start is greater than array length. I am unsure if we want to allow this compatibility and a reason to allow it. When length is 0 the application still gets nothing except for clear exception status. There is no value in allowing this call except for allowing software which has a bug in it to work. On the other hand allowing start == length to pass violates the spec IMHO. I think it is better if software which uses this undocumented feature was fixed instead of introducing this workaround, so if others agree I think HARMONY-1156 could be closed. [1] public class AIOOBE { static { System.loadLibrary(AIOOBE); } private native void nativeMethod(int array[], int start); public static void main(String args[]) { int array[] = new int[10]; System.out.println(Calling with length 10); (new AIOOBE()).nativeMethod(array, 10); System.out.println(Calling with length 11); (new AIOOBE()).nativeMethod(array, 11); System.out.println(Calling with length 100); (new AIOOBE()).nativeMethod(array, 100); } } /* DO NOT EDIT THIS FILE - it is machine generated */ #include jni.h /* Header for class AIOOBE */ #ifndef _Included_AIOOBE #define _Included_AIOOBE #ifdef __cplusplus extern C { #endif /* * Class: AIOOBE * Method:nativeMethod * Signature: ([II)V */ JNIEXPORT void JNICALL Java_AIOOBE_nativeMethod (JNIEnv *jenv, jobject thisObject, jintArray array, jint start) { int buffer[1024]; (*jenv)-GetIntArrayRegion(jenv, array, start, 0, buffer); } #ifdef __cplusplus } #endif #endif -- Gregory Shimansky, Intel Middleware Products Division - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [jira] Created: (HARMONY-1113) [classlib][beans]Harmony does not throw IllegalArgumentException for java.beans.PropertyEditorSupport.setAsText() while RI does.
Hi Mikhail, You are not alone :) I beg you pardon, I meant mere mortals who speak patch+JIRA language :) BTW, I've managed to fix most of the failures in org.apache.harmony.beans.tests.java.beans.PropertyEditorSupportTest ... Can you guys take a look? Sure, I will look at it tomorrow. Regards, 2006/8/14, Mikhail Loenko [EMAIL PROTECTED]: 2006/8/14, Alexei Zakharov [EMAIL PROTECTED]: Ilya, Thus test_setAsTextNull is redundant but other two test cases have to be added. This is exactly what I mean. BTW, If you have more patches (or free time) for java.beans you are highly welcome. I have already tired from working on this package alone. :) You are not alone :) BTW, I've managed to fix most of the failures in org.apache.harmony.beans.tests.java.beans.PropertyEditorSupportTest they were caused by a bug in no-arg constructor of PropertyEditorSupport I'll commit the fix tomorrow. But there are two remaining failures related to Proxy. That area is completely new for me and I guess it's caused by incorrect process of Object's methods including equals(). Can you guys take a look? Thanks, Mikhail Regards, 2006/8/14, Ilya Okomin [EMAIL PROTECTED]: On 8/14/06, Alexei Zakharov [EMAIL PROTECTED] wrote: Hi Ilya, FYI there is the existing class org.apache.harmony.beans.tests.java.beans.PropertyEditorSupportTest that contains all tests for PropertyEditorSupport. IMHO it would be better if you embed your tests into this class. BTW, you may also take a look at existent testSetAsText method since it seems it does the same job. Thanks for suggested solution, I've already done it before read your message :-) Hmmm..you right, existing one test testSetAsText is the same as test_setAsTextNull. Actually existing testSetAsText test doesn't cover the problem, according to the documentation setAsText method behavior depends on the object state (rather newValue field type), thus we have to take into account the type of the newValue before setAsText call, if it is instanse of String or not. I've created tests for these cases. Thus test_setAsTextNull is redundant but other two test cases have to be added. Regards, Alexei P.S. thanks for the patch :) Always welcome! Thanks, Ilya. 2006/8/14, Ilya Okomin [EMAIL PROTECTED]: Hello, Mikhail! Provided test case can work from classpath of course. It's my mistake, thanks for noticed it. I'll prepare updated test case' patch with correct packaging and taking into account exceptions handling recommendation ASAP. Thanks, Ilya. On 8/14/06, Mikhail Loenko [EMAIL PROTECTED] wrote: Hi Ilya Is it significant that the test code is in bootclasspath, or it can work from classpath? There were some discussions around the tests that might be interesting, please look at [1]. Please look at the section Utilize JUnit's assert/fail methods and exception handling for clean test code This also might be useful [2] Thanks, Mikhail [1] http://mail-archives.apache.org/mod_mbox/incubator-harmony-dev/200603.mbox/[EMAIL PROTECTED] [2] http://incubator.apache.org/harmony/subcomponents/classlibrary/agreements.html 2006/8/9, Ilya Okomin (JIRA) [EMAIL PROTECTED]: [classlib][beans]Harmony does not throw IllegalArgumentException for java.beans.PropertyEditorSupport.setAsText() while RI does. Key: HARMONY-1113 URL: http://issues.apache.org/jira/browse/HARMONY-1113 Project: Harmony Issue Type: Bug Components: Classlib Reporter: Ilya Okomin Priority: Minor Attachments: PropertyEditorSupport.patch, PropertyEditorSupportTest.patch Harmony does not throw IllegalArgumentException for java.beans.PropertyEditorSupport.setAsText(String) when parameter is invalid while RI throws IllegalArgumentException. Java 1.5.0 spec says:May raise java.lang.IllegalArgumentExceptionif either the String is badly formatted or if this kind of property can't be expressed as text. =test.java== import java.beans.PropertyEditorSupport; public class test { public static void main(String args[]) { PropertyEditorSupport undefPropertyEditorSupport = new PropertyEditorSupport(); try { System.err.print(value is null: ); undefPropertyEditorSupport.setAsText(string); System.err.println(failed: IllegalArgumentException expected, but nothing was
Re: [general] compatibility packages
I assume for #1 we'll offer a patch :) Or just create an rt.jar if someone needs that. There is no reason not to... geir Anton Luht wrote: Hello, There's another issues on compatibility: some applications rely on the existence of JAVA_ROOT/lib/rt.jar - the example is [1]. Some require tools.jar [2]. Harmony doesn't have these jars now so applications can fail on it just because they're bound to the implementation specifics. [1] http://koders.com/java/fid94A9F615DBE6674BB9423D1DF67C8256605B5C24.aspx?s=rt.jar [2] http://koders.com/java/fidDE45C5B81C71D554A7E680A0E64FC1D564BA830A.aspx?s=tools.jar - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [DRLVM][JNI]GetByteArrayRegion differs from RI (was Re: Exceptions found while running servlet...)
Gregory Shimansky wrote: On Monday 14 August 2006 20:13 Geir Magnusson Jr wrote: Ivan Volosyuk wrote: It looks like that it is possible to get zero bytes even at the very end of array. IMHO the order of boundary checks makes sense here. This is an interesting problem. The JNI spec is clear that we should throw an exception when one of the indexes isn't valid, and start == size is arguably not valid, as Gregory points out. So I think the JNI impl is right for now (but I want to test w/ the JNI impl in RI) I've written a test [1] myself and cannot say I completely understand the result. With length = 0 RI 1.5 allows calling to GettypeArrayRegion with start equal to array length but throws AIOOBE if start is greater than array length. That makes sense to me, only because I am thinking of j.i.OutputStream's write([], int, int) method, which does state that it's ok if start + len == arraylen... I'm sure if we thought about it, we'd figure out that it lends itself nicely to some common loop idiom. I suspect it will be some end case when some read returns an empty buffer, so write(buf, 0, 0) works without a check, or some situation where there's some post decrement leading you to write(buf, length, len) where the len was calculated from (buf.length - length) or something. Now, that isn't what the JNI spec says, but it seems like the JNI spec was written in a hurry... :) I am unsure if we want to allow this compatibility and a reason to allow it. When length is 0 the application still gets nothing except for clear exception status. There is no value in allowing this call except for allowing software which has a bug in it to work. On the other hand allowing start == length to pass violates the spec IMHO. I think it is better if software which uses this undocumented feature was fixed instead of introducing this workaround, so if others agree I think HARMONY-1156 could be closed. Well, I don't feel strongly either way, but am uncomfortable with the inconsistency. The JNI docs seem pretty sparse, and clearly some thought went into allowing : write( buff, buff.length, 0) geir - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [DRLVM][JNI]GetByteArrayRegion differs from RI (was Re: Exceptions found while running servlet...)
On Monday 14 August 2006 23:37 Geir Magnusson Jr wrote: I've written a test [1] myself and cannot say I completely understand the result. With length = 0 RI 1.5 allows calling to GettypeArrayRegion with start equal to array length but throws AIOOBE if start is greater than array length. That makes sense to me, only because I am thinking of j.i.OutputStream's write([], int, int) method, which does state that it's ok if start + len == arraylen... It is not specified either, is it? I looked at the ObjectOutputStream.write(byte[], int, int) and didn't find any detailed description about allowed ranges. I'm sure if we thought about it, we'd figure out that it lends itself nicely to some common loop idiom. I suspect it will be some end case when some read returns an empty buffer, so write(buf, 0, 0) works without a check, or some situation where there's some post decrement leading you to write(buf, length, len) where the len was calculated from (buf.length - length) or something. Now, that isn't what the JNI spec says, but it seems like the JNI spec was written in a hurry... :) JNI spec is indeed quite incomplete when it comes to border cases. Sun wouldn't need to create a special book [1] (however this clarification doesn't clarify this particular case) for JNI clarification if they wrote a complete spec from the start. However Sun usually changes a spec if its implementation doesn't work according to it for some time. JNI spec is really old, it was written for 1.1 and the statement about exception still remains. I am unsure if we want to allow this compatibility and a reason to allow it. When length is 0 the application still gets nothing except for clear exception status. There is no value in allowing this call except for allowing software which has a bug in it to work. On the other hand allowing start == length to pass violates the spec IMHO. I think it is better if software which uses this undocumented feature was fixed instead of introducing this workaround, so if others agree I think HARMONY-1156 could be closed. Well, I don't feel strongly either way, but am uncomfortable with the inconsistency. The JNI docs seem pretty sparse, and clearly some thought went into allowing : write( buff, buff.length, 0) The whole exception condition looks like this jsize length = GetArrayLength(env, array); jsize end = start + len; if(start 0 || start = length || end 0 || end length) { char msg[30]; sprintf(msg, %d..%d, start, end); ThrowNew_Quick(env, java/lang/ArrayIndexOutOfBoundsException, msg); return; } and it is easy to change start = length to start length if you ask for it. I am still unsure if this is a place where spec should step away from the spec be it imcomplete or not. Programmers who don't work for Sun read public spec, don't they? [1] http://java.sun.com/docs/books/jni/html/jniTOC.html -- Gregory Shimansky, Intel Middleware Products Division - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Re: [general] compatibility packages
Bear in mind that this isn't standard across all VMs. For example, Mac VMs use JAVA_HOME/../Classes/classes.jar, instead of rt.jar. Alex. On 14/08/06, Geir Magnusson Jr [EMAIL PROTECTED] wrote: I assume for #1 we'll offer a patch :) Or just create an rt.jar if someone needs that. There is no reason not to... geir Anton Luht wrote: Hello, There's another issues on compatibility: some applications rely on the existence of JAVA_ROOT/lib/rt.jar - the example is [1]. Some require tools.jar [2]. Harmony doesn't have these jars now so applications can fail on it just because they're bound to the implementation specifics. [1] http://koders.com/java/fid94A9F615DBE6674BB9423D1DF67C8256605B5C24.aspx?s=rt.jar [2] http://koders.com/java/fidDE45C5B81C71D554A7E680A0E64FC1D564BA830A.aspx?s=tools.jar - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[DRLVM][MMTk] Jitrino.JET design questions on integrating the object allocation APIs
Alex, How hard would it be to modify Jitrino.JET to call a different object allocation helper function on a method-by-method basis? This would help a bunch with integrating MMTk into DRLVM. It would also be nice to enable write barriers on a method-by-method basis. Thanks -- Weldon Washburn Intel Middleware Products Division - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [drlvm] src/test side-by-side with vm and build?
Geir Magnusson Jr wrote: Yep - I just wanted to park them somewhere as I wanted to close the JIRAs that they came in. I thought that putting them in a conventional place like 'src/test' would cause a violent allergic reaction in people used to the unique innovation that is the DRLVM layout :) Okay, so here you are :) Actually, we need to come up with a real test framework for these, and hopefully pull the other tests out to join them. I agree. Concerning the test framework, we already have at least 3 on hands: 1) classic junit 2) smoke test runner (1 VM process per test), parse output stream for pass/fail, check the return status. Ant-based runner is in build system, and shell-based one just as easy to do 3) smoke test runner in 1 VM process, tests/smoke/Check.java, with the same semanics for pass/fail Generally, I think we should accept any tests, provided that the tests can be run as easy as 'build test' (or 'make check' or whatever that can be started by one button press). While we're talking about it, should we consider a fresh layout for DRLVM? Remembering the flamewars when deciding on current one, I would suggest that we find a good reason first. A poor peace is better than a good war... Maybe we can switch to a make-based build at the same time... As far as I can tell from my experience, it is utterly unwise to do a build system change and directory layout change at the same time. A better approach would be start playing with a new build system while majority of the developers stay on the current one. And once the new system is in reasonable shape, plan a flag day to phase out the old system. right now, the layout w/in vm/ is somewhat arbitrary : In fact, you just have identified most of the cornerstones of the layout. 1) There is an include directory in parallel with the modules vm/include/*.h This is intentional. These are VM-wide internal interfaces that are used to communicate between pluggable VM components (VM Core, GC, JIT). This is mostly defines interfaces between DLLs. 2) Some modules have their own include directories (vm/vmcore/include) VM Core module is rather big, so it is split into several subcomponents. The vmcore/include directory is for internal interfaces of VM Core, such as exceptions. Note, that these interfaces are not exposed to DLL level. 3) Some don't (vm/em) Small modules do not require dividing into smaller subcomponents, thus do not have any module-wide include directories. 4) Some modules have src near the top : vm/em/src In fact, *all* modules are supposed to have src/ subdirectory. 5) Some don't vm/tests/smoke/ This is just tests, which are not considered as a module. 6) Some modules have strange branches by language deep in the path : vm/vmcore/src/kernel_classes /javasrc /native Again, this is intentional. It is used for separating java sources from c/c++ sources for modules that have both. Pure-language modules omit it. What do you think? While I do not personally agree with some of the decisions, I think we have better things to do than to revise this structure without a good reason. I think it would be much better to describe the decisions behind the current structure somewhere on the web or wiki. I could do it in a few days if someone else doesn't volunteer to do it before. P.S. If it was up to me, I would put all sources of each module (DLL) into one directory, just like drlvm/trunk + vm + *.cpp *.c *.java + gc + *.cpp + jit + *.cpp + Makefile + doc + *.html *.txt P.P.S: do not take it seriously, it is a provocation :) -- Salikh - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: svn commit: r431219 - in /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test: api/ impl/ java/org/apache/harmony/luni/tests/java/lang/
-Original Message- From: Stepan Mishura [mailto:[EMAIL PROTECTED] Sent: Monday, August 14, 2006 6:36 AM To: harmony-dev Subject: Re: svn commit: r431219 - in /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test: api/ impl/ java/org/apache/harmony/luni/tests/java/lang/ Hi Nathan, I saw that you've changed tests layout (consolidated) tests in luni module. But I don't understand what the purpose for the change. Is this a first step for migrating to TestNG? (May be I missed something important - sorry for stupid question then.) No, I'm just trying to put all of the tests into what I would consider is a defacto standard src/test/java and src/test/resources. The actual goal of this consolidation is to pull together all of the duplicated tests and similar tests. This is reducing the test run time for luni and making patch creation/application much easier. At the same time, I've been cleaning up the tests so that those that don't run can be run and anything that doesn't run on a RI is fixed, so that it does. BTW did we agree on that we won't follow directory-based tests layout [1]? IMHO, not yet. IIRC we agreed that directory-based tests layout is not quite convenient for our needs and we'll try TestNG. But for me it doesn't mean that we'll migrate to TestNG for sure. Also I assume that mixed approach (directory-based layout + annotations) is possible. So it is not time for doing massive tests moves and merges. I've been watching the test layout/approach threads, but I haven't seen anything substantial fall out. I'm still waiting to see a simple and clear suggestion. In any case, the current state is, frankly, a bit of a mess and any cleanup can't hurt. Additionally, I was trying the separated directory layout to see what it's like and I can tell you first hand it's just not that great. It just adds complexity in the repository and the build script. This may be needed for some modules, but I don't see it as the norm. Also, I've been experimenting with just using plain-old JUnit TestSuites to separate pure-API tests from implementation tests and it works very well. It works equally well for creating a failing-tests test suite. It also seems to make the tests run much faster, but I'm not sure why; maybe it's because Ant doesn't search for all tests, it just runs the single test that's an aggregate. And the minor comment to the commit log. It says: remove unused folders. But there are a lot of other unrelated changes. Was it possible to make separate commits? This was a mistake. I accidentally committed extra files with that revision. Thanks, Stepan. [1] http://incubator.apache.org/harmony/subcomponents/classlibrary/testing.htm l -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, August 14, 2006 2:56 AM To: [EMAIL PROTECTED] Subject: svn commit: r431219 - in /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test: api/ impl/ java/org/apache/harmony/luni/tests/java/lang/ Author: ndbeyer Date: Sun Aug 13 12:55:54 2006 New Revision: 431219 URL: http://svn.apache.org/viewvc?rev=431219view=rev Log: remove unused folders Removed: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/impl/ Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/a pache/harmony/luni/tests/java/lang/DoubleTest.java incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/a pache/harmony/luni/tests/java/lang/SecurityManagerTest.java incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/a pache/harmony/luni/tests/java/lang/ThreadGroupTest.java Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/a pache/harmony/luni/tests/java/lang/DoubleTest.java URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/mod ules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/DoubleTest .java?rev=431219r1=431218r2=431219view=diff == --- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/a pache/harmony/luni/tests/java/lang/DoubleTest.java (original) +++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/a pache/harmony/luni/tests/java/lang/DoubleTest.java Sun Aug 13 12:55:54 2006 @@ -441,7 +441,7 @@ */ public void test_parseDoubleLjava_lang_String() { assertEquals(Incorrect double returned, expected zero., 0.0, Double -.parseDouble(2.4703282292062327208828439643411e-324)); +.parseDouble(2.4703282292062327208828439643411e-324), 0.0 ); assertTrue(Incorrect double returned, expected minimum double., Double .parseDouble(2.4703282292062327208828439643412e-324) ==
Re: [jira] Created: (HARMONY-1176) [classlib][net] new java.net.ServerSocket( InetAddress address, int port ) throws NPE
Hi Igor, I ran your test on windows, and seems everything is ok. Test output: (Harmony) Test done. Socket: Socket[addr=Harmony-zhanghz/9.181.106.94,port=8080,localport=1290] My environment: WindowsXP (SP2) + IBM j9 vm Thanks! On 8/14/06, Igor V. Stolyarov (JIRA) [EMAIL PROTECTED] wrote: [classlib][net] new java.net.ServerSocket( InetAddress address, int port ) throws NPE -- Key: HARMONY-1176 URL: http://issues.apache.org/jira/browse/HARMONY-1176 Project: Harmony Issue Type: Bug Reporter: Igor V. Stolyarov new java.net.ServerSocket( InetAddress address, int port ) throws NPE from native code Test-- import java.net.*; public class SocketTest { public static void main(String[] args) { try{ ServerSocket ss = new ServerSocket(8080, 50, InetAddress.getLocalHost()); Socket s = new Socket(InetAddress.getLocalHost(), 8080); System.out.println(Test done. Socket: +s); }catch(Exception e){ e.printStackTrace(); } } } Output--- JRockit: java version 1.5.0 Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64) BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC: System optimized over throughput (initial strategy singleparpar)) Test done. Socket: Socket[addr=ivstolya-mobl/10.125.132.107,port=8080,localport= 4701] Harmony: java version 1.5 (subset) (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as app licable. Unhandled exception Type=Segmentation error vmState=0x0004 J9Generic_Signal_Number=0004 ExceptionCode=c005 ExceptionAddress=7FE40F5 1 ContextFlags=0001003f Handler1=7FE50390 Handler2=7FD074F0 InaccessibleAddress= EDI= ESI=01578F00 EAX= EBX=0013F7A4 ECX= EDX=0020 EIP=7FE40F51 ESP=0013F70C EBP=0013F77C Module=c:\test\deploy\jre\bin\default\j9vm23.dll Module_base_address=7FE3 Offset_in_DLL=00010f51 Target=2_30_20060727_07300_lHdSMR (Windows XP 5.1 build 2600 Service Pack 2) CPU=x86 (1 logical CPUs) (0x7feec000 RAM) JavaVMInitArgs.nOptions=10: -Dcom.ibm.oti.vm.vmdir=c:\test\deploy\jre\bin\default\ -Dcom.ibm.oti.vm.exe=c:\test\deploy\jre\bin\java.exe -Dcom.ibm.oti.vm.bootstrap.library.path=c:\test\deploy\jre\bin ;c:\test\deplo y\jre\bin\default -Xbootclasspath/p:c:\test\deploy\jre\bin\default\luni-kernel.jar ;c:\test\dep loy\jre\bin\default\security-kernel.jar -Djava.home=c:\test\deploy\jre -Djava.library.path=c:\test\deploy\jre\bin\ ;.;c:\test\deploy\jre\bin\default ;C:\Program Files\Far;C:\Program Files\Intel\VTune\tcheck\bin;C:\Program Files\I ntel\VTune\CGGlbCache;C:\Program Files\Intel\VTune\Shared\Bin;C:\Program Files\C ommon Files\Intel\Shared Files\IDVC;C:\Program Files\Intel\VTune\Analyzer\Bin;C: \PROGRAM FILES\THINKPAD\UTILITIES;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\W bem;C:\Program Files\PC-Doctor for Windows\services;C:\Program Files\ATI Technol ogies\ATI Control Panel;C:\Program Files\ATI Technologies\Fire GL 3D Studio Max; C:\PROGRA~1\F-Secure\ssh;C:\jrockit-j2sdk1.4.2_04\bin;C:\apache- ant-1.6.2\bin;C: \jcsc\bin;C:\Program Files\Intel\Compiler\C++\9.0\IA32\Bin;C:\Program Files\Humm ingbird\Connectivity\10.00\Accessories\;;C:\Program Files\Subversion\bin;C:\Prog ram Files\Microsoft Platform SDK\Bin;c:\cygwin\bin;C:\Program Files\QuickTime\QT System\;C:\Program Files\cvsnt;cvsgrab-2.2.2; -Djava.class.path=C:\ProgramFiles\Intel\VTune\Analyzer\Bin;.;C:\Program Fil es\Java\j2re1.4.2_10\lib\ext\QTJava.zip _org.apache.harmony.vmi.portlib (extra info: 0013FBC4) -Xjcl:jclclear_23 _j2se_j9=136448 Generated system dump: C:\Documents and Settings\ivstolya\j9.dmp Thread: main (priority 5) (LOCATION OF ERROR) NATIVE org/apache/harmony/luni/platform/OSNetworkSystem.createSocketImpl(Ljav a/io/FileDescriptor;Z)V 0002 org/apache/harmony/luni/platform/OSNetworkSystem.createSocket(Ljava/io /FileDescriptor;Z)V 0016 org/apache/harmony/luni/net/PlainSocketImpl2.create(Z)V 0031 java/net/Socket.startupSocket(Ljava/net/InetAddress;ILjava/net/InetAdd ress;IZ)V 0010 java/net/Socket.init(Ljava/net/InetAddress;I)V 001a SocketTest.main([Ljava/lang/String;)V Thread: JIT Compilation Thread (priority 10) (daemon) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira -- Andrew Zhang China Software Development Lab, IBM
Re: [DRLVM][JNI]GetByteArrayRegion differs from RI (was Re: Exceptions found while running servlet...)
Gregory Shimansky wrote: On Monday 14 August 2006 23:37 Geir Magnusson Jr wrote: I've written a test [1] myself and cannot say I completely understand the result. With length = 0 RI 1.5 allows calling to GettypeArrayRegion with start equal to array length but throws AIOOBE if start is greater than array length. That makes sense to me, only because I am thinking of j.i.OutputStream's write([], int, int) method, which does state that it's ok if start + len == arraylen... It is not specified either, is it? I looked at the ObjectOutputStream.write(byte[], int, int) and didn't find any detailed description about allowed ranges. I'm sure if we thought about it, we'd figure out that it lends itself nicely to some common loop idiom. I suspect it will be some end case when some read returns an empty buffer, so write(buf, 0, 0) works without a check, or some situation where there's some post decrement leading you to write(buf, length, len) where the len was calculated from (buf.length - length) or something. Now, that isn't what the JNI spec says, but it seems like the JNI spec was written in a hurry... :) JNI spec is indeed quite incomplete when it comes to border cases. Sun wouldn't need to create a special book [1] (however this clarification doesn't clarify this particular case) for JNI clarification if they wrote a complete spec from the start. However Sun usually changes a spec if its implementation doesn't work according to it for some time. JNI spec is really old, it was written for 1.1 and the statement about exception still remains. Hi, IMHO our Compatibility guidelines, if the spec is not clear, we should follow RI. So no matter what happens to the spec(unless it describe the detail condition of exception-thrown), it is still OK to follow RI here, am I right? I am unsure if we want to allow this compatibility and a reason to allow it. When length is 0 the application still gets nothing except for clear exception status. There is no value in allowing this call except for allowing software which has a bug in it to work. On the other hand allowing start == length to pass violates the spec IMHO. I think it is better if software which uses this undocumented feature was fixed instead of introducing this workaround, so if others agree I think HARMONY-1156 could be closed. Well, I don't feel strongly either way, but am uncomfortable with the inconsistency. The JNI docs seem pretty sparse, and clearly some thought went into allowing : write( buff, buff.length, 0) The whole exception condition looks like this jsize length = GetArrayLength(env, array); jsize end = start + len; if(start 0 || start = length || end 0 || end length) { char msg[30]; sprintf(msg, %d..%d, start, end); ThrowNew_Quick(env, java/lang/ArrayIndexOutOfBoundsException, msg); return; } and it is easy to change start = length to start length if you ask for it. IMHO there's something wrong here. What will it do if len0 and length start+len 0 ? Shall it be: if(start 0 || start length || len 0 || end length)? And the next line shall be like: if (0 == len){ return; } I am still unsure if this is a place where spec should step away from the spec be it imcomplete or not. Programmers who don't work for Sun read public spec, don't they? [1] http://java.sun.com/docs/books/jni/html/jniTOC.html Still we should follow our Compatibility guidelines, right(For our goal of Harmony)? :) -- Best Regards! Jimmy, Jing Lv China Software Development Lab, IBM - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: svn commit: r431219 - in /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test: api/ impl/ java/org/apache/harmony/luni/tests/java/lang/
I agree it's not right time to re-layout test case right now, but actually LUNI is a different case, whose test layout is a littletoo confusing... For example, there is package name o.a.h.luni.tests.java.lang as well as o.a.h.tests.java.lang, IMHO, what ever methods we take at last, it's hard to understand what difference between them...further, there are another several packages named as tests.api.java.lang(it's worse before Nathan removed another two source folders), I myself always failed to find any test class at first try even in Eclipse(and it's nightmare if in explorer). So I believe some merge work is necessary, after all we must understand what's going on in that LUNI labyrinth before we apply any layout/metadata approach to it. Nathan Beyer wrote: -Original Message- From: Stepan Mishura [mailto:[EMAIL PROTECTED] Sent: Monday, August 14, 2006 6:36 AM To: harmony-dev Subject: Re: svn commit: r431219 - in /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test: api/ impl/ java/org/apache/harmony/luni/tests/java/lang/ Hi Nathan, I saw that you've changed tests layout (consolidated) tests in luni module. But I don't understand what the purpose for the change. Is this a first step for migrating to TestNG? (May be I missed something important - sorry for stupid question then.) No, I'm just trying to put all of the tests into what I would consider is a defacto standard src/test/java and src/test/resources. The actual goal of this consolidation is to pull together all of the duplicated tests and similar tests. This is reducing the test run time for luni and making patch creation/application much easier. At the same time, I've been cleaning up the tests so that those that don't run can be run and anything that doesn't run on a RI is fixed, so that it does. BTW did we agree on that we won't follow directory-based tests layout [1]? IMHO, not yet. IIRC we agreed that directory-based tests layout is not quite convenient for our needs and we'll try TestNG. But for me it doesn't mean that we'll migrate to TestNG for sure. Also I assume that mixed approach (directory-based layout + annotations) is possible. So it is not time for doing massive tests moves and merges. I've been watching the test layout/approach threads, but I haven't seen anything substantial fall out. I'm still waiting to see a simple and clear suggestion. In any case, the current state is, frankly, a bit of a mess and any cleanup can't hurt. Additionally, I was trying the separated directory layout to see what it's like and I can tell you first hand it's just not that great. It just adds complexity in the repository and the build script. This may be needed for some modules, but I don't see it as the norm. Also, I've been experimenting with just using plain-old JUnit TestSuites to separate pure-API tests from implementation tests and it works very well. It works equally well for creating a failing-tests test suite. It also seems to make the tests run much faster, but I'm not sure why; maybe it's because Ant doesn't search for all tests, it just runs the single test that's an aggregate. And the minor comment to the commit log. It says: remove unused folders. But there are a lot of other unrelated changes. Was it possible to make separate commits? This was a mistake. I accidentally committed extra files with that revision. Thanks, Stepan. [1] http://incubator.apache.org/harmony/subcomponents/classlibrary/testing.htm l -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, August 14, 2006 2:56 AM To: [EMAIL PROTECTED] Subject: svn commit: r431219 - in /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test: api/ impl/ java/org/apache/harmony/luni/tests/java/lang/ Author: ndbeyer Date: Sun Aug 13 12:55:54 2006 New Revision: 431219 URL: http://svn.apache.org/viewvc?rev=431219view=rev Log: remove unused folders Removed: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/impl/ Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/a pache/harmony/luni/tests/java/lang/DoubleTest.java incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/a pache/harmony/luni/tests/java/lang/SecurityManagerTest.java incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/a pache/harmony/luni/tests/java/lang/ThreadGroupTest.java Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/a pache/harmony/luni/tests/java/lang/DoubleTest.java URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/mod ules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/DoubleTest .java?rev=431219r1=431218r2=431219view=diff == ---
RE: [drlvm] src/test side-by-side with vm and build?
So, I presume there wouldn't be a huge problem with suggestions for adjusting the layout and using JUnit for the smoke tests. -Nathan -Original Message- From: Geir Magnusson Jr [mailto:[EMAIL PROTECTED] Sent: Monday, August 14, 2006 1:46 PM To: harmony-dev@incubator.apache.org Subject: Re: [drlvm] src/test side-by-side with vm and build? Zakirov, Salikh wrote: Hi, in the below commit Geir has added several dozens files under drlvm/trunk/src/test Since we have two directories on the top-level, build with build system, and vm with everything else (sources, tests, documentation), it seems very confusing to have 'src' directory at the top level. Yep - I just wanted to park them somewhere as I wanted to close the JIRAs that they came in. I thought that putting them in a conventional place like 'src/test' would cause a violent allergic reaction in people used to the unique innovation that is the DRLVM layout :) Some time ago DRLVM team had very hot debates on directory structure, and we ended up with following structure: drlvm/trunk + vm + vmcore + jitrino + ... (other components) + doc (documentation) + tests (tests) + include (header files) + build(build system) The tests that are now checked into src/test look like they are put to a wrong place. More correct place would be something like vm/tests/verifier Pavel, could you suggest a convenient place for your verifier tests? Actually, we need to come up with a real test framework for these, and hopefully pull the other tests out to join them. I thought I brought this up in a JIRA or note to the dev list. While we're talking about it, should we consider a fresh layout for DRLVM? Maybe we can switch to a make-based build at the same time... right now, the layout w/in vm/ is somewhat arbitrary : 1) There is an include directory in parallel with the modules vm/include/*.h 2) Some modules have their own include directories (vm/vmcore/include) 3) Some don't (vm/em) 4) Some modules have src near the top : vm/em/src 5) Some don't vm/tests/smoke/ 6) Some modules have strange branches by language deep in the path : vm/vmcore/src/kernel_classes /javasrc /native What do you think? geir - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [classlib][luni] Problem with java.io.OutputStream
On 8/15/06, Geir Magnusson Jr [EMAIL PROTECTED] wrote: When looking at HARMONY-1156, it became clear that our java.io.OutputStream isn't right. I'd like to make the following changes : Follow the spec so that an IndexOOBE is thrown when : a) offset is negative or b) len is negative or c) off + len buff.length So in the case of write( byte[count], count, 0); for any value of count = 0, then none of the conditions are true, and it should simply [quickly] return. Now, the spec says that if the array is null, then a NPE should be thrown, but this doesn't happen in the RI when len = 0. Yes. It's a common exception throw sequence of RI. Vladimir Ivanov has provided a util patch for such exception check, iirc. For detail, please refer to Harmony-942 ( http://issues.apache.org/jira/browse/HARMONY-942). Following code snippet is copied from Harmony-942 patch. Does it work for this problem? public static void assertArrayIndex(byte[] array, int offset, int length) { if (offset 0 || length 0) { throw new IndexOutOfBoundsException(Msg.getString(K0006)); } if ((long)offset+(long)length array.length) { throw new IndexOutOfBoundsException(Msg.getString(K00ae)); } } Of course, If long cast looks not elegant, we can change the code as following: if (offset array.length-length) . This seems to be a reasonable thing to do, and therefore I think that we should match the RI here, and not the spec. Comments? geir - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Andrew Zhang China Software Development Lab, IBM
Re: [jira] Created: (HARMONY-1176) [classlib][net] new java.net.ServerSocket( InetAddress address, int port ) throws NPE
In my environment it is OK too (WinXp). Seems, it is a local problem. thanks Vladimir C:\tmp\tmp17C:\jdk1.5.0_06\bin\java.exe -cp . -showversion test java version 1.5.0_06 Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode) Test done. Socket: Socket[addr=vivanov1-mobl/10.125.115.95,port=8080,localport=1283] C:\tmp\tmp17C:\jrockit-jdk1.5.0-windows-ia32\bin\java.exe -cp . -showversion test java version 1.5.0 Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64) BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC: System optimized over throughput (initial strategy singleparpar)) Test done. Socket: Socket[addr=vivanov1-mobl/10.125.115.95,port=8080,localport=1284] C:\tmp\tmp17C:\harmony\classlib1.5\deploy\jdk\jre\bin\java.exe -cp . -showversion test java version 1.5 (subset) (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable. Test done. Socket: Socket[addr=vivanov1-mobl/10.125.115.95,port=8080,localport=1285] C:\tmp\tmp17C:\harmony\drlvm1.5\build\win_ia32_msvc_debug\deploy\jre\bin\java -Dvm.assert_dialog=false -cp . -showversion test java version 1.5.0 pre-alpha : not complete or compatible svn = r431304, (Aug 14 2006), Windows/ia32/msvc 1310, debug build http://incubator.apache.org/harmony Test done. Socket: Socket[addr=vivanov1-mobl/10.125.115.95,port=8080,localport=1286] C:\tmp\tmp17C:\harmony\drlvm1.5\build\win_ia32_msvc_release\deploy\jre\bin\java -Dvm.assert_dialog=false -cp . -showversion test java version 1.5.0 pre-alpha : not complete or compatible svn = r431304, (Aug 14 2006), Windows/ia32/msvc 1310, release build http://incubator.apache.org/harmony Test done. Socket: Socket[addr=vivanov1-mobl/10.125.115.95,port=8080,localport=1287] On 8/15/06, Andrew Zhang [EMAIL PROTECTED] wrote: Hi Igor, I ran your test on windows, and seems everything is ok. Test output: (Harmony) Test done. Socket: Socket[addr=Harmony-zhanghz/9.181.106.94,port=8080,localport=1290] My environment: WindowsXP (SP2) + IBM j9 vm Thanks! On 8/14/06, Igor V. Stolyarov (JIRA) [EMAIL PROTECTED] wrote: [classlib][net] new java.net.ServerSocket( InetAddress address, int port ) throws NPE -- Key: HARMONY-1176 URL: http://issues.apache.org/jira/browse/HARMONY-1176 Project: Harmony Issue Type: Bug Reporter: Igor V. Stolyarov new java.net.ServerSocket( InetAddress address, int port ) throws NPE from native code Test-- import java.net.*; public class SocketTest { public static void main(String[] args) { try{ ServerSocket ss = new ServerSocket(8080, 50, InetAddress.getLocalHost()); Socket s = new Socket(InetAddress.getLocalHost(), 8080); System.out.println(Test done. Socket: +s); }catch(Exception e){ e.printStackTrace(); } } } Output--- JRockit: java version 1.5.0 Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64) BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC: System optimized over throughput (initial strategy singleparpar)) Test done. Socket: Socket[addr=ivstolya-mobl/10.125.132.107,port=8080,localport= 4701] Harmony: java version 1.5 (subset) (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as app licable. Unhandled exception Type=Segmentation error vmState=0x0004 J9Generic_Signal_Number=0004 ExceptionCode=c005 ExceptionAddress=7FE40F5 1 ContextFlags=0001003f Handler1=7FE50390 Handler2=7FD074F0 InaccessibleAddress= EDI= ESI=01578F00 EAX= EBX=0013F7A4 ECX= EDX=0020 EIP=7FE40F51 ESP=0013F70C EBP=0013F77C Module=c:\test\deploy\jre\bin\default\j9vm23.dll Module_base_address=7FE3 Offset_in_DLL=00010f51 Target=2_30_20060727_07300_lHdSMR (Windows XP 5.1 build 2600 Service Pack 2) CPU=x86 (1 logical CPUs) (0x7feec000 RAM) JavaVMInitArgs.nOptions=10: -Dcom.ibm.oti.vm.vmdir=c:\test\deploy\jre\bin\default\ -Dcom.ibm.oti.vm.exe=c:\test\deploy\jre\bin\java.exe -Dcom.ibm.oti.vm.bootstrap.library.path=c:\test\deploy\jre\bin ;c:\test\deplo y\jre\bin\default -Xbootclasspath/p:c:\test\deploy\jre\bin\default\luni-kernel.jar ;c:\test\dep loy\jre\bin\default\security-kernel.jar -Djava.home=c:\test\deploy\jre -Djava.library.path=c:\test\deploy\jre\bin\ ;.;c:\test\deploy\jre\bin\default ;C:\Program Files\Far;C:\Program Files\Intel\VTune\tcheck\bin;C:\Program Files\I ntel\VTune\CGGlbCache;C:\Program Files\Intel\VTune\Shared\Bin;C:\Program Files\C ommon Files\Intel\Shared
Re: [classlib][luni] Problem with java.io.OutputStream
Geir Magnusson Jr wrote: When looking at HARMONY-1156, it became clear that our java.io.OutputStream isn't right. I'd like to make the following changes : Follow the spec so that an IndexOOBE is thrown when : a) offset is negative or b) len is negative or c) off + len buff.length So in the case of write( byte[count], count, 0); for any value of count = 0, then none of the conditions are true, and it should simply [quickly] return. Now, the spec says that if the array is null, then a NPE should be thrown, but this doesn't happen in the RI when len = 0. This seems to be a reasonable thing to do, and therefore I think that we should match the RI here, and not the spec. Comments? Hi Geir, Sorry I don't catch well here. I write a test[1], extends OutputStream and try passing a null byte and len = 0, RI and Harmony both throw NPE(windows XP sp2, RI 1.5.06, the lastest Harmony,J9/DRLVM). And HARMONY-1156 only asks if given write( byte[count], count, 0); the write operation quickly returns. And we see it is better to fix in JNI, am I right? In fact, IMHO we are NOT breaking spec in return quickly as spec does not tell clear what indexes in the region is not valid? :) [1] public void test_OutputStream () throws IOException { try { new MockOutputStream().write(null, 0, 0); fail(should throw NPE); } catch (NullPointerException e) { // expected } } class MockOutputStream extends OutputStream { public void write(int oneByte) throws IOException { throw new NotYetImplementedException(); } } geir - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Best Regards! Jimmy, Jing Lv China Software Development Lab, IBM - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [DRLVM][JNI]GetByteArrayRegion differs from RI (was Re: Exceptions found while running servlet...)
Please correct me if I'm wrong, I thought what you mentioned as compatibility guideline is this[1], as the url shows, it's so far only classlib compatibility guideline, though I guess most of them makes sense for VM, but we may need some discussion to decide, let the VM developers speak for themselves on this issue. [1] http://incubator.apache.org/harmony/subcomponents/classlibrary/compat.html Jimmy, Jing Lv wrote: Gregory Shimansky wrote: On Monday 14 August 2006 23:37 Geir Magnusson Jr wrote: I've written a test [1] myself and cannot say I completely understand the result. With length = 0 RI 1.5 allows calling to GettypeArrayRegion with start equal to array length but throws AIOOBE if start is greater than array length. That makes sense to me, only because I am thinking of j.i.OutputStream's write([], int, int) method, which does state that it's ok if start + len == arraylen... It is not specified either, is it? I looked at the ObjectOutputStream.write(byte[], int, int) and didn't find any detailed description about allowed ranges. I'm sure if we thought about it, we'd figure out that it lends itself nicely to some common loop idiom. I suspect it will be some end case when some read returns an empty buffer, so write(buf, 0, 0) works without a check, or some situation where there's some post decrement leading you to write(buf, length, len) where the len was calculated from (buf.length - length) or something. Now, that isn't what the JNI spec says, but it seems like the JNI spec was written in a hurry... :) JNI spec is indeed quite incomplete when it comes to border cases. Sun wouldn't need to create a special book [1] (however this clarification doesn't clarify this particular case) for JNI clarification if they wrote a complete spec from the start. However Sun usually changes a spec if its implementation doesn't work according to it for some time. JNI spec is really old, it was written for 1.1 and the statement about exception still remains. Hi, IMHO our Compatibility guidelines, if the spec is not clear, we should follow RI. So no matter what happens to the spec(unless it describe the detail condition of exception-thrown), it is still OK to follow RI here, am I right? I am unsure if we want to allow this compatibility and a reason to allow it. When length is 0 the application still gets nothing except for clear exception status. There is no value in allowing this call except for allowing software which has a bug in it to work. On the other hand allowing start == length to pass violates the spec IMHO. I think it is better if software which uses this undocumented feature was fixed instead of introducing this workaround, so if others agree I think HARMONY-1156 could be closed. Well, I don't feel strongly either way, but am uncomfortable with the inconsistency. The JNI docs seem pretty sparse, and clearly some thought went into allowing : write( buff, buff.length, 0) The whole exception condition looks like this jsize length = GetArrayLength(env, array); jsize end = start + len; if(start 0 || start = length || end 0 || end length) { char msg[30]; sprintf(msg, %d..%d, start, end); ThrowNew_Quick(env, java/lang/ArrayIndexOutOfBoundsException, msg); return; } and it is easy to change start = length to start length if you ask for it. IMHO there's something wrong here. What will it do if len0 and length start+len 0 ? Shall it be: if(start 0 || start length || len 0 || end length)? And the next line shall be like: if (0 == len){ return; } I am still unsure if this is a place where spec should step away from the spec be it imcomplete or not. Programmers who don't work for Sun read public spec, don't they? [1] http://java.sun.com/docs/books/jni/html/jniTOC.html Still we should follow our Compatibility guidelines, right(For our goal of Harmony)? :) -- Paulex Yang China Software Development Lab IBM - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: svn commit: r431219 - in /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test: api/ impl/ java/org/apache/harmony/luni/tests/java/lang/
On 8/15/06, Nathan Beyer wrote: -Original Message- From: Stepan Mishura Sent: Monday, August 14, 2006 6:36 AM To: harmony-dev Subject: Re: svn commit: r431219 - in /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test: api/ impl/ java/org/apache/harmony/luni/tests/java/lang/ Hi Nathan, I saw that you've changed tests layout (consolidated) tests in luni module. But I don't understand what the purpose for the change. Is this a first step for migrating to TestNG? (May be I missed something important - sorry for stupid question then.) No, I'm just trying to put all of the tests into what I would consider is a defacto standard src/test/java and src/test/resources. The actual goal of this consolidation is to pull together all of the duplicated tests and similar tests. This is reducing the test run time for luni and making patch creation/application much easier. At the same time, I've been cleaning up the tests so that those that don't run can be run and anything that doesn't run on a RI is fixed, so that it does. I agree with that tests layout in luni module is really confusing and it should be fixed. But I'd follow tests layout proposal [1] or discuss it here how luni tests will be reorganizaed. For example, I don't understand moving tests from 'api' and 'impl' to 'java' folder - how implementation specific tests are differ from implementation independent tests now? I guess that implementation specific tests ends with 'ImplTest', right? But why they are running together with implementation independent tests? BTW did we agree on that we won't follow directory-based tests layout [1]? IMHO, not yet. IIRC we agreed that directory-based tests layout is not quite convenient for our needs and we'll try TestNG. But for me it doesn't mean that we'll migrate to TestNG for sure. Also I assume that mixed approach (directory-based layout + annotations) is possible. So it is not time for doing massive tests moves and merges. I've been watching the test layout/approach threads, but I haven't seen anything substantial fall out. I'm still waiting to see a simple and clear suggestion. In any case, the current state is, frankly, a bit of a mess and any cleanup can't hurt. Yes, I agree that clean up is required. But I'm not sure about changing tests layout. IMHO we should wait for results of tests layout/approach threads (Or it is possible to follow test layout proposal[1] - at least I'd follow section Package and class names for different types of the tests.) Additionally, I was trying the separated directory layout to see what it's like and I can tell you first hand it's just not that great. It just adds complexity in the repository and the build script. This may be needed for some modules, but I don't see it as the norm. Also, I've been experimenting with just using plain-old JUnit TestSuites to separate pure-API tests from implementation tests and it works very well. It works equally well for creating a failing-tests test suite. It also seems to make the tests run much faster, but I'm not sure why; maybe it's because Ant doesn't search for all tests, it just runs the single test that's an aggregate. And the minor comment to the commit log. It says: remove unused folders. But there are a lot of other unrelated changes. Was it possible to make separate commits? This was a mistake. I accidentally committed extra files with that revision. OK, no problem. Thanks, Stepan. [1] http://incubator.apache.org/harmony/subcomponents/classlibrary/testing.html -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, August 14, 2006 2:56 AM To: [EMAIL PROTECTED] Subject: svn commit: r431219 - in /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test: api/ impl/ java/org/apache/harmony/luni/tests/java/lang/ Author: ndbeyer Date: Sun Aug 13 12:55:54 2006 New Revision: 431219 URL: http://svn.apache.org/viewvc?rev=431219view=rev Log: remove unused folders Removed: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/impl/ Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/a pache/harmony/luni/tests/java/lang/DoubleTest.java incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/a pache/harmony/luni/tests/java/lang/SecurityManagerTest.java incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/a pache/harmony/luni/tests/java/lang/ThreadGroupTest.java Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/a pache/harmony/luni/tests/java/lang/DoubleTest.java URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/mod ules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/DoubleTest .java?rev=431219r1=431218r2=431219view=diff == ---
Re: [tools] Re: Keytool is done, JarSigner is next.
2006/8/14, Geir Magnusson Jr [EMAIL PROTECTED]: Mikhail Loenko wrote: Ok, sure. One thing that IMHO worth discussion is: By default the server tries to go to Sun's ssl provider: com.sun.net.ssl.internal.ssl.Provider Though it seems to be possibe to specify a custom provider by defining a property org.w3c.jigsaw.ssl.security.provider But to figure that out I had to grep Jigsaw sources Hm. What does jetty and tomcat do? The question is should we provide our own com.sun...Provider? You probably can guess my answer to this... It would look like this way: package com.sun.net.ssl.internal.ssl; import org.apache.harmony.xnet.provider.jsse.JSSEProvider; public class Provider extends JSSEProvider { } Thanks, Mikhail P.S. I was able to easily start Jigsaw HTTP server and navigate a bit. I used IBM VM+Harmony classlib What happens when you used DRLVM? I'm going to check. Acually I beleive it might be a bit too early to do app-driven bugfix in DRLVM. Though when running apps we find real-life bugs but it's easier to fix those bugs that are reproducoble on small code examples. Given that not all the classlib tests pass on DRLVM+classlib it might make sense to fix those failures and than switch to app-driven bugfix Thanks, Mikhail geir 2006/8/14, Geir Magnusson Jr [EMAIL PROTECTED]: Side note : Can you keep notes so that when you get things working, we can post to website as docs? geir Mikhail Loenko wrote: Hi Anton, I'm trying to run Jigsaw https server. I used Harmony keytool to generate keystore according to Jigsaw mans: keytool -genkey -alias troi.example.com -keypass example -keystore troi.keystore -keyalg RSA so far works OK keytool -selfcert -alias troi.example.com -keystore troi.keystore -keyalg RSA prints this error message: Enter keystore password: example java.security.NoSuchAlgorithmException: The algorithm MD5WithRSAEncryption is not found in the environment. at org.apache.harmony.tools.keytool.KeyCertGenerator.genX509CertImpl(Key CertGenerator.java:40) at org.apache.harmony.tools.keytool.KeyCertGenerator.selfCert(KeyCertGen erator.java:335) at org.apache.harmony.tools.keytool.Main.doWork(Main.java:78) at org.apache.harmony.tools.keytool.Main.run(Main.java:125) at org.apache.harmony.tools.keytool.Main.main(Main.java:141) Any idea how to solve this? Do we miss some functionality in Harmony? Thanks, Mikhail 2006/8/11, Geir Magnusson Jr [EMAIL PROTECTED]: 1) YAY! 2) No objections for jarsigner, but rather thanks and encouragement! 3) You may have been doing the following and I simply missed it, but I'd suggest that you keep a stream of patches coming on things like this so that people can see and get involved and also discuss more of your experience doing this on the list as it happens. 4) Can you add [tools] to your subject lines? :) geir Anton Rusanov wrote: I'm happy to write this - Keytool is done and operative now. :) It has the same functionality as the one from RI with some improvements. In addition to what RI can do the Harmony Keytool is able to * generate X.509 certificates v2, v3. * sign a certificate with another key from the keystore * generate and manage secret keys * convert a keystore to another format * check certificate revocation status * verify a certificate chain * use specific providers for various purposes. There is still a little problem with making an executable of the tool in the build. So you can follow the steps to make it on your own: 1. copy deploy\jdk\jre\bin\java.exe to deploy\jdk\jre\bin\keytool.exe 2. copy deploy\jdk\lib\tools.jar into deploy\jdk\jre\bin\ 3. run keytool.exe I want to thank Mikhail for applying my patches. I'm going to start work on JarSigner tool. Does anyone have objections to me doing this? - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -
Re: svn commit: r431219 - in /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test: api/ impl/ java/org/apache/harmony/luni/tests/java/lang/
On 8/15/06, Paulex Yang wrote: I agree it's not right time to re-layout test case right now, but actually LUNI is a different case, whose test layout is a littletoo confusing... I agree with you and Nathan that the layout is confusing. But how it should be changed? Currently we have only one complete proposal [1]. But the change doesn't follow it. Is this a new apporach for luni tests? Thanks, Stepan. [1] * http://incubator.apache.org/harmony/subcomponents/classlibrary/testing.html*http://incubator.apache.org/harmony/subcomponents/classlibrary/testing.html For example, there is package name o.a.h.luni.tests.java.lang as well as o.a.h.tests.java.lang, IMHO, what ever methods we take at last, it's hard to understand what difference between them...further, there are another several packages named as tests.api.java.lang(it's worse before Nathan removed another two source folders), I myself always failed to find any test class at first try even in Eclipse(and it's nightmare if in explorer). So I believe some merge work is necessary, after all we must understand what's going on in that LUNI labyrinth before we apply any layout/metadata approach to it. Nathan Beyer wrote: -Original Message- From: Stepan Mishura [mailto:[EMAIL PROTECTED] Sent: Monday, August 14, 2006 6:36 AM To: harmony-dev Subject: Re: svn commit: r431219 - in /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test: api/ impl/ java/org/apache/harmony/luni/tests/java/lang/ Hi Nathan, I saw that you've changed tests layout (consolidated) tests in luni module. But I don't understand what the purpose for the change. Is this a first step for migrating to TestNG? (May be I missed something important - sorry for stupid question then.) No, I'm just trying to put all of the tests into what I would consider is a defacto standard src/test/java and src/test/resources. The actual goal of this consolidation is to pull together all of the duplicated tests and similar tests. This is reducing the test run time for luni and making patch creation/application much easier. At the same time, I've been cleaning up the tests so that those that don't run can be run and anything that doesn't run on a RI is fixed, so that it does. BTW did we agree on that we won't follow directory-based tests layout [1]? IMHO, not yet. IIRC we agreed that directory-based tests layout is not quite convenient for our needs and we'll try TestNG. But for me it doesn't mean that we'll migrate to TestNG for sure. Also I assume that mixed approach (directory-based layout + annotations) is possible. So it is not time for doing massive tests moves and merges. I've been watching the test layout/approach threads, but I haven't seen anything substantial fall out. I'm still waiting to see a simple and clear suggestion. In any case, the current state is, frankly, a bit of a mess and any cleanup can't hurt. Additionally, I was trying the separated directory layout to see what it's like and I can tell you first hand it's just not that great. It just adds complexity in the repository and the build script. This may be needed for some modules, but I don't see it as the norm. Also, I've been experimenting with just using plain-old JUnit TestSuites to separate pure-API tests from implementation tests and it works very well. It works equally well for creating a failing-tests test suite. It also seems to make the tests run much faster, but I'm not sure why; maybe it's because Ant doesn't search for all tests, it just runs the single test that's an aggregate. And the minor comment to the commit log. It says: remove unused folders. But there are a lot of other unrelated changes. Was it possible to make separate commits? This was a mistake. I accidentally committed extra files with that revision. Thanks, Stepan. [1] http://incubator.apache.org/harmony/subcomponents/classlibrary/testing.htm l -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, August 14, 2006 2:56 AM To: [EMAIL PROTECTED] Subject: svn commit: r431219 - in /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test: api/ impl/ java/org/apache/harmony/luni/tests/java/lang/ Author: ndbeyer Date: Sun Aug 13 12:55:54 2006 New Revision: 431219 URL: http://svn.apache.org/viewvc?rev=431219view=rev Log: remove unused folders Removed: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/impl/ Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/a pache/harmony/luni/tests/java/lang/DoubleTest.java incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/a pache/harmony/luni/tests/java/lang/SecurityManagerTest.java incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/a pache/harmony/luni/tests/java/lang/ThreadGroupTest.java Modified:
Re: [DRLVM][JNI]GetByteArrayRegion differs from RI (was Re: Exceptions found while running servlet...)
Gregory Shimansky wrote: On Monday 14 August 2006 23:37 Geir Magnusson Jr wrote: I've written a test [1] myself and cannot say I completely understand the result. With length = 0 RI 1.5 allows calling to GettypeArrayRegion with start equal to array length but throws AIOOBE if start is greater than array length. That makes sense to me, only because I am thinking of j.i.OutputStream's write([], int, int) method, which does state that it's ok if start + len == arraylen... It is not specified either, is it? I looked at the ObjectOutputStream.write(byte[], int, int) and didn't find any detailed description about allowed ranges. I looked at java.io.OutputStream write() and it was clear (to me anyway...) I'm sure if we thought about it, we'd figure out that it lends itself nicely to some common loop idiom. I suspect it will be some end case when some read returns an empty buffer, so write(buf, 0, 0) works without a check, or some situation where there's some post decrement leading you to write(buf, length, len) where the len was calculated from (buf.length - length) or something. Now, that isn't what the JNI spec says, but it seems like the JNI spec was written in a hurry... :) JNI spec is indeed quite incomplete when it comes to border cases. Sun wouldn't need to create a special book [1] (however this clarification doesn't clarify this particular case) for JNI clarification if they wrote a complete spec from the start. However Sun usually changes a spec if its implementation doesn't work according to it for some time. JNI spec is really old, it was written for 1.1 and the statement about exception still remains. Yah, but like I said, it's a reasonable change, and it's consistent w/ the RI... I am unsure if we want to allow this compatibility and a reason to allow it. When length is 0 the application still gets nothing except for clear exception status. There is no value in allowing this call except for allowing software which has a bug in it to work. On the other hand allowing start == length to pass violates the spec IMHO. I think it is better if software which uses this undocumented feature was fixed instead of introducing this workaround, so if others agree I think HARMONY-1156 could be closed. Well, I don't feel strongly either way, but am uncomfortable with the inconsistency. The JNI docs seem pretty sparse, and clearly some thought went into allowing : write( buff, buff.length, 0) The whole exception condition looks like this jsize length = GetArrayLength(env, array); jsize end = start + len; if(start 0 || start = length || end 0 || end length) { char msg[30]; sprintf(msg, %d..%d, start, end); ThrowNew_Quick(env, java/lang/ArrayIndexOutOfBoundsException, msg); return; } and it is easy to change start = length to start length if you ask for it. but that's not right - a) if you believe that we should be like OutputStream, if start == length and len == 0 you should be ok b) if not, then start == length is wrong as it's not a valid value I am still unsure if this is a place where spec should step away from the spec be it imcomplete or not. Programmers who don't work for Sun read public spec, don't they? [1] http://java.sun.com/docs/books/jni/html/jniTOC.html Who uses JNI? :) geir - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [general] compatibility packages
Think Different! :) geir Alex Blewitt wrote: Bear in mind that this isn't standard across all VMs. For example, Mac VMs use JAVA_HOME/../Classes/classes.jar, instead of rt.jar. Alex. On 14/08/06, Geir Magnusson Jr [EMAIL PROTECTED] wrote: I assume for #1 we'll offer a patch :) Or just create an rt.jar if someone needs that. There is no reason not to... geir Anton Luht wrote: Hello, There's another issues on compatibility: some applications rely on the existence of JAVA_ROOT/lib/rt.jar - the example is [1]. Some require tools.jar [2]. Harmony doesn't have these jars now so applications can fail on it just because they're bound to the implementation specifics. [1] http://koders.com/java/fid94A9F615DBE6674BB9423D1DF67C8256605B5C24.aspx?s=rt.jar [2] http://koders.com/java/fidDE45C5B81C71D554A7E680A0E64FC1D564BA830A.aspx?s=tools.jar - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [tools] Re: Keytool is done, JarSigner is next.
On 8/15/06, Mikhail Loenko [EMAIL PROTECTED] wrote: 2006/8/14, Geir Magnusson Jr [EMAIL PROTECTED]: Mikhail Loenko wrote: What happens when you used DRLVM? I'm going to check. Acually I beleive it might be a bit too early to do app-driven bugfix in DRLVM. Though when running apps we find real-life bugs but it's easier to fix those bugs that are reproducoble on small code examples. Given that not all the classlib tests pass on DRLVM+classlib it might make sense to fix those failures and than switch to app-driven bugfix We have also 233 open issues in jira and 161 marked as bug. Seems, it should be resolved before the 'app-driven bugfix'. Thanks, Vladimir Thanks, Mikhail geir 2006/8/14, Geir Magnusson Jr [EMAIL PROTECTED]: Side note : Can you keep notes so that when you get things working, we can post to website as docs? geir Mikhail Loenko wrote: Hi Anton, I'm trying to run Jigsaw https server. I used Harmony keytool to generate keystore according to Jigsaw mans: keytool -genkey -alias troi.example.com -keypass example -keystore troi.keystore -keyalg RSA so far works OK keytool -selfcert -alias troi.example.com -keystore troi.keystore -keyalg RSA prints this error message: Enter keystore password: example java.security.NoSuchAlgorithmException: The algorithm MD5WithRSAEncryption is not found in the environment. at org.apache.harmony.tools.keytool.KeyCertGenerator.genX509CertImpl (Key CertGenerator.java:40) at org.apache.harmony.tools.keytool.KeyCertGenerator.selfCert (KeyCertGen erator.java:335) at org.apache.harmony.tools.keytool.Main.doWork(Main.java :78) at org.apache.harmony.tools.keytool.Main.run(Main.java:125) at org.apache.harmony.tools.keytool.Main.main(Main.java:141) Any idea how to solve this? Do we miss some functionality in Harmony? Thanks, Mikhail 2006/8/11, Geir Magnusson Jr [EMAIL PROTECTED]: 1) YAY! 2) No objections for jarsigner, but rather thanks and encouragement! 3) You may have been doing the following and I simply missed it, but I'd suggest that you keep a stream of patches coming on things like this so that people can see and get involved and also discuss more of your experience doing this on the list as it happens. 4) Can you add [tools] to your subject lines? :) geir Anton Rusanov wrote: I'm happy to write this - Keytool is done and operative now. :) It has the same functionality as the one from RI with some improvements. In addition to what RI can do the Harmony Keytool is able to * generate X.509 certificates v2, v3. * sign a certificate with another key from the keystore * generate and manage secret keys * convert a keystore to another format * check certificate revocation status * verify a certificate chain * use specific providers for various purposes. There is still a little problem with making an executable of the tool in the build. So you can follow the steps to make it on your own: 1. copy deploy\jdk\jre\bin\java.exe to deploy\jdk\jre\bin\keytool.exe 2. copy deploy\jdk\lib\tools.jar into deploy\jdk\jre\bin\ 3. run keytool.exe I want to thank Mikhail for applying my patches. I'm going to start work on JarSigner tool. Does anyone have objections to me doing this? - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: svn commit: r431219 - in /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test: api/ impl/ java/org/apache/harmony/luni/tests/java/lang/
-Original Message- From: Stepan Mishura [mailto:[EMAIL PROTECTED] Sent: Monday, August 14, 2006 10:00 PM To: harmony-dev@incubator.apache.org Subject: Re: svn commit: r431219 - in /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test: api/ impl/ java/org/apache/harmony/luni/tests/java/lang/ On 8/15/06, Nathan Beyer wrote: -Original Message- From: Stepan Mishura Sent: Monday, August 14, 2006 6:36 AM To: harmony-dev Subject: Re: svn commit: r431219 - in /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test: api/ impl/ java/org/apache/harmony/luni/tests/java/lang/ Hi Nathan, I saw that you've changed tests layout (consolidated) tests in luni module. But I don't understand what the purpose for the change. Is this a first step for migrating to TestNG? (May be I missed something important - sorry for stupid question then.) No, I'm just trying to put all of the tests into what I would consider is a defacto standard src/test/java and src/test/resources. The actual goal of this consolidation is to pull together all of the duplicated tests and similar tests. This is reducing the test run time for luni and making patch creation/application much easier. At the same time, I've been cleaning up the tests so that those that don't run can be run and anything that doesn't run on a RI is fixed, so that it does. I agree with that tests layout in luni module is really confusing and it should be fixed. But I'd follow tests layout proposal [1] or discuss it here how luni tests will be reorganizaed. For example, I don't understand moving tests from 'api' and 'impl' to 'java' folder - how implementation specific tests are differ from implementation independent tests now? I guess that implementation specific tests ends with 'ImplTest', right? But why they are running together with implementation independent tests? Right now and since the LUNI module has existed, there hasn't been any difference between API tests, impl tests or any other tests. The only separation there is now are tests that run and pass on classlib+j9 and those that are excluded. Even the tests that are in the tests.api package don't run on the RI -- it's about 50/50 right now. Note: there is ONE known implementation specific test, which I created and that's org.apache.harmony.luni.tests.java.lang.CharacterImplTest. If you look back in the version history, all of the tests were under src/test/java at one point. I rearranged the folder to try out the proposal, which is where the 'api' and 'impl' folders came from. I also modified the build.xml to setup the multiple tests runs and everything that was in 'src/test/java' and 'src/test/java/impl' was run considered a Harmony implementation test. I was waiting for a conclusion to come to the testing layout, but nothing has happened so far and I wanted to move ahead with cleaning up the mess that is currently the test case. As such, I decided to move forward with some of the testing proposal (the package naming convention) and just keep the folder layout simple by having just one folder. This greatly simplified the code layout as well as the build script. When an actual test scheme is finalized, we can move the tests to whatever folder is appropriate. SVN handles file and folder moves extremely well and tracks every change with ease. Right now, what I'm trying to do is: * Consolidate all LUNI tests into org.apache.harmony.luni.tests.**. * Get as many LUNI tests as possible to run on an RI JRE. Those that are specific implementation tests will be segregated. I'd say we'd be lucky if 50% of the tests that are API tests actually pass on an RI JRE. BTW did we agree on that we won't follow directory-based tests layout [1]? IMHO, not yet. IIRC we agreed that directory-based tests layout is not quite convenient for our needs and we'll try TestNG. But for me it doesn't mean that we'll migrate to TestNG for sure. Also I assume that mixed approach (directory-based layout + annotations) is possible. So it is not time for doing massive tests moves and merges. I've been watching the test layout/approach threads, but I haven't seen anything substantial fall out. I'm still waiting to see a simple and clear suggestion. In any case, the current state is, frankly, a bit of a mess and any cleanup can't hurt. Yes, I agree that clean up is required. But I'm not sure about changing tests layout. IMHO we should wait for results of tests layout/approach threads (Or it is possible to follow test layout proposal[1] - at least I'd follow section Package and class names for different types of the tests.) As I mentioned above, I am following the package and class naming conventions. In fact a majority of the changes have been to consolidate the duplicate tests into single tests under these naming conventions. Additionally, I was trying the
Re: [drlvm] src/test side-by-side with vm and build?
Salikh Zakirov wrote: Geir Magnusson Jr wrote: Yep - I just wanted to park them somewhere as I wanted to close the JIRAs that they came in. I thought that putting them in a conventional place like 'src/test' would cause a violent allergic reaction in people used to the unique innovation that is the DRLVM layout :) Okay, so here you are :) Actually, we need to come up with a real test framework for these, and hopefully pull the other tests out to join them. I agree. Concerning the test framework, we already have at least 3 on hands: 1) classic junit 2) smoke test runner (1 VM process per test), parse output stream for pass/fail, check the return status. Ant-based runner is in build system, and shell-based one just as easy to do 3) smoke test runner in 1 VM process, tests/smoke/Check.java, with the same semanics for pass/fail Generally, I think we should accept any tests, provided that the tests can be run as easy as 'build test' (or 'make check' or whatever that can be started by one button press). Well, yes - in which case we need a framework for the new tests in src/ as they didn't slot in to anything. While we're talking about it, should we consider a fresh layout for DRLVM? Remembering the flamewars when deciding on current one, I would suggest that we find a good reason first. A poor peace is better than a good war... That wasn't our flamewar... :) That was your flamewar Maybe we can switch to a make-based build at the same time... As far as I can tell from my experience, it is utterly unwise to do a build system change and directory layout change at the same time. A better approach would be start playing with a new build system while majority of the developers stay on the current one. And once the new system is in reasonable shape, plan a flag day to phase out the old system. I actually agree, but so we don't have a repeat visit to this little circle of hell, we should at least consider the build when designing the layout? right now, the layout w/in vm/ is somewhat arbitrary : In fact, you just have identified most of the cornerstones of the layout. ROTFL! 1) There is an include directory in parallel with the modules vm/include/*.h This is intentional. These are VM-wide internal interfaces that are used to communicate between pluggable VM components (VM Core, GC, JIT). This is mostly defines interfaces between DLLs. I understand that, but it shouldn't be peer with the architectural modules of the system. If it's a module, then it's a peer. if it's a resource, than make it clear. 2) Some modules have their own include directories (vm/vmcore/include) VM Core module is rather big, so it is split into several subcomponents. The vmcore/include directory is for internal interfaces of VM Core, such as exceptions. Note, that these interfaces are not exposed to DLL level. 3) Some don't (vm/em) Small modules do not require dividing into smaller subcomponents, thus do not have any module-wide include directories. But that would make life so much clearer - you want the module includes, go into $module/include Patterns and convention are you friends... 4) Some modules have src near the top : vm/em/src In fact, *all* modules are supposed to have src/ subdirectory. 5) Some don't vm/tests/smoke/ This is just tests, which are not considered as a module. Yet a peer to the modules (and the includes...) Patterns and convention ... 6) Some modules have strange branches by language deep in the path : vm/vmcore/src/kernel_classes /javasrc /native Again, this is intentional. It is used for separating java sources from c/c++ sources for modules that have both. Pure-language modules omit it. Crikey - how can you have anything standardized in the build then? it's just arbitrary, so there can be no shared code for each module? With patterns, then it's easy to do things, like group includes, sources, etc. What do you think? While I do not personally agree with some of the decisions, I think we have better things to do than to revise this structure without a good reason. I can come up with a good reason for everything I've mentioned. I think it would be much better to describe the decisions behind the current structure somewhere on the web or wiki. I could do it in a few days if someone else doesn't volunteer to do it before. That would be a good starting point, but I think it's the reason the build is so complicated. Laying things out in common patterns has tremendous upside - it's easy to understand where to find things in module B if you understand module A, for example. P.S. If it was up to me, I would put all sources of each module (DLL) into one directory, just like drlvm/trunk + vm + *.cpp *.c *.java + gc +
Re: [DRLVM][JNI]GetByteArrayRegion differs from RI (was Re: Exceptions found while running servlet...)
Gregory Shimansky wrote: On Monday 14 August 2006 23:37 Geir Magnusson Jr wrote: I've written a test [1] myself and cannot say I completely understand the result. With length = 0 RI 1.5 allows calling to GettypeArrayRegion with start equal to array length but throws AIOOBE if start is greater than array length. That makes sense to me, only because I am thinking of j.i.OutputStream's write([], int, int) method, which does state that it's ok if start + len == arraylen... It is not specified either, is it? I looked at the ObjectOutputStream.write(byte[], int, int) and didn't find any detailed description about allowed ranges. That's why the compatibility guidelines are developed on same issue for classlib[1]. I'm sure if we thought about it, we'd figure out that it lends itself nicely to some common loop idiom. I suspect it will be some end case when some read returns an empty buffer, so write(buf, 0, 0) works without a check, or some situation where there's some post decrement leading you to write(buf, length, len) where the len was calculated from (buf.length - length) or something. Now, that isn't what the JNI spec says, but it seems like the JNI spec was written in a hurry... :) JNI spec is indeed quite incomplete when it comes to border cases. Sun wouldn't need to create a special book [1] (however this clarification doesn't clarify this particular case) for JNI clarification if they wrote a complete spec from the start. Although I agree with you that Sun didn't show enough patience on spec writing, I don't believe any thorough specification can be written in native human language, if someone did, others probably refused to read only because of volume...so the way it is... However Sun usually changes a spec if its implementation doesn't work according to it for some time. JNI spec is really old, it was written for 1.1 and the statement about exception still remains. that's true, and that's why we need to pay more attention on RI's behavior... I am unsure if we want to allow this compatibility and a reason to allow it. When length is 0 the application still gets nothing except for clear exception status. There is no value in allowing this call except for allowing software which has a bug in it to work. On the other hand allowing start == length to pass violates the spec IMHO. I think it is better if software which uses this undocumented feature was fixed instead of introducing this workaround, so if others agree I think HARMONY-1156 could be closed. I'm not sure the border case should be considered same as undocumented feature. sun.* classes are undocumented features, but write(null, 0, -1) is just exceptional case. They are different because there is chance that we don't support sun.* classes without impairing our reputation, while we cannot refuse to handle the border case if we care about quality. Well, I don't feel strongly either way, but am uncomfortable with the inconsistency. The JNI docs seem pretty sparse, and clearly some thought went into allowing : write( buff, buff.length, 0) The whole exception condition looks like this jsize length = GetArrayLength(env, array); jsize end = start + len; if(start 0 || start = length || end 0 || end length) { char msg[30]; sprintf(msg, %d..%d, start, end); ThrowNew_Quick(env, java/lang/ArrayIndexOutOfBoundsException, msg); return; } and it is easy to change start = length to start length if you ask for it. I am still unsure if this is a place where spec should step away from the spec be it imcomplete or not. Programmers who don't work for Sun read public spec, don't they? Yes, they read spec, and they also write small test case to explore what happened for unspecified exceptional case, what exception RI throw when write(null, 0, 1)? NPE or IAE? if we don't write small test like them, we are doomed. [1] http://java.sun.com/docs/books/jni/html/jniTOC.html [1] http://incubator.apache.org/harmony/subcomponents/classlibrary/compat.html -- Paulex Yang China Software Development Lab IBM - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [drlvm] src/test side-by-side with vm and build?
No. Please. But keep in mind the stuff in src/ - how to build and wrap those in JUnit / TestNG geir Nathan Beyer wrote: So, I presume there wouldn't be a huge problem with suggestions for adjusting the layout and using JUnit for the smoke tests. -Nathan -Original Message- From: Geir Magnusson Jr [mailto:[EMAIL PROTECTED] Sent: Monday, August 14, 2006 1:46 PM To: harmony-dev@incubator.apache.org Subject: Re: [drlvm] src/test side-by-side with vm and build? Zakirov, Salikh wrote: Hi, in the below commit Geir has added several dozens files under drlvm/trunk/src/test Since we have two directories on the top-level, build with build system, and vm with everything else (sources, tests, documentation), it seems very confusing to have 'src' directory at the top level. Yep - I just wanted to park them somewhere as I wanted to close the JIRAs that they came in. I thought that putting them in a conventional place like 'src/test' would cause a violent allergic reaction in people used to the unique innovation that is the DRLVM layout :) Some time ago DRLVM team had very hot debates on directory structure, and we ended up with following structure: drlvm/trunk + vm + vmcore + jitrino + ... (other components) + doc (documentation) + tests (tests) + include (header files) + build(build system) The tests that are now checked into src/test look like they are put to a wrong place. More correct place would be something like vm/tests/verifier Pavel, could you suggest a convenient place for your verifier tests? Actually, we need to come up with a real test framework for these, and hopefully pull the other tests out to join them. I thought I brought this up in a JIRA or note to the dev list. While we're talking about it, should we consider a fresh layout for DRLVM? Maybe we can switch to a make-based build at the same time... right now, the layout w/in vm/ is somewhat arbitrary : 1) There is an include directory in parallel with the modules vm/include/*.h 2) Some modules have their own include directories (vm/vmcore/include) 3) Some don't (vm/em) 4) Some modules have src near the top : vm/em/src 5) Some don't vm/tests/smoke/ 6) Some modules have strange branches by language deep in the path : vm/vmcore/src/kernel_classes /javasrc /native What do you think? geir - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: svn commit: r431219 - in /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test: api/ impl/ java/org/apache/harmony/luni/tests/java/lang/
-Original Message- From: Stepan Mishura [mailto:[EMAIL PROTECTED] Sent: Monday, August 14, 2006 10:07 PM To: harmony-dev@incubator.apache.org Subject: Re: svn commit: r431219 - in /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test: api/ impl/ java/org/apache/harmony/luni/tests/java/lang/ On 8/15/06, Paulex Yang wrote: I agree it's not right time to re-layout test case right now, but actually LUNI is a different case, whose test layout is a littletoo confusing... I agree with you and Nathan that the layout is confusing. But how it should be changed? Currently we have only one complete proposal [1]. But the change doesn't follow it. Is this a new apporach for luni tests? Most of what I've done has little to do with layout. About 10% of the tests were NOT under the src/test/java folder. There just wasn't any value to having the other folders for this module, at least not yet, so I just backed up a bit and put ALL tests back under the one folder. The particular changes you've picked out are just minor moves. The majority of the work I've done is moving and fixing tests in packages tests.api to org.apache.harmony.luni.tests.**. Note, even though the packages say tests.api, the majority of them fail miserable when run on an RI JRE. -Nathan Thanks, Stepan. [1] * http://incubator.apache.org/harmony/subcomponents/classlibrary/testing.htm l*http://incubator.apache.org/harmony/subcomponents/classlibrary/testing. html For example, there is package name o.a.h.luni.tests.java.lang as well as o.a.h.tests.java.lang, IMHO, what ever methods we take at last, it's hard to understand what difference between them...further, there are another several packages named as tests.api.java.lang(it's worse before Nathan removed another two source folders), I myself always failed to find any test class at first try even in Eclipse(and it's nightmare if in explorer). So I believe some merge work is necessary, after all we must understand what's going on in that LUNI labyrinth before we apply any layout/metadata approach to it. Nathan Beyer wrote: -Original Message- From: Stepan Mishura [mailto:[EMAIL PROTECTED] Sent: Monday, August 14, 2006 6:36 AM To: harmony-dev Subject: Re: svn commit: r431219 - in /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test: api/ impl/ java/org/apache/harmony/luni/tests/java/lang/ Hi Nathan, I saw that you've changed tests layout (consolidated) tests in luni module. But I don't understand what the purpose for the change. Is this a first step for migrating to TestNG? (May be I missed something important - sorry for stupid question then.) No, I'm just trying to put all of the tests into what I would consider is a defacto standard src/test/java and src/test/resources. The actual goal of this consolidation is to pull together all of the duplicated tests and similar tests. This is reducing the test run time for luni and making patch creation/application much easier. At the same time, I've been cleaning up the tests so that those that don't run can be run and anything that doesn't run on a RI is fixed, so that it does. BTW did we agree on that we won't follow directory-based tests layout [1]? IMHO, not yet. IIRC we agreed that directory-based tests layout is not quite convenient for our needs and we'll try TestNG. But for me it doesn't mean that we'll migrate to TestNG for sure. Also I assume that mixed approach (directory-based layout + annotations) is possible. So it is not time for doing massive tests moves and merges. I've been watching the test layout/approach threads, but I haven't seen anything substantial fall out. I'm still waiting to see a simple and clear suggestion. In any case, the current state is, frankly, a bit of a mess and any cleanup can't hurt. Additionally, I was trying the separated directory layout to see what it's like and I can tell you first hand it's just not that great. It just adds complexity in the repository and the build script. This may be needed for some modules, but I don't see it as the norm. Also, I've been experimenting with just using plain-old JUnit TestSuites to separate pure-API tests from implementation tests and it works very well. It works equally well for creating a failing-tests test suite. It also seems to make the tests run much faster, but I'm not sure why; maybe it's because Ant doesn't search for all tests, it just runs the single test that's an aggregate. And the minor comment to the commit log. It says: remove unused folders. But there are a lot of other unrelated changes. Was it possible to make separate commits? This was a mistake. I accidentally committed extra files with that revision. Thanks, Stepan. [1]
Re: [tools] Re: Keytool is done, JarSigner is next.
Chicken... :) geir Mikhail Loenko wrote: 2006/8/14, Geir Magnusson Jr [EMAIL PROTECTED]: Mikhail Loenko wrote: Ok, sure. One thing that IMHO worth discussion is: By default the server tries to go to Sun's ssl provider: com.sun.net.ssl.internal.ssl.Provider Though it seems to be possibe to specify a custom provider by defining a property org.w3c.jigsaw.ssl.security.provider But to figure that out I had to grep Jigsaw sources Hm. What does jetty and tomcat do? The question is should we provide our own com.sun...Provider? You probably can guess my answer to this... It would look like this way: package com.sun.net.ssl.internal.ssl; import org.apache.harmony.xnet.provider.jsse.JSSEProvider; public class Provider extends JSSEProvider { } Thanks, Mikhail P.S. I was able to easily start Jigsaw HTTP server and navigate a bit. I used IBM VM+Harmony classlib What happens when you used DRLVM? I'm going to check. Acually I beleive it might be a bit too early to do app-driven bugfix in DRLVM. Though when running apps we find real-life bugs but it's easier to fix those bugs that are reproducoble on small code examples. Given that not all the classlib tests pass on DRLVM+classlib it might make sense to fix those failures and than switch to app-driven bugfix Thanks, Mikhail geir 2006/8/14, Geir Magnusson Jr [EMAIL PROTECTED]: Side note : Can you keep notes so that when you get things working, we can post to website as docs? geir Mikhail Loenko wrote: Hi Anton, I'm trying to run Jigsaw https server. I used Harmony keytool to generate keystore according to Jigsaw mans: keytool -genkey -alias troi.example.com -keypass example -keystore troi.keystore -keyalg RSA so far works OK keytool -selfcert -alias troi.example.com -keystore troi.keystore -keyalg RSA prints this error message: Enter keystore password: example java.security.NoSuchAlgorithmException: The algorithm MD5WithRSAEncryption is not found in the environment. at org.apache.harmony.tools.keytool.KeyCertGenerator.genX509CertImpl(Key CertGenerator.java:40) at org.apache.harmony.tools.keytool.KeyCertGenerator.selfCert(KeyCertGen erator.java:335) at org.apache.harmony.tools.keytool.Main.doWork(Main.java:78) at org.apache.harmony.tools.keytool.Main.run(Main.java:125) at org.apache.harmony.tools.keytool.Main.main(Main.java:141) Any idea how to solve this? Do we miss some functionality in Harmony? Thanks, Mikhail 2006/8/11, Geir Magnusson Jr [EMAIL PROTECTED]: 1) YAY! 2) No objections for jarsigner, but rather thanks and encouragement! 3) You may have been doing the following and I simply missed it, but I'd suggest that you keep a stream of patches coming on things like this so that people can see and get involved and also discuss more of your experience doing this on the list as it happens. 4) Can you add [tools] to your subject lines? :) geir Anton Rusanov wrote: I'm happy to write this - Keytool is done and operative now. :) It has the same functionality as the one from RI with some improvements. In addition to what RI can do the Harmony Keytool is able to * generate X.509 certificates v2, v3. * sign a certificate with another key from the keystore * generate and manage secret keys * convert a keystore to another format * check certificate revocation status * verify a certificate chain * use specific providers for various purposes. There is still a little problem with making an executable of the tool in the build. So you can follow the steps to make it on your own: 1. copy deploy\jdk\jre\bin\java.exe to deploy\jdk\jre\bin\keytool.exe 2. copy deploy\jdk\lib\tools.jar into deploy\jdk\jre\bin\ 3. run keytool.exe I want to thank Mikhail for applying my patches. I'm going to start work on JarSigner tool. Does anyone have objections to me doing this? - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use :
Re: [tools] Re: Keytool is done, JarSigner is next.
Hey! All I asked is what happened when we used our own software? It's not that an unreasonable question... geir Vladimir Ivanov wrote: On 8/15/06, Mikhail Loenko [EMAIL PROTECTED] wrote: 2006/8/14, Geir Magnusson Jr [EMAIL PROTECTED]: Mikhail Loenko wrote: What happens when you used DRLVM? I'm going to check. Acually I beleive it might be a bit too early to do app-driven bugfix in DRLVM. Though when running apps we find real-life bugs but it's easier to fix those bugs that are reproducoble on small code examples. Given that not all the classlib tests pass on DRLVM+classlib it might make sense to fix those failures and than switch to app-driven bugfix We have also 233 open issues in jira and 161 marked as bug. Seems, it should be resolved before the 'app-driven bugfix'. Thanks, Vladimir Thanks, Mikhail geir 2006/8/14, Geir Magnusson Jr [EMAIL PROTECTED]: Side note : Can you keep notes so that when you get things working, we can post to website as docs? geir Mikhail Loenko wrote: Hi Anton, I'm trying to run Jigsaw https server. I used Harmony keytool to generate keystore according to Jigsaw mans: keytool -genkey -alias troi.example.com -keypass example -keystore troi.keystore -keyalg RSA so far works OK keytool -selfcert -alias troi.example.com -keystore troi.keystore -keyalg RSA prints this error message: Enter keystore password: example java.security.NoSuchAlgorithmException: The algorithm MD5WithRSAEncryption is not found in the environment. at org.apache.harmony.tools.keytool.KeyCertGenerator.genX509CertImpl (Key CertGenerator.java:40) at org.apache.harmony.tools.keytool.KeyCertGenerator.selfCert (KeyCertGen erator.java:335) at org.apache.harmony.tools.keytool.Main.doWork(Main.java :78) at org.apache.harmony.tools.keytool.Main.run(Main.java:125) at org.apache.harmony.tools.keytool.Main.main(Main.java:141) Any idea how to solve this? Do we miss some functionality in Harmony? Thanks, Mikhail 2006/8/11, Geir Magnusson Jr [EMAIL PROTECTED]: 1) YAY! 2) No objections for jarsigner, but rather thanks and encouragement! 3) You may have been doing the following and I simply missed it, but I'd suggest that you keep a stream of patches coming on things like this so that people can see and get involved and also discuss more of your experience doing this on the list as it happens. 4) Can you add [tools] to your subject lines? :) geir Anton Rusanov wrote: I'm happy to write this - Keytool is done and operative now. :) It has the same functionality as the one from RI with some improvements. In addition to what RI can do the Harmony Keytool is able to * generate X.509 certificates v2, v3. * sign a certificate with another key from the keystore * generate and manage secret keys * convert a keystore to another format * check certificate revocation status * verify a certificate chain * use specific providers for various purposes. There is still a little problem with making an executable of the tool in the build. So you can follow the steps to make it on your own: 1. copy deploy\jdk\jre\bin\java.exe to deploy\jdk\jre\bin\keytool.exe 2. copy deploy\jdk\lib\tools.jar into deploy\jdk\jre\bin\ 3. run keytool.exe I want to thank Mikhail for applying my patches. I'm going to start work on JarSigner tool. Does anyone have objections to me doing this? - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL
RE: [drlvm] src/test side-by-side with vm and build?
We definitely need to do something. I spent the last few hours trying to build/add a smoke test for a patch [1] and have gotten absolutely no where. I had to change the smoke.test.xml file to compile against the JRE being built, so I could get it to compile, but after that I couldn't get it to PASS. I've given up for the moment. How do these tests work? Can't I just create a JUnit TestCase, drop it into a test folder and have it run against the JRE that was built? The smoke tests just seem like an ad hoc JUnit framework. Do we need that? -Nathan [1] http://issues.apache.org/jira/browse/HARMONY-1144 -Original Message- From: Geir Magnusson Jr [mailto:[EMAIL PROTECTED] Sent: Monday, August 14, 2006 10:31 PM To: harmony-dev@incubator.apache.org Subject: Re: [drlvm] src/test side-by-side with vm and build? No. Please. But keep in mind the stuff in src/ - how to build and wrap those in JUnit / TestNG geir Nathan Beyer wrote: So, I presume there wouldn't be a huge problem with suggestions for adjusting the layout and using JUnit for the smoke tests. -Nathan -Original Message- From: Geir Magnusson Jr [mailto:[EMAIL PROTECTED] Sent: Monday, August 14, 2006 1:46 PM To: harmony-dev@incubator.apache.org Subject: Re: [drlvm] src/test side-by-side with vm and build? Zakirov, Salikh wrote: Hi, in the below commit Geir has added several dozens files under drlvm/trunk/src/test Since we have two directories on the top-level, build with build system, and vm with everything else (sources, tests, documentation), it seems very confusing to have 'src' directory at the top level. Yep - I just wanted to park them somewhere as I wanted to close the JIRAs that they came in. I thought that putting them in a conventional place like 'src/test' would cause a violent allergic reaction in people used to the unique innovation that is the DRLVM layout :) Some time ago DRLVM team had very hot debates on directory structure, and we ended up with following structure: drlvm/trunk + vm + vmcore + jitrino + ... (other components) + doc (documentation) + tests (tests) + include (header files) + build(build system) The tests that are now checked into src/test look like they are put to a wrong place. More correct place would be something like vm/tests/verifier Pavel, could you suggest a convenient place for your verifier tests? Actually, we need to come up with a real test framework for these, and hopefully pull the other tests out to join them. I thought I brought this up in a JIRA or note to the dev list. While we're talking about it, should we consider a fresh layout for DRLVM? Maybe we can switch to a make-based build at the same time... right now, the layout w/in vm/ is somewhat arbitrary : 1) There is an include directory in parallel with the modules vm/include/*.h 2) Some modules have their own include directories (vm/vmcore/include) 3) Some don't (vm/em) 4) Some modules have src near the top : vm/em/src 5) Some don't vm/tests/smoke/ 6) Some modules have strange branches by language deep in the path : vm/vmcore/src/kernel_classes /javasrc /native What do you think? geir - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: svn commit: r431219 - in /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test: api/ impl/ java/org/apache/harmony/luni/tests/java/lang/
On 8/15/06, Nathan Beyer wrote: SNIP Right now and since the LUNI module has existed, there hasn't been any difference between API tests, impl tests or any other tests. The only separation there is now are tests that run and pass on classlib+j9 and those that are excluded. Even the tests that are in the tests.api package don't run on the RI -- it's about 50/50 right now. Note: there is ONE known implementation specific test, which I created and that's org.apache.harmony.luni.tests.java.lang.CharacterImplTest. If you look back in the version history, all of the tests were under src/test/java at one point. I rearranged the folder to try out the proposal, which is where the 'api' and 'impl' folders came from. I also modified the build.xml to setup the multiple tests runs and everything that was in 'src/test/java' and 'src/test/java/impl' was run considered a Harmony implementation test. I was waiting for a conclusion to come to the testing layout, but nothing has happened so far and I wanted to move ahead with cleaning up the mess that is currently the test case. As such, I decided to move forward with some of the testing proposal (the package naming convention) and just keep the folder layout simple by having just one folder. This greatly simplified the code layout as well as the build script. Sorry again, but I was a little bit confused. Because the reason for this radical (for me of course) change was not clear for me. So you completely disappointed with directory-based approach, right? When an actual test scheme is finalized, we can move the tests to whatever folder is appropriate. SVN handles file and folder moves extremely well and tracks every change with ease. Right now, what I'm trying to do is: * Consolidate all LUNI tests into org.apache.harmony.luni.tests.**. Agree. * Get as many LUNI tests as possible to run on an RI JRE. Those that are specific implementation tests will be segregated. I'd say we'd be lucky if 50% of the tests that are API tests actually pass on an RI JRE. Not clear how you are going to distinguish implementation specific and independent tests. By name? BWT, I was thinking about separating them by package. For example, 'o.a.h.luni.tests.api' - implementation independent tests 'o.a.h.luni.tests.impl' - harmony specific tests Then there will be no need in 'ImplTest' ending. Thanks, Stepan. BTW did we agree on that we won't follow directory-based tests layout [1]? IMHO, not yet. IIRC we agreed that directory-based tests layout is not quite convenient for our needs and we'll try TestNG. But for me it doesn't mean that we'll migrate to TestNG for sure. Also I assume that mixed approach (directory-based layout + annotations) is possible. So it is not time for doing massive tests moves and merges. I've been watching the test layout/approach threads, but I haven't seen anything substantial fall out. I'm still waiting to see a simple and clear suggestion. In any case, the current state is, frankly, a bit of a mess and any cleanup can't hurt. Yes, I agree that clean up is required. But I'm not sure about changing tests layout. IMHO we should wait for results of tests layout/approach threads (Or it is possible to follow test layout proposal[1] - at least I'd follow section Package and class names for different types of the tests.) As I mentioned above, I am following the package and class naming conventions. In fact a majority of the changes have been to consolidate the duplicate tests into single tests under these naming conventions. Additionally, I was trying the separated directory layout to see what it's like and I can tell you first hand it's just not that great. It just adds complexity in the repository and the build script. This may be needed for some modules, but I don't see it as the norm. Also, I've been experimenting with just using plain-old JUnit TestSuites to separate pure-API tests from implementation tests and it works very well. It works equally well for creating a failing-tests test suite. It also seems to make the tests run much faster, but I'm not sure why; maybe it's because Ant doesn't search for all tests, it just runs the single test that's an aggregate. And the minor comment to the commit log. It says: remove unused folders. But there are a lot of other unrelated changes. Was it possible to make separate commits? This was a mistake. I accidentally committed extra files with that revision. OK, no problem. Thanks, Stepan. [1] http://incubator.apache.org/harmony/subcomponents/classlibrary/testing.htm l -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, August 14, 2006 2:56 AM To: [EMAIL PROTECTED] Subject: svn commit: r431219 - in /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test: api/ impl/ java/org/apache/harmony/luni/tests/java/lang/ Author:
[classlib][luni] On RI, constructor of EnumMap -- EnumMap(ClassK keyType) throws unspecified NullPointerException
Hi All: Constructor of EnumMap -- EnumMap(ClassK keyType) behaves a little odd: I first synthesis an enum type with class body as below: enum color { blue{}, red{}, } Then constructs java.util.EnumMap(ClassK) using this Enum type: import java.util.EnumMap; public class ConstructEnumMap { enum color { blue{}, red{}, } enum fruit { apple, } @SuppressWarnings(unchecked) public static void main(String[] args) { new EnumMap(fruit.apple.getClass()); *new EnumMap(color.blue.getClass());* } } NullPointerException will be thrown out from the bolded line. While using enum type without a class body, no such exception will be thrown out. This behavior is unspecified on spec. IMO, this is a bug of RI. What is your opinion about this behavior? Best regards -- Spark Shen China Software Development Lab, IBM - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [tools] Re: Keytool is done, JarSigner is next.
The problem is in org.apache.harmony.crypto.utils.AlgNameMapper which fails to set the mapping of the mentioned algorithm name to its OID. I have filed a JIRA issue that fixes the problem. -- Thanks, Anton 2006/8/14, Mikhail Loenko [EMAIL PROTECTED]: Hi Anton, I'm trying to run Jigsaw https server. I used Harmony keytool to generate keystore according to Jigsaw mans: keytool -genkey -alias troi.example.com -keypass example -keystore troi.keystore -keyalg RSA so far works OK keytool -selfcert -alias troi.example.com -keystore troi.keystore -keyalg RSA prints this error message: Enter keystore password: example java.security.NoSuchAlgorithmException: The algorithm MD5WithRSAEncryption is not found in the environment. at org.apache.harmony.tools.keytool.KeyCertGenerator.genX509CertImpl(Key CertGenerator.java:40) at org.apache.harmony.tools.keytool.KeyCertGenerator.selfCert(KeyCertGen erator.java:335) at org.apache.harmony.tools.keytool.Main.doWork(Main.java:78) at org.apache.harmony.tools.keytool.Main.run(Main.java:125) at org.apache.harmony.tools.keytool.Main.main(Main.java:141) Any idea how to solve this? Do we miss some functionality in Harmony? Thanks, Mikhail 2006/8/11, Geir Magnusson Jr [EMAIL PROTECTED]: 1) YAY! 2) No objections for jarsigner, but rather thanks and encouragement! 3) You may have been doing the following and I simply missed it, but I'd suggest that you keep a stream of patches coming on things like this so that people can see and get involved and also discuss more of your experience doing this on the list as it happens. 4) Can you add [tools] to your subject lines? :) geir Anton Rusanov wrote: I'm happy to write this - Keytool is done and operative now. :) It has the same functionality as the one from RI with some improvements. In addition to what RI can do the Harmony Keytool is able to * generate X.509 certificates v2, v3. * sign a certificate with another key from the keystore * generate and manage secret keys * convert a keystore to another format * check certificate revocation status * verify a certificate chain * use specific providers for various purposes. There is still a little problem with making an executable of the tool in the build. So you can follow the steps to make it on your own: 1. copy deploy\jdk\jre\bin\java.exe to deploy\jdk\jre\bin\keytool.exe 2. copy deploy\jdk\lib\tools.jar into deploy\jdk\jre\bin\ 3. run keytool.exe I want to thank Mikhail for applying my patches. I'm going to start work on JarSigner tool. Does anyone have objections to me doing this? - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [tools] Re: Keytool is done, JarSigner is next.
:) Jigsaw works on DRLVM+classlib also Jetty does not work yet, looking... Thanks, Mikhail 2006/8/15, Geir Magnusson Jr [EMAIL PROTECTED]: Hey! All I asked is what happened when we used our own software? It's not that an unreasonable question... geir Vladimir Ivanov wrote: On 8/15/06, Mikhail Loenko [EMAIL PROTECTED] wrote: 2006/8/14, Geir Magnusson Jr [EMAIL PROTECTED]: Mikhail Loenko wrote: What happens when you used DRLVM? I'm going to check. Acually I beleive it might be a bit too early to do app-driven bugfix in DRLVM. Though when running apps we find real-life bugs but it's easier to fix those bugs that are reproducoble on small code examples. Given that not all the classlib tests pass on DRLVM+classlib it might make sense to fix those failures and than switch to app-driven bugfix We have also 233 open issues in jira and 161 marked as bug. Seems, it should be resolved before the 'app-driven bugfix'. Thanks, Vladimir Thanks, Mikhail geir 2006/8/14, Geir Magnusson Jr [EMAIL PROTECTED]: Side note : Can you keep notes so that when you get things working, we can post to website as docs? geir Mikhail Loenko wrote: Hi Anton, I'm trying to run Jigsaw https server. I used Harmony keytool to generate keystore according to Jigsaw mans: keytool -genkey -alias troi.example.com -keypass example -keystore troi.keystore -keyalg RSA so far works OK keytool -selfcert -alias troi.example.com -keystore troi.keystore -keyalg RSA prints this error message: Enter keystore password: example java.security.NoSuchAlgorithmException: The algorithm MD5WithRSAEncryption is not found in the environment. at org.apache.harmony.tools.keytool.KeyCertGenerator.genX509CertImpl (Key CertGenerator.java:40) at org.apache.harmony.tools.keytool.KeyCertGenerator.selfCert (KeyCertGen erator.java:335) at org.apache.harmony.tools.keytool.Main.doWork(Main.java :78) at org.apache.harmony.tools.keytool.Main.run(Main.java:125) at org.apache.harmony.tools.keytool.Main.main(Main.java:141) Any idea how to solve this? Do we miss some functionality in Harmony? Thanks, Mikhail 2006/8/11, Geir Magnusson Jr [EMAIL PROTECTED]: 1) YAY! 2) No objections for jarsigner, but rather thanks and encouragement! 3) You may have been doing the following and I simply missed it, but I'd suggest that you keep a stream of patches coming on things like this so that people can see and get involved and also discuss more of your experience doing this on the list as it happens. 4) Can you add [tools] to your subject lines? :) geir Anton Rusanov wrote: I'm happy to write this - Keytool is done and operative now. :) It has the same functionality as the one from RI with some improvements. In addition to what RI can do the Harmony Keytool is able to * generate X.509 certificates v2, v3. * sign a certificate with another key from the keystore * generate and manage secret keys * convert a keystore to another format * check certificate revocation status * verify a certificate chain * use specific providers for various purposes. There is still a little problem with making an executable of the tool in the build. So you can follow the steps to make it on your own: 1. copy deploy\jdk\jre\bin\java.exe to deploy\jdk\jre\bin\keytool.exe 2. copy deploy\jdk\lib\tools.jar into deploy\jdk\jre\bin\ 3. run keytool.exe I want to thank Mikhail for applying my patches. I'm going to start work on JarSigner tool. Does anyone have objections to me doing this? - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use :
Re: [drlvm] src/test side-by-side with vm and build?
Nathan Beyer wrote: We definitely need to do something. I spent the last few hours trying to build/add a smoke test for a patch [1] and have gotten absolutely no where. I had to change the smoke.test.xml file to compile against the JRE being built, so I could get it to compile, but after that I couldn't get it to PASS. I've given up for the moment. How do these tests work? Um - that's odd. I've just dropped tests in there and they just worked. Can't I just create a JUnit TestCase, drop it into a test folder and have it run against the JRE that was built? The smoke tests just seem like an ad hoc JUnit framework. Do we need that? Well, how about this - can you start a JUnit based framework in the src/ directory for now, and we can join things at some point? geir -Nathan [1] http://issues.apache.org/jira/browse/HARMONY-1144 -Original Message- From: Geir Magnusson Jr [mailto:[EMAIL PROTECTED] Sent: Monday, August 14, 2006 10:31 PM To: harmony-dev@incubator.apache.org Subject: Re: [drlvm] src/test side-by-side with vm and build? No. Please. But keep in mind the stuff in src/ - how to build and wrap those in JUnit / TestNG geir Nathan Beyer wrote: So, I presume there wouldn't be a huge problem with suggestions for adjusting the layout and using JUnit for the smoke tests. -Nathan -Original Message- From: Geir Magnusson Jr [mailto:[EMAIL PROTECTED] Sent: Monday, August 14, 2006 1:46 PM To: harmony-dev@incubator.apache.org Subject: Re: [drlvm] src/test side-by-side with vm and build? Zakirov, Salikh wrote: Hi, in the below commit Geir has added several dozens files under drlvm/trunk/src/test Since we have two directories on the top-level, build with build system, and vm with everything else (sources, tests, documentation), it seems very confusing to have 'src' directory at the top level. Yep - I just wanted to park them somewhere as I wanted to close the JIRAs that they came in. I thought that putting them in a conventional place like 'src/test' would cause a violent allergic reaction in people used to the unique innovation that is the DRLVM layout :) Some time ago DRLVM team had very hot debates on directory structure, and we ended up with following structure: drlvm/trunk + vm + vmcore + jitrino + ... (other components) + doc (documentation) + tests (tests) + include (header files) + build(build system) The tests that are now checked into src/test look like they are put to a wrong place. More correct place would be something like vm/tests/verifier Pavel, could you suggest a convenient place for your verifier tests? Actually, we need to come up with a real test framework for these, and hopefully pull the other tests out to join them. I thought I brought this up in a JIRA or note to the dev list. While we're talking about it, should we consider a fresh layout for DRLVM? Maybe we can switch to a make-based build at the same time... right now, the layout w/in vm/ is somewhat arbitrary : 1) There is an include directory in parallel with the modules vm/include/*.h 2) Some modules have their own include directories (vm/vmcore/include) 3) Some don't (vm/em) 4) Some modules have src near the top : vm/em/src 5) Some don't vm/tests/smoke/ 6) Some modules have strange branches by language deep in the path : vm/vmcore/src/kernel_classes /javasrc /native What do you think? geir - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [jira] Created: (HARMONY-1176) [classlib][net] new java.net.ServerSocket( InetAddress address, int port ) throws NPE
I've updated my local copy of svn and have rebuilt Harmony and I've had the same result. After that I've removed luni modul and rebuilt Harmony again and received correct result. May be it was problem with my local copy of luni modul. -- Igor V. Stolyarov Intel Middleware Products Division