This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Testsuite tweak for Solaris


Hi,

Solaris' false doesn't return 1 on exit:

"DESCRIPTION
     The true utility does nothing, successfully. The false util-
     ity does nothing, unsuccessfully. They are typically used in
     a shell script sh as:

     while true
     do
                 command
     done

     which executes command forever.

EXIT STATUS
     true has exit status  0.

     false always will exit with a non-zero value."


May I install the attached patch?


2005-01-03  Eric Botcazou  <ebotcazou@libertysurf.fr>

	* testsuite/libjava.lang/Process_4.java (Process_4): Expect only
	a non-zero exit status from 'false'.


-- 
Eric Botcazou
Index: testsuite/libjava.lang/Process_4.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/testsuite/libjava.lang/Process_4.java,v
retrieving revision 1.1
diff -u -r1.1 Process_4.java
--- testsuite/libjava.lang/Process_4.java	12 Aug 2004 16:24:56 -0000	1.1
+++ testsuite/libjava.lang/Process_4.java	3 Jan 2005 10:03:13 -0000
@@ -9,7 +9,8 @@
 	String[] a = { "false" };
 	Process p = r.exec(a);
 	int c = p.waitFor();
-	System.out.println(c == 1 ? "ok" : "bad");
+	// Solaris' false doesn't return 1
+	System.out.println(c != 0 ? "ok" : "bad");
       }
     catch (Exception ex)
       {

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]