summaryrefslogtreecommitdiff
path: root/java/openjdk6/files/patch-test
blob: 0824417df8ecebadbe27954f9a33ebd18c02782c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
--- jdk/test/TestEnv.java	2012-05-01 17:18:38.000000000 -0400
+++ jdk/test/TestEnv.java	2012-09-26 19:07:59.000000000 -0400
@@ -65,14 +65,14 @@
         // Reachable host with the following services running:
         // - echo service (port 7)
         // - day time port (port 13)
-        { "host", "javaweb.sfbay.sun.com"  },
+        { "host", "icedtea.classpath.org"  },
 
         // Reachable host that refuses connections to port 80
-        { "refusing_host", "jano1.sfbay.sun.com" },
+        { "refusing_host", "ns1.gnu.org" },
 
         // Reachable host that is of sufficient hops away that a connection
         // takes a while to be established (connect doesn't complete immediatly)
-        { "far_host", "irejano.ireland.sun.com" },
+        { "far_host", "developer.classpath.org" },
 
         // Hostname that cannot be resolved by named service
         { "unresovable_host", "blah-blah.blah-blah.blah" },
--- jdk/test/com/sun/management/OperatingSystemMXBean/TestTotalSwap.sh	2012-09-26 19:05:45.000000000 -0400
+++ jdk/test/com/sun/management/OperatingSystemMXBean/TestTotalSwap.sh	2012-09-26 19:07:59.000000000 -0400
@@ -72,6 +72,16 @@
    done
 }
 
+freebsd_swap_size()
+{
+   total_swap=0
+   for i in `/usr/sbin/swapinfo -k | awk '{print $2}' | grep -v blocks`
+   do
+      # swapinfo -k returns size in blocks of 1024 bytes.
+      total_swap=`expr $i \* 1024 + $total_swap`
+   done
+}
+
 # Test GetTotalSwapSpaceSize if we are running on Unix
 total_swap=0
 case `uname -s` in
@@ -80,7 +90,7 @@
        runOne GetTotalSwapSpaceSize $total_swap 
        ;;
      FreeBSD )
-       total_swap=`free -b | grep -i swap | awk '{print $2}'`
+       freebsd_swap_size
        runOne GetTotalSwapSpaceSize $total_swap 
        ;;
     * )
