author | michaelm |
Mon, 11 Nov 2013 16:06:16 +0000 | |
changeset 21644 | 12edcc716b48 |
parent 21621 | 3101c2e7e705 |
child 22965 | 78610fb00fff |
permissions | -rw-r--r-- |
21621
3101c2e7e705
8027881: test/java/net/URLPermission/nstest/LookupTest.java failing intermittently, output insufficient
michaelm
parents:
diff
changeset
|
1 |
#!/bin/sh |
3101c2e7e705
8027881: test/java/net/URLPermission/nstest/LookupTest.java failing intermittently, output insufficient
michaelm
parents:
diff
changeset
|
2 |
# |
3101c2e7e705
8027881: test/java/net/URLPermission/nstest/LookupTest.java failing intermittently, output insufficient
michaelm
parents:
diff
changeset
|
3 |
# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. |
3101c2e7e705
8027881: test/java/net/URLPermission/nstest/LookupTest.java failing intermittently, output insufficient
michaelm
parents:
diff
changeset
|
4 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3101c2e7e705
8027881: test/java/net/URLPermission/nstest/LookupTest.java failing intermittently, output insufficient
michaelm
parents:
diff
changeset
|
5 |
# |
3101c2e7e705
8027881: test/java/net/URLPermission/nstest/LookupTest.java failing intermittently, output insufficient
michaelm
parents:
diff
changeset
|
6 |
# This code is free software; you can redistribute it and/or modify it |
3101c2e7e705
8027881: test/java/net/URLPermission/nstest/LookupTest.java failing intermittently, output insufficient
michaelm
parents:
diff
changeset
|
7 |
# under the terms of the GNU General Public License version 2 only, as |
3101c2e7e705
8027881: test/java/net/URLPermission/nstest/LookupTest.java failing intermittently, output insufficient
michaelm
parents:
diff
changeset
|
8 |
# published by the Free Software Foundation. |
3101c2e7e705
8027881: test/java/net/URLPermission/nstest/LookupTest.java failing intermittently, output insufficient
michaelm
parents:
diff
changeset
|
9 |
# |
3101c2e7e705
8027881: test/java/net/URLPermission/nstest/LookupTest.java failing intermittently, output insufficient
michaelm
parents:
diff
changeset
|
10 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
3101c2e7e705
8027881: test/java/net/URLPermission/nstest/LookupTest.java failing intermittently, output insufficient
michaelm
parents:
diff
changeset
|
11 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
3101c2e7e705
8027881: test/java/net/URLPermission/nstest/LookupTest.java failing intermittently, output insufficient
michaelm
parents:
diff
changeset
|
12 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
3101c2e7e705
8027881: test/java/net/URLPermission/nstest/LookupTest.java failing intermittently, output insufficient
michaelm
parents:
diff
changeset
|
13 |
# version 2 for more details (a copy is included in the LICENSE file that |
3101c2e7e705
8027881: test/java/net/URLPermission/nstest/LookupTest.java failing intermittently, output insufficient
michaelm
parents:
diff
changeset
|
14 |
# accompanied this code). |
3101c2e7e705
8027881: test/java/net/URLPermission/nstest/LookupTest.java failing intermittently, output insufficient
michaelm
parents:
diff
changeset
|
15 |
# |
3101c2e7e705
8027881: test/java/net/URLPermission/nstest/LookupTest.java failing intermittently, output insufficient
michaelm
parents:
diff
changeset
|
16 |
# You should have received a copy of the GNU General Public License version |
3101c2e7e705
8027881: test/java/net/URLPermission/nstest/LookupTest.java failing intermittently, output insufficient
michaelm
parents:
diff
changeset
|
17 |
# 2 along with this work; if not, write to the Free Software Foundation, |
3101c2e7e705
8027881: test/java/net/URLPermission/nstest/LookupTest.java failing intermittently, output insufficient
michaelm
parents:
diff
changeset
|
18 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
3101c2e7e705
8027881: test/java/net/URLPermission/nstest/LookupTest.java failing intermittently, output insufficient
michaelm
parents:
diff
changeset
|
19 |
# |
3101c2e7e705
8027881: test/java/net/URLPermission/nstest/LookupTest.java failing intermittently, output insufficient
michaelm
parents:
diff
changeset
|
20 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
3101c2e7e705
8027881: test/java/net/URLPermission/nstest/LookupTest.java failing intermittently, output insufficient
michaelm
parents:
diff
changeset
|
21 |
# or visit www.oracle.com if you need additional information or have any |
3101c2e7e705
8027881: test/java/net/URLPermission/nstest/LookupTest.java failing intermittently, output insufficient
michaelm
parents:
diff
changeset
|
22 |
# questions. |
3101c2e7e705
8027881: test/java/net/URLPermission/nstest/LookupTest.java failing intermittently, output insufficient
michaelm
parents:
diff
changeset
|
23 |
# |
3101c2e7e705
8027881: test/java/net/URLPermission/nstest/LookupTest.java failing intermittently, output insufficient
michaelm
parents:
diff
changeset
|
24 |
|
3101c2e7e705
8027881: test/java/net/URLPermission/nstest/LookupTest.java failing intermittently, output insufficient
michaelm
parents:
diff
changeset
|
25 |
# @test |
3101c2e7e705
8027881: test/java/net/URLPermission/nstest/LookupTest.java failing intermittently, output insufficient
michaelm
parents:
diff
changeset
|
26 |
# @library /lib/testlibrary |
3101c2e7e705
8027881: test/java/net/URLPermission/nstest/LookupTest.java failing intermittently, output insufficient
michaelm
parents:
diff
changeset
|
27 |
# @compile -XDignore.symbol.file=true SimpleNameService.java |
3101c2e7e705
8027881: test/java/net/URLPermission/nstest/LookupTest.java failing intermittently, output insufficient
michaelm
parents:
diff
changeset
|
28 |
# LookupTest.java SimpleNameServiceDescriptor.java |
3101c2e7e705
8027881: test/java/net/URLPermission/nstest/LookupTest.java failing intermittently, output insufficient
michaelm
parents:
diff
changeset
|
29 |
# @run shell/timeout=50 lookup.sh |
3101c2e7e705
8027881: test/java/net/URLPermission/nstest/LookupTest.java failing intermittently, output insufficient
michaelm
parents:
diff
changeset
|
30 |
# |
21644
12edcc716b48
8028060: test/java/net/URLPermission/nstest/lookup.sh failing (win)
michaelm
parents:
21621
diff
changeset
|
31 |
|
12edcc716b48
8028060: test/java/net/URLPermission/nstest/lookup.sh failing (win)
michaelm
parents:
21621
diff
changeset
|
32 |
OS=`uname -s` |
12edcc716b48
8028060: test/java/net/URLPermission/nstest/lookup.sh failing (win)
michaelm
parents:
21621
diff
changeset
|
33 |
case ${OS} in |
12edcc716b48
8028060: test/java/net/URLPermission/nstest/lookup.sh failing (win)
michaelm
parents:
21621
diff
changeset
|
34 |
Windows_* | CYGWIN*) |
12edcc716b48
8028060: test/java/net/URLPermission/nstest/lookup.sh failing (win)
michaelm
parents:
21621
diff
changeset
|
35 |
PS=";" |
12edcc716b48
8028060: test/java/net/URLPermission/nstest/lookup.sh failing (win)
michaelm
parents:
21621
diff
changeset
|
36 |
FS="\\" |
12edcc716b48
8028060: test/java/net/URLPermission/nstest/lookup.sh failing (win)
michaelm
parents:
21621
diff
changeset
|
37 |
;; |
12edcc716b48
8028060: test/java/net/URLPermission/nstest/lookup.sh failing (win)
michaelm
parents:
21621
diff
changeset
|
38 |
*) |
12edcc716b48
8028060: test/java/net/URLPermission/nstest/lookup.sh failing (win)
michaelm
parents:
21621
diff
changeset
|
39 |
PS=":" |
12edcc716b48
8028060: test/java/net/URLPermission/nstest/lookup.sh failing (win)
michaelm
parents:
21621
diff
changeset
|
40 |
FS="/" |
12edcc716b48
8028060: test/java/net/URLPermission/nstest/lookup.sh failing (win)
michaelm
parents:
21621
diff
changeset
|
41 |
;; |
12edcc716b48
8028060: test/java/net/URLPermission/nstest/lookup.sh failing (win)
michaelm
parents:
21621
diff
changeset
|
42 |
esac |
12edcc716b48
8028060: test/java/net/URLPermission/nstest/lookup.sh failing (win)
michaelm
parents:
21621
diff
changeset
|
43 |
|
21621
3101c2e7e705
8027881: test/java/net/URLPermission/nstest/LookupTest.java failing intermittently, output insufficient
michaelm
parents:
diff
changeset
|
44 |
|
3101c2e7e705
8027881: test/java/net/URLPermission/nstest/LookupTest.java failing intermittently, output insufficient
michaelm
parents:
diff
changeset
|
45 |
port=`${TESTJAVA}/bin/java -cp ${TESTCLASSES} LookupTest -getport` |
3101c2e7e705
8027881: test/java/net/URLPermission/nstest/LookupTest.java failing intermittently, output insufficient
michaelm
parents:
diff
changeset
|
46 |
|
3101c2e7e705
8027881: test/java/net/URLPermission/nstest/LookupTest.java failing intermittently, output insufficient
michaelm
parents:
diff
changeset
|
47 |
cat << POLICY > policy |
3101c2e7e705
8027881: test/java/net/URLPermission/nstest/LookupTest.java failing intermittently, output insufficient
michaelm
parents:
diff
changeset
|
48 |
grant { |
3101c2e7e705
8027881: test/java/net/URLPermission/nstest/LookupTest.java failing intermittently, output insufficient
michaelm
parents:
diff
changeset
|
49 |
permission java.net.URLPermission "http://allowedAndFound.com:${port}/-", "*:*"; |
3101c2e7e705
8027881: test/java/net/URLPermission/nstest/LookupTest.java failing intermittently, output insufficient
michaelm
parents:
diff
changeset
|
50 |
permission java.net.URLPermission "http://allowedButNotfound.com:${port}/-", "*:*"; |
3101c2e7e705
8027881: test/java/net/URLPermission/nstest/LookupTest.java failing intermittently, output insufficient
michaelm
parents:
diff
changeset
|
51 |
permission java.io.FilePermission "<<ALL FILES>>", "read,write,delete"; |
3101c2e7e705
8027881: test/java/net/URLPermission/nstest/LookupTest.java failing intermittently, output insufficient
michaelm
parents:
diff
changeset
|
52 |
permission java.util.PropertyPermission "java.io.tmpdir", "read"; |
3101c2e7e705
8027881: test/java/net/URLPermission/nstest/LookupTest.java failing intermittently, output insufficient
michaelm
parents:
diff
changeset
|
53 |
|
3101c2e7e705
8027881: test/java/net/URLPermission/nstest/LookupTest.java failing intermittently, output insufficient
michaelm
parents:
diff
changeset
|
54 |
// needed for HttpServer |
3101c2e7e705
8027881: test/java/net/URLPermission/nstest/LookupTest.java failing intermittently, output insufficient
michaelm
parents:
diff
changeset
|
55 |
permission "java.net.SocketPermission" "localhost:1024-", "resolve,accept"; |
3101c2e7e705
8027881: test/java/net/URLPermission/nstest/LookupTest.java failing intermittently, output insufficient
michaelm
parents:
diff
changeset
|
56 |
}; |
3101c2e7e705
8027881: test/java/net/URLPermission/nstest/LookupTest.java failing intermittently, output insufficient
michaelm
parents:
diff
changeset
|
57 |
POLICY |
3101c2e7e705
8027881: test/java/net/URLPermission/nstest/LookupTest.java failing intermittently, output insufficient
michaelm
parents:
diff
changeset
|
58 |
|
21644
12edcc716b48
8028060: test/java/net/URLPermission/nstest/lookup.sh failing (win)
michaelm
parents:
21621
diff
changeset
|
59 |
${TESTJAVA}/bin/java -Djava.security.policy=file:./policy -Dsun.net.spi.nameservice.provider.1=simple,sun -cp ${TESTCLASSES}${PS}${TESTSRC} LookupTest -runtest ${port} |