harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apetre...@apache.org
Subject svn commit: r488749 - /harmony/enhanced/drlvm/trunk/vm/tests/kernel/java/lang/RuntimeTest.java
Date Tue, 19 Dec 2006 18:22:54 GMT
Author: apetrenko
Date: Tue Dec 19 10:22:53 2006
New Revision: 488749

URL: http://svn.apache.org/viewvc?view=rev&rev=488749
Log:
Regression test for HARMONY-920 "[classlib][drlvm] method Runtime.getRuntime().exec({null,
"cmd"}, env) lead to vm crash"
The issue is not reproducible on current sources.

Modified:
    harmony/enhanced/drlvm/trunk/vm/tests/kernel/java/lang/RuntimeTest.java

Modified: harmony/enhanced/drlvm/trunk/vm/tests/kernel/java/lang/RuntimeTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/kernel/java/lang/RuntimeTest.java?view=diff&rev=488749&r1=488748&r2=488749
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/kernel/java/lang/RuntimeTest.java (original)
+++ harmony/enhanced/drlvm/trunk/vm/tests/kernel/java/lang/RuntimeTest.java Tue Dec 19 10:22:53
2006
@@ -444,4 +444,26 @@
         }
         assertTrue("NullPointerException expected!", exception);
     }
+
+    /**
+     * Regression test for HARMONY-920 
+     */
+    public void test_execStrStr() throws Exception {
+        try {
+            String[] cmd = new String [] {null, "gcc"}; 
+            String[] env = new String[] {"aaa", "bbb"}; 
+            Runtime.getRuntime().exec(cmd, env); 
+            fail("1: exception expcected"); 
+        } catch (NullPointerException npe) {
+            //expected
+        }
+        try { 
+            String[] cmd = new String [] {"gcc", "-m"}; 
+            String[] env = new String[] {"aaa", null}; 
+            Runtime.getRuntime().exec(cmd, env); 
+            fail("2: exception expcected"); 
+        } catch (NullPointerException npe) {
+            //expected
+        } 
+    }
 }



Mime
View raw message