--- jdk/test/java/io/File/GetXSpace.java	2012-05-01 17:18:41.000000000 -0400
+++ jdk/test/java/io/File/GetXSpace.java	2012-09-26 19:07:59.000000000 -0400
@@ -49,7 +49,7 @@
     private static final String name = System.getProperty("os.name");
     private static final String dfFormat;
     static {
-        if (name.equals("SunOS") || name.equals("Linux")) {
+        if (name.equals("FreeBSD") || name.equals("SunOS") || name.equals("Linux")) {
             // FileSystem Total Used Available Use% MountedOn
             dfFormat = "([^\\s]+)\\s+(\\d+)\\s+\\d+\\s+(\\d+)\\s+\\d+%\\s+([^\\s]+)";
         } else if (name.startsWith("Windows")) {
--- jdk/test/java/lang/ProcessBuilder/Basic.java	2012-05-01 17:18:42.000000000 -0400
+++ jdk/test/java/lang/ProcessBuilder/Basic.java	2012-09-26 19:07:59.000000000 -0400
@@ -1096,7 +1096,7 @@
             String[] cmdp = childArgs.toArray(new String[childArgs.size()]);
             String[] envp = {"=ExitValue=3", "=C:=\\"};
             Process p = Runtime.getRuntime().exec(cmdp, envp);
-            String expected = Windows.is() ? "=C:=\\,=ExitValue=3," : "=C:=\\,";
+            String expected = Windows.is() ? "=C:=\\,=ExitValue=3," : "";
             equal(commandOutput(p), expected);
             if (Windows.is()) {
                 ProcessBuilder pb = new ProcessBuilder(childArgs);
--- jdk/test/java/lang/ProcessBuilder/Zombies.java	2012-05-01 17:18:42.000000000 -0400
+++ jdk/test/java/lang/ProcessBuilder/Zombies.java	2012-09-26 19:07:59.000000000 -0400
@@ -49,11 +49,11 @@
         } catch (IOException _) {/* OK */}
 
         try {
-            rt.exec("/bin/true", null, new File("no-such-dir"));
+            rt.exec("/usr/bin/true", null, new File("no-such-dir"));
             throw new Error("expected IOException not thrown");
         } catch (IOException _) {/* OK */}
 
-        rt.exec("/bin/true").waitFor();
+        rt.exec("/usr/bin/true").waitFor();
 
         // Count all the zombies that are children of this Java process
         final String[] zombieCounter = {
--- jdk/test/java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java	2012-05-01 17:18:43.000000000 -0400
+++ jdk/test/java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java	2012-09-26 19:07:59.000000000 -0400
@@ -79,7 +79,7 @@
         System.out.println("Test passed.");
     }
 
-    private static String LOAD_AVERAGE_TEXT = "load average:";
+    private static String LOAD_AVERAGE_TEXT = "load averages:";
     private static void checkLoadAvg() throws Exception {
         // Obtain load average from OS command
         ProcessBuilder pb = new ProcessBuilder("/usr/bin/uptime");
--- jdk/test/java/net/ServerSocket/AcceptCauseFileDescriptorLeak.java	2012-05-01 17:18:44.000000000 -0400
+++ jdk/test/java/net/ServerSocket/AcceptCauseFileDescriptorLeak.java	2012-09-26 19:07:59.000000000 -0400
@@ -79,7 +79,7 @@
      * on Windows, too.
      */
     private static int countOpenFD() {
-        File dirOfFD = new File("/proc/self/fd");
+        File dirOfFD = new File("/dev/fd");
         File[] fds = dirOfFD.listFiles();
 
         if (fds != null)
--- jdk/test/java/nio/channels/SocketChannel/LocalAddress.java	2012-05-01 17:18:45.000000000 -0400
+++ jdk/test/java/nio/channels/SocketChannel/LocalAddress.java	2012-09-26 19:07:59.000000000 -0400
@@ -40,7 +40,7 @@
         InetAddress bogus = InetAddress.getByName("0.0.0.0");
         SocketChannel sc = SocketChannel.open();
         InetSocketAddress saddr = new InetSocketAddress(
-            InetAddress.getByName(TestEnv.getProperty("host")), 23);
+            InetAddress.getByName(TestEnv.getProperty("host")), 7);
 
         //Test1: connect only
         sc.connect(saddr);
--- jdk/test/java/nio/channels/SocketChannel/Shutdown.java	2012-05-01 17:18:45.000000000 -0400
+++ jdk/test/java/nio/channels/SocketChannel/Shutdown.java	2012-09-26 19:07:59.000000000 -0400
@@ -35,7 +35,7 @@
 
     public static void main(String args[]) throws Exception {
         InetSocketAddress sa = new InetSocketAddress(
-            InetAddress.getByName(TestEnv.getProperty("host")), 23);
+            InetAddress.getByName(TestEnv.getProperty("host")), 7);
         SocketChannel sc = SocketChannel.open(sa);
         boolean before = sc.socket().isInputShutdown();
         sc.socket().shutdownInput();
--- jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/Launcher.c	2012-05-01 17:18:45.000000000 -0400
+++ jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/Launcher.c	2012-09-26 19:07:59.000000000 -0400
@@ -135,7 +135,7 @@
     }
     close(thisFd);
 
-    if ((dp = opendir("/proc/self/fd")) == NULL) {
+    if ((dp = opendir("/dev/fd")) == NULL) {
         _exit(-1);
     }
 
--- jdk/test/java/nio/charset/Charset/default.sh	2012-09-26 19:05:46.000000000 -0400
+++ jdk/test/java/nio/charset/Charset/default.sh	2012-09-26 19:07:59.000000000 -0400
@@ -76,22 +76,20 @@
 
 }
 
-go  en_US       iso-8859-1
-go  ja_JP.utf8  utf-8
-go  tr_TR       iso-8859-9
-go  C           us-ascii
+go  en_US            iso-8859-1
+go  ja_JP.UTF-8      utf-8
+go  tr_TR.ISO-8859-9 iso-8859-9
+go  C                iso-8859-1
 
+# FreeBSD
 if [ "$s" = FreeBSD ]; then
-  go  ja_JP        x-euc-jp-linux
-  go  ja_JP.eucjp  x-euc-jp-linux
-  go  ja_JP.ujis   x-euc-jp-linux
-  go  ja_JP.utf8   utf-8
+  go  ja_JP.eucJP    euc-jp
+  go  ja_JP.SJIS     shift_jis
 fi
 
 # Solaris
 if [ "$s" = SunOS ]; then
-  go  ja           x-eucjp-open
-  go  ja_JP.eucJP  x-eucjp-open
-  go  ja_JP.PCK    x-PCK
-  go  ja_JP.UTF-8  utf-8
+  go  ja             x-eucjp-open
+  go  ja_JP.eucJP    x-eucjp-open
+  go  ja_JP.PCK      x-PCK
 fi
--- jdk/test/sun/net/InetAddress/nameservice/dns/cname.sh	2012-09-26 19:05:47.000000000 -0400
+++ jdk/test/sun/net/InetAddress/nameservice/dns/cname.sh	2012-09-26 19:07:59.000000000 -0400
@@ -33,7 +33,7 @@
 
 # The host that we try to resolve
 
-HOST=webcache.sfbay.sun.com
+HOST=developer.classpath.org
 
 # fail gracefully if DNS is not configured or there 
 # isn't a CNAME record.
--- jdk/test/tools/pack200/MemoryAllocatorTest.java	2012-05-01 17:18:53.000000000 -0400
+++ jdk/test/tools/pack200/MemoryAllocatorTest.java	2012-09-26 19:07:59.000000000 -0400
@@ -81,6 +81,7 @@
 
     static final boolean debug = Boolean.getBoolean("MemoryAllocatorTest.Debug");
     static final boolean WINDOWS = System.getProperty("os.name").startsWith("Windows");
+    static final boolean FREEBSD = System.getProperty("os.name").startsWith("FreeBSD");
     static final boolean LINUX = System.getProperty("os.name").startsWith("Linux");
     static final boolean SIXTYFOUR_BIT = System.getProperty("sun.arch.data.model", "32").equals("64");
     static final private int NATIVE_EXPECTED_EXIT_CODE = (WINDOWS) ? -1 : 255;
@@ -425,7 +426,7 @@
          * the error message is not accurate for us to discern if the test
          * passes successfully.
          */
-        if (SIXTYFOUR_BIT && (LINUX || WINDOWS)) {
+        if (SIXTYFOUR_BIT && (FREEBSD || LINUX || WINDOWS)) {
             System.out.println("Warning: Windows/Linux 64bit tests passes vacuously");
             return;
         }
--- jdk/test/tools/pack200/Pack200Simple.sh	2012-09-26 19:05:49.000000000 -0400
+++ jdk/test/tools/pack200/Pack200Simple.sh	2012-09-26 19:07:59.000000000 -0400
@@ -134,7 +134,7 @@
   # A quick crc compare test to ensure a well formed zip
   # archive, this is a critical unpack200 behaviour.
 
-  unzip -t $jfName > ${jfName}.unzip.log 2>&1 
+  ${LOCALBASE}/bin/unzip -t $jfName > ${jfName}.unzip.log 2>&1 
   if [ $? != 0 ]; then
     errorOut "$jfName unzip -t test failed"
   fi