Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Musl
提交
70d1b9d4
T
Third Party Musl
项目概览
OpenHarmony
/
Third Party Musl
大约 1 年 前同步成功
通知
37
Star
125
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Musl
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
70d1b9d4
编写于
10月 18, 2022
作者:
O
openharmony_ci
提交者:
Gitee
10月 18, 2022
浏览文件
操作
浏览文件
下载
差异文件
!585 修复部分libc-test用例
Merge pull request !585 from maweiye/fix-libctest
上级
6931665e
d17074b7
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
13 addition
and
9 deletion
+13
-9
libc-test/src/functional/dlopen.c
libc-test/src/functional/dlopen.c
+2
-2
libc-test/src/functional/tls_align_dlopen.c
libc-test/src/functional/tls_align_dlopen.c
+4
-2
libc-test/src/functional/tls_init_dlopen.c
libc-test/src/functional/tls_init_dlopen.c
+4
-2
libc-test/src/regression/tls_get_new-dtv.c
libc-test/src/regression/tls_get_new-dtv.c
+1
-1
libc-test/test_template.gni
libc-test/test_template.gni
+2
-2
未找到文件。
libc-test/src/functional/dlopen.c
浏览文件 @
70d1b9d4
...
...
@@ -9,7 +9,7 @@ int main(int argc, char *argv[])
void
(
*
f
)(
void
);
char
buf
[
512
];
if
(
!
t_pathrel
(
buf
,
sizeof
buf
,
argv
[
0
],
"dlopen_dso.so"
))
{
if
(
!
t_pathrel
(
buf
,
sizeof
buf
,
argv
[
0
],
"
lib
dlopen_dso.so"
))
{
t_error
(
"failed to obtain relative path to dlopen_dso.so
\n
"
);
return
1
;
}
...
...
@@ -47,7 +47,7 @@ int main(int argc, char *argv[])
t_error
(
"reopened dso should have the same symbols, want %p, got %p
\n
"
,
i
,
i2
);
if
(
*
i2
!=
2
)
t_error
(
"reopened dso should have the same symbols, want i2==2, got i2==%d
\n
"
,
*
i2
);
if
(
dlclose
(
g
))
if
(
!
dlclose
(
g
))
t_error
(
"dlclose failed: %s
\n
"
,
dlerror
());
if
(
dlclose
(
h
))
t_error
(
"dlclose failed: %s
\n
"
,
dlerror
());
...
...
libc-test/src/functional/tls_align_dlopen.c
浏览文件 @
70d1b9d4
#include <dlfcn.h>
#include "test.h"
int
main
()
int
main
(
int
argc
,
char
*
argv
[]
)
{
int
i
;
void
*
h
;
...
...
@@ -11,8 +11,10 @@ int main()
unsigned
align
;
unsigned
long
addr
;
}
*
t
;
char
buf
[
512
];
h
=
dlopen
(
"src/functional/tls_align_dso.so"
,
RTLD_LAZY
);
t_pathrel
(
buf
,
sizeof
buf
,
argv
[
0
],
"libtls_align_dso.so"
);
h
=
dlopen
(
buf
,
RTLD_LAZY
);
if
(
!
h
)
t_error
(
"dlopen failed
\n
"
);
t
=
dlsym
(
h
,
"t"
);
...
...
libc-test/src/functional/tls_init_dlopen.c
浏览文件 @
70d1b9d4
...
...
@@ -2,13 +2,15 @@
#include <dlfcn.h>
#include "test.h"
int
main
()
int
main
(
int
argc
,
char
*
argv
[]
)
{
void
*
h
;
char
*
(
*
f
)(
void
);
char
*
s
;
char
buf
[
512
];
h
=
dlopen
(
"src/functional/tls_init_dso.so"
,
RTLD_NOW
|
RTLD_GLOBAL
);
t_pathrel
(
buf
,
sizeof
buf
,
argv
[
0
],
"libtls_init_dso.so"
);
h
=
dlopen
(
buf
,
RTLD_NOW
|
RTLD_GLOBAL
);
if
(
!
h
)
t_error
(
"dlopen failed: %s
\n
"
,
dlerror
());
f
=
dlsym
(
h
,
"gettls"
);
...
...
libc-test/src/regression/tls_get_new-dtv.c
浏览文件 @
70d1b9d4
...
...
@@ -29,7 +29,7 @@ int main()
for
(
i
=
0
;
i
<
N
;
i
++
)
T
(
!
pthread_create
(
td
+
i
,
0
,
start
,
0
));
T
(
mod
=
dlopen
(
"tls_get_new-dtv_dso.so"
,
RTLD_NOW
));
T
(
mod
=
dlopen
(
"
lib
tls_get_new-dtv_dso.so"
,
RTLD_NOW
));
pthread_barrier_wait
(
&
b
);
for
(
i
=
0
;
i
<
N
;
i
++
)
...
...
libc-test/test_template.gni
浏览文件 @
70d1b9d4
...
...
@@ -122,12 +122,12 @@ template("test_unittest") {
}
if (target_name == "tls_align") {
ldflags += [ "-Wl,-rpath=
src/functional
" ]
ldflags += [ "-Wl,-rpath=
./
" ]
libs += [ "//${root_out_dir}/${test_lib_dir}/libtls_align_dso.so" ]
}
if (target_name == "tls_init") {
ldflags += [ "-Wl,-rpath=
src/functional
" ]
ldflags += [ "-Wl,-rpath=
./
" ]
libs += [ "//${root_out_dir}/${test_lib_dir}/libtls_init_dso.so" ]
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录