Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
39bd64c6
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
39bd64c6
编写于
3月 16, 2010
作者:
C
chegar
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6934923: test/java/net/ipv6tests/TcpTest.java hangs on Solaris 10
Reviewed-by: alanb
上级
5b92aa82
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
29 addition
and
12 deletion
+29
-12
test/java/net/ipv6tests/TcpTest.java
test/java/net/ipv6tests/TcpTest.java
+5
-3
test/java/net/ipv6tests/Tests.java
test/java/net/ipv6tests/Tests.java
+24
-9
未找到文件。
test/java/net/ipv6tests/TcpTest.java
浏览文件 @
39bd64c6
...
...
@@ -47,9 +47,11 @@ public class TcpTest extends Tests {
try
{
ia4any
=
InetAddress
.
getByName
(
"0.0.0.0"
);
ia6any
=
InetAddress
.
getByName
(
"::0"
);
int
scope
=
ia6addr
.
getScopeId
();
if
(
scope
!=
0
)
{
ia6bad
=
InetAddress
.
getByName
(
"fe80::1:2:3:4:5:6%"
+
scope
);
if
(
ia6addr
!=
null
)
{
int
scope
=
ia6addr
.
getScopeId
();
if
(
scope
!=
0
)
{
ia6bad
=
InetAddress
.
getByName
(
"fe80::1:2:3:4:5:6%"
+
scope
);
}
}
else
{
ia6bad
=
InetAddress
.
getByName
(
"fe80::1:2:3:4:5:6"
);
}
...
...
test/java/net/ipv6tests/Tests.java
浏览文件 @
39bd64c6
...
...
@@ -38,12 +38,25 @@ public class Tests {
OutputStream
o1
=
s1
.
getOutputStream
();
OutputStream
o2
=
s2
.
getOutputStream
();
s
impleWrite
(
o1
,
100
);
s
impleWrite
(
o2
,
200
);
s
tartSimpleWriter
(
"SimpleWriter-1"
,
o1
,
100
);
s
tartSimpleWriter
(
"SimpleWriter-2"
,
o2
,
200
);
simpleRead
(
i2
,
100
);
simpleRead
(
i1
,
200
);
}
static
void
startSimpleWriter
(
String
threadName
,
final
OutputStream
os
,
final
int
start
)
{
(
new
Thread
(
new
Runnable
()
{
public
void
run
()
{
try
{
simpleWrite
(
os
,
start
);
}
catch
(
Exception
e
)
{
unexpected
(
e
);
}
}},
threadName
)).
start
();
}
static
void
unexpected
(
Exception
e
)
{
System
.
out
.
println
(
"Unexcepted Exception: "
+
e
);
e
.
printStackTrace
();
}
/**
* Send a packet from s1 to s2 (ia2/s2.localPort) and check it
* Send a packet from s2 to s1 (ia1/s1.localPort) and check it
...
...
@@ -247,13 +260,15 @@ public class Tests {
}
private
NetworkInterface
getNextIf
()
{
while
(
ifs
.
hasMoreElements
())
{
NetworkInterface
nic
=
(
NetworkInterface
)
ifs
.
nextElement
();
try
{
if
(
nic
.
isUp
()
&&
!
nic
.
isLoopback
())
return
nic
;
}
catch
(
SocketException
e
)
{
// ignore
if
(
ifs
!=
null
)
{
while
(
ifs
.
hasMoreElements
())
{
NetworkInterface
nic
=
(
NetworkInterface
)
ifs
.
nextElement
();
try
{
if
(
nic
.
isUp
()
&&
!
nic
.
isLoopback
())
return
nic
;
}
catch
(
SocketException
e
)
{
// ignore
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录