Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Musl
提交
02a13aaa
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看板
提交
02a13aaa
编写于
7月 13, 2023
作者:
Y
yinchuang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Make exe can access ndk so
Issue:I7JT1E Signed-off-by:
N
yinchuang
<
yinchuang@huawei.com
>
上级
e932e671
变更
18
展开全部
隐藏空白更改
内联
并排
Showing
18 changed file
with
412 addition
and
247 deletion
+412
-247
libc-test/src/functional/BUILD.gn
libc-test/src/functional/BUILD.gn
+10
-0
libc-test/src/functional/dlopen.c
libc-test/src/functional/dlopen.c
+129
-0
libc-test/src/functional/dlopen_for_load_by_global_dso.c
libc-test/src/functional/dlopen_for_load_by_global_dso.c
+6
-0
libc-test/src/functional/dlopen_for_load_by_local_dso.c
libc-test/src/functional/dlopen_for_load_by_local_dso.c
+6
-0
libc-test/src/functional/dlopen_ns.c
libc-test/src/functional/dlopen_ns.c
+187
-235
libc-test/src/functional/dlopen_ns_dso.c
libc-test/src/functional/dlopen_ns_dso.c
+6
-0
libc-test/src/functional/dlopen_so_dep_dlopen_ns_dso.c
libc-test/src/functional/dlopen_so_dep_dlopen_ns_dso.c
+6
-0
libc-test/src/functionalext/dlns/BUILD.gn
libc-test/src/functionalext/dlns/BUILD.gn
+3
-1
libc-test/src/functionalext/dlns/dlns_test.h
libc-test/src/functionalext/dlns/dlns_test.h
+7
-1
porting/linux/user/config/ld-musl-namespace-aarch64-test.ini
porting/linux/user/config/ld-musl-namespace-aarch64-test.ini
+9
-3
porting/linux/user/config/ld-musl-namespace-aarch64.ini
porting/linux/user/config/ld-musl-namespace-aarch64.ini
+4
-0
porting/linux/user/config/ld-musl-namespace-arm-test.ini
porting/linux/user/config/ld-musl-namespace-arm-test.ini
+9
-3
porting/linux/user/config/ld-musl-namespace-arm.ini
porting/linux/user/config/ld-musl-namespace-arm.ini
+4
-0
porting/linux/user/config/ld-musl-namespace-x86_64-test.ini
porting/linux/user/config/ld-musl-namespace-x86_64-test.ini
+9
-3
porting/linux/user/config/ld-musl-namespace-x86_64.ini
porting/linux/user/config/ld-musl-namespace-x86_64.ini
+4
-0
scripts/runtest.sh
scripts/runtest.sh
+1
-1
scripts/runtest_Windows.bat
scripts/runtest_Windows.bat
+6
-0
scripts/runtest_linux.sh
scripts/runtest_linux.sh
+6
-0
未找到文件。
libc-test/src/functional/BUILD.gn
浏览文件 @
02a13aaa
...
...
@@ -22,6 +22,13 @@ group("functional_test") {
test_sharedlib("dlopen_ns_dso") {
}
test_sharedlib("dlopen_so_dep_dlopen_ns_dso") {
deps = [ ":dlopen_ns_dso" ]
}
test_sharedlib("dlopen_for_load_by_global_dso") {
}
test_sharedlib("dlopen_for_load_by_local_dso") {
}
test_sharedlib("dlopen_dso") {
}
test_sharedlib("dlclose_reset_dso") {
...
...
@@ -40,7 +47,10 @@ group("dso_shared") {
":atexit_dlclose_dso",
":dlclose_reset_dso",
":dlopen_dso",
":dlopen_for_load_by_global_dso",
":dlopen_for_load_by_local_dso",
":dlopen_ns_dso",
":dlopen_so_dep_dlopen_ns_dso",
":tls_align_dso",
":tls_init_dso",
]
...
...
libc-test/src/functional/dlopen.c
浏览文件 @
02a13aaa
#include <dlfcn.h>
#include "test.h"
#define SO_FOR_NO_DELETE "lib_for_no_delete.so"
#define SO_FOR_DLOPEN "lib_for_dlopen.so"
#define SO_LOAD_BY_LOCAL "libdlopen_for_load_by_local_dso.so"
#define SO_LOAD_BY_GLOBAL "libdlopen_for_load_by_global_dso.so"
typedef
void
(
*
TEST_PTR
)(
void
);
void
do_dlopen
(
const
char
*
name
,
int
mode
)
{
void
*
handle
=
dlopen
(
name
,
mode
);
if
(
!
handle
)
t_error
(
"dlopen(name=%s, mode=%d) failed: %s
\n
"
,
name
,
mode
,
dlerror
());
if
(
dlclose
(
handle
))
t_error
(
"dlclose %s failed : %s
\n
"
,
name
,
dlerror
());
}
void
dlopen_lazy
()
{
do_dlopen
(
SO_FOR_DLOPEN
,
RTLD_LAZY
);
}
void
dlopen_now
()
{
do_dlopen
(
SO_FOR_DLOPEN
,
RTLD_NOW
);
}
void
dlopen_global
()
{
do_dlopen
(
SO_FOR_DLOPEN
,
RTLD_GLOBAL
);
}
void
dlopen_local
()
{
do_dlopen
(
SO_FOR_DLOPEN
,
RTLD_LOCAL
);
}
void
dlopen_so_used_by_dlsym
()
{
void
*
handle1
=
dlopen
(
SO_LOAD_BY_LOCAL
,
RTLD_LOCAL
);
if
(
!
handle1
)
t_error
(
"dlopen(name=%s, mode=%d) failed: %s
\n
"
,
SO_LOAD_BY_LOCAL
,
RTLD_LOCAL
,
dlerror
());
// dlsym can't see the so which is loaded by RTLD_LOCAL.
TEST_PTR
for_local_ptr
=
dlsym
(
RTLD_DEFAULT
,
"for_local"
);
if
(
for_local_ptr
!=
NULL
)
{
t_error
(
"dlsym RTLD_LOCAL so(%s) should failed but get succeed.
\n
"
,
"for_local"
);
}
if
(
dlclose
(
handle1
))
t_error
(
"dlclose %s failed : %s
\n
"
,
SO_LOAD_BY_LOCAL
,
dlerror
());
void
*
handle2
=
dlopen
(
SO_LOAD_BY_GLOBAL
,
RTLD_GLOBAL
);
if
(
!
handle2
)
t_error
(
"dlopen(name=%s, mode=%d) failed: %s
\n
"
,
SO_LOAD_BY_GLOBAL
,
RTLD_LOCAL
,
dlerror
());
// dlsym can see the so which is loaded by RTLD_DEFAULT even without dependencies.
TEST_PTR
for_global_ptr
=
dlsym
(
RTLD_DEFAULT
,
"for_global"
);
if
(
!
for_global_ptr
)
{
t_error
(
"dlsym RTLD_GLOBAL so(%s) should succeed but get failed: %s
\n
"
,
"for_global"
,
dlerror
());
}
if
(
dlclose
(
handle2
))
t_error
(
"dlclose %s failed : %s
\n
"
,
SO_LOAD_BY_GLOBAL
,
dlerror
());
}
void
dlopen_nodelete_and_noload
()
{
void
*
handle1
=
dlopen
(
SO_FOR_NO_DELETE
,
RTLD_NODELETE
);
if
(
!
handle1
)
t_error
(
"dlopen(name=%s, mode=RTLD_NODELETE) failed: %s
\n
"
,
SO_FOR_NO_DELETE
,
dlerror
());
if
(
dlclose
(
handle1
))
t_error
(
"dlclose %s failed : %s
\n
"
,
SO_FOR_NO_DELETE
,
dlerror
());
void
*
handle2
=
dlopen
(
SO_FOR_NO_DELETE
,
RTLD_NOLOAD
);
if
(
!
handle2
)
t_error
(
"dlopen(name=%s, mode=RTLD_NOLOAD) failed: %s
\n
"
,
SO_FOR_NO_DELETE
,
dlerror
());
if
(
handle1
!=
handle2
)
{
t_error
(
"dlopen %s by RTLD_NODELETE but get different handle when dlopen by RTLD_NOLOAD again.
\n
"
,
SO_FOR_NO_DELETE
);
}
}
void
dlopen_dlclose
()
{
void
*
handle
=
dlopen
(
SO_FOR_DLOPEN
,
RTLD_LOCAL
);
if
(
!
handle
)
t_error
(
"dlopen(name=%s, mode=%d) failed: %s
\n
"
,
SO_FOR_DLOPEN
,
RTLD_LOCAL
,
dlerror
());
handle
=
dlopen
(
SO_FOR_DLOPEN
,
RTLD_LOCAL
);
if
(
!
handle
)
t_error
(
"dlopen(name=%s, mode=%d) failed: %s
\n
"
,
SO_FOR_DLOPEN
,
RTLD_LOCAL
,
dlerror
());
if
(
dlclose
(
handle
))
t_error
(
"dlclose %s failed : %s
\n
"
,
SO_FOR_DLOPEN
,
dlerror
());
// lib should still exist in memory.
handle
=
dlopen
(
SO_FOR_DLOPEN
,
RTLD_NOLOAD
);
if
(
!
handle
)
t_error
(
"dlopen(name=%s, mode=%d) failed: %s
\n
"
,
SO_FOR_DLOPEN
,
RTLD_LOCAL
,
dlerror
());
if
(
dlclose
(
handle
))
t_error
(
"dlclose %s failed : %s
\n
"
,
SO_FOR_DLOPEN
,
dlerror
());
// It need to do one more dlclose because call dlopen by RTLD_NOLOAD add reference counting.
if
(
dlclose
(
handle
))
t_error
(
"dlclose %s failed : %s
\n
"
,
SO_FOR_DLOPEN
,
dlerror
());
// dlopen and dlclose call counts match so the lib should not exist in memory.
handle
=
dlopen
(
SO_FOR_DLOPEN
,
RTLD_NOLOAD
);
if
(
handle
)
{
t_error
(
"dlopen(name=%s, mode=%d) failed: %s
\n
"
,
SO_FOR_DLOPEN
,
RTLD_LOCAL
,
dlerror
());
dlclose
(
handle
);
}
}
int
main
(
int
argc
,
char
*
argv
[])
{
void
*
h
,
*
g
;
...
...
@@ -51,5 +171,14 @@ int main(int argc, char *argv[])
t_error
(
"dlclose failed: %s
\n
"
,
dlerror
());
if
(
dlclose
(
h
))
t_error
(
"dlclose failed: %s
\n
"
,
dlerror
());
dlopen_lazy
();
dlopen_now
();
dlopen_global
();
dlopen_local
();
dlopen_so_used_by_dlsym
();
dlopen_nodelete_and_noload
();
dlopen_dlclose
();
return
t_status
;
}
libc-test/src/functional/dlopen_for_load_by_global_dso.c
0 → 100644
浏览文件 @
02a13aaa
int
i
=
1
;
void
for_global
(
void
)
{
i
++
;
}
\ No newline at end of file
libc-test/src/functional/dlopen_for_load_by_local_dso.c
0 → 100644
浏览文件 @
02a13aaa
int
i
=
1
;
void
for_local
(
void
)
{
i
++
;
}
\ No newline at end of file
libc-test/src/functional/dlopen_ns.c
浏览文件 @
02a13aaa
此差异已折叠。
点击以展开。
libc-test/src/functional/dlopen_ns_dso.c
浏览文件 @
02a13aaa
#include <stdio.h>
#include <dlfcn.h>
void
sayhello
()
{
printf
(
"hello world!
\n
"
);
}
void
*
call_dlopen
(
const
char
*
name
)
{
return
dlopen
(
name
,
RTLD_NOW
);
}
\ No newline at end of file
libc-test/src/functional/dlopen_so_dep_dlopen_ns_dso.c
0 → 100644
浏览文件 @
02a13aaa
extern
void
*
call_dlopen
(
const
char
*
name
);
void
*
call
(
const
char
*
name
)
{
return
call_dlopen
(
name
);
}
\ No newline at end of file
libc-test/src/functionalext/dlns/BUILD.gn
浏览文件 @
02a13aaa
...
...
@@ -37,7 +37,9 @@ ohos_executable("dlns_dlopen_test") {
"//third_party/musl/porting/linux/user/include",
"//third_party/musl/libc-test/src/common",
]
if (musl_arch == "arm") {
defines = [ "MUSL_ARM" ]
}
sources = [ "dlns_dlopen.c" ]
configs = [ "//third_party/musl/libc-test/src/common:config_runtest" ]
...
...
libc-test/src/functionalext/dlns/dlns_test.h
浏览文件 @
02a13aaa
...
...
@@ -41,8 +41,14 @@ static const char* dllName_inh_007 = "inherit_0700.so";
static
const
char
*
dllName_inh_008
=
"inherit_0800.so"
;
static
const
char
*
dllName_inh_011
=
"inherit_1100.so"
;
static
const
char
*
dllAcePath
=
"/system/lib/libace.z.so"
;
#if defined(MUSL_ARM)
static
const
char
*
dllAcePath
=
"/system/lib/platformsdk/libace.z.so"
;
static
const
char
*
dllDylibPath
=
"/system/lib/libstd.dylib.so"
;
#else
static
const
char
*
dllAcePath
=
"/system/lib64/platformsdk/libace.z.so"
;
static
const
char
*
dllDylibPath
=
"/system/lib64/libstd.dylib.so"
;
#endif
static
const
char
*
dllHashsysvPath
=
"/data/tests/libc-test/src/libdlopen_hash_sysv.so"
;
static
const
char
*
dllHashsysv
=
"libdlopen_hash_sysv.so"
;
static
const
char
*
dllFillRandom
=
"/data/tests/libc-test/src/libdlopen_fill_random.so"
;
...
...
porting/linux/user/config/ld-musl-namespace-aarch64-test.ini
浏览文件 @
02a13aaa
...
...
@@ -3,11 +3,17 @@
test
=
/data/tests/libc-test/src
[acquiescence]
namespace.default.lib.paths
=
/
system/lib64:/vendor/lib64:/vendor/lib64/chipsetsdk:/vendor/lib64/chipset-sdk:/system/lib64/ndk:/system/lib64/chipset-pub-sdk:/system/lib64/chipset-sdk:/system/lib64/platformsdk:/system/lib64/priv-platformsdk:/system/lib64/priv-module:/system/lib64/module:/system/lib64/module/data:/system/lib64/module/multimedia:/system/lib64/module/security:/system/lib:/vendor/lib:/system/lib/ndk
:/system/lib/chipset-pub-sdk:/system/lib/chipset-sdk:/system/lib/platformsdk:/system/lib/priv-platformsdk:/system/lib/priv-module:/system/lib/module:/system/lib/module/data:/system/lib/module/multimedia:/lib64:/lib:/usr/local/lib:/usr/lib:/lib64/platformsdk:/lib64/chipset-pub-sdk
namespace.default.asan.lib.paths
=
/system/lib64:/system/lib64/module:/vendor/lib64:/vendor/lib64/chipsetsdk:/vendor/lib64/chipset-sdk:/system/lib64/module/data:/system/lib64/module/multimedia:/system/lib64/module/security:/system/lib:/system/lib/module:/system/lib/module/data:/system/lib/module/multimedia:/lib64:/lib:/usr/local/lib:/usr/lib:/lib64/platformsdk:/lib64/chipset-pub-sdk
namespace.default.lib.paths
=
/
data/tests/libc-test/src:/system/lib64:/vendor/lib64:/vendor/lib64/chipsetsdk:/vendor/lib64/chipset-sdk:/system/lib64/chipset-pub-sdk:/system/lib64/chipset-sdk:/system/lib64/platformsdk:/system/lib64/priv-platformsdk:/system/lib64/priv-module:/system/lib64/module:/system/lib64/module/data:/system/lib64/module/multimedia:/system/lib64/module/security:/system/lib:/vendor/lib
:/system/lib/chipset-pub-sdk:/system/lib/chipset-sdk:/system/lib/platformsdk:/system/lib/priv-platformsdk:/system/lib/priv-module:/system/lib/module:/system/lib/module/data:/system/lib/module/multimedia:/lib64:/lib:/usr/local/lib:/usr/lib:/lib64/platformsdk:/lib64/chipset-pub-sdk
namespace.default.asan.lib.paths
=
/
data/tests/libc-test/src:/
system/lib64:/system/lib64/module:/vendor/lib64:/vendor/lib64/chipsetsdk:/vendor/lib64/chipset-sdk:/system/lib64/module/data:/system/lib64/module/multimedia:/system/lib64/module/security:/system/lib:/system/lib/module:/system/lib/module/data:/system/lib/module/multimedia:/lib64:/lib:/usr/local/lib:/usr/lib:/lib64/platformsdk:/lib64/chipset-pub-sdk
[test]
added.nslist
=
ns_no_allowed_libs,ns_normal,ns_wrong_lib_path,ns_wrong_allowed_path,for_inherit_A,for_inherit_AA,inherited_class,ns_separated_flase,ns_asan_lib_path,ns_asan_permit_path
added.nslist
=
ndk,ns_no_allowed_libs,ns_normal,ns_wrong_lib_path,ns_wrong_allowed_path,for_inherit_A,for_inherit_AA,inherited_class,ns_separated_flase,ns_asan_lib_path,ns_asan_permit_path
namespace.ndk.lib.paths
=
/system/lib64/ndk:/system/lib/ndk
namespace.default.inherits
=
ndk
namespace.default.inherit.ndk.shared.libs
=
allow_all_shared_libs
namespace.ndk.inherits
=
default
namespace.ndk.inherit.default.shared.libs
=
allow_all_shared_libs
#ns_no_allowed_libs ,allowed libs not configed
namespace.ns_no_allowed_libs.separated
=
true
...
...
porting/linux/user/config/ld-musl-namespace-aarch64.ini
浏览文件 @
02a13aaa
...
...
@@ -6,3 +6,7 @@
namespace.ndk.lib.paths
=
/system/lib64/ndk:/system/lib/ndk
namespace.default.lib.paths
=
/system/lib64:/vendor/lib64:/vendor/lib64/chipsetsdk:/vendor/lib64/chipset-sdk:/system/lib64/chipset-pub-sdk:/system/lib64/chipset-sdk:/system/lib64/platformsdk:/system/lib64/priv-platformsdk:/system/lib64/priv-module:/system/lib64/module:/system/lib64/module/data:/system/lib64/module/multimedia:/system/lib64/module/security:/system/lib:/vendor/lib:/system/lib/chipset-pub-sdk:/system/lib/chipset-sdk:/system/lib/platformsdk:/system/lib/priv-platformsdk:/system/lib/priv-module:/system/lib/module:/system/lib/module/data:/system/lib/module/multimedia:/lib64:/lib:/usr/local/lib:/usr/lib:/vendor/lib64/hw:/lib64/platformsdk:/lib64/chipset-pub-sdk
namespace.default.asan.lib.paths
=
/system/lib64:/system/lib64/module:/vendor/lib64:/vendor/lib64/chipsetsdk:/vendor/lib64/chipset-sdk:/system/lib64/module/data:/system/lib64/module/multimedia:/system/lib64/module/security:/system/lib:/system/lib/module:/system/lib/module/data:/system/lib/module/multimedia:/lib64:/lib:/usr/local/lib:/usr/lib:/vendor/lib64/hw:/lib64/platformsdk:/lib64/chipset-pub-sdk
namespace.default.inherits
=
ndk
namespace.default.inherit.ndk.shared.libs
=
allow_all_shared_libs
namespace.ndk.inherits
=
default
namespace.ndk.inherit.default.shared.libs
=
allow_all_shared_libs
\ No newline at end of file
porting/linux/user/config/ld-musl-namespace-arm-test.ini
浏览文件 @
02a13aaa
...
...
@@ -3,11 +3,17 @@
test
=
/data/tests/libc-test/src
[acquiescence]
namespace.default.lib.paths
=
/
system/lib:/vendor/lib:/vendor/lib/chipsetsdk:/vendor/lib/chipset-sdk:/system/lib/n
dk:/system/lib/chipset-pub-sdk:/system/lib/chipset-sdk:/system/lib/platformsdk:/system/lib/priv-platformsdk:/system/lib/priv-module:/system/lib/module:/system/lib/module/data:/system/lib/module/multimedia:/system/lib/module/security:/lib:/usr/local/lib:/usr/lib:/lib/platformsdk:/lib/chipset-pub-sdk
namespace.default.asan.lib.paths
=
/system/lib:/system/lib/module:/vendor/lib:/vendor/lib/chipsetsdk:/vendor/lib/chipset-sdk:/system/lib/module/data:/system/lib/module/multimedia:/system/lib/module/security:/lib:/usr/local/lib:/usr/lib:/lib/platformsdk:/lib/chipset-pub-sdk
namespace.default.lib.paths
=
/
data/tests/libc-test/src:/system/lib:/vendor/lib:/vendor/lib/chipsetsdk:/vendor/lib/chipset-s
dk:/system/lib/chipset-pub-sdk:/system/lib/chipset-sdk:/system/lib/platformsdk:/system/lib/priv-platformsdk:/system/lib/priv-module:/system/lib/module:/system/lib/module/data:/system/lib/module/multimedia:/system/lib/module/security:/lib:/usr/local/lib:/usr/lib:/lib/platformsdk:/lib/chipset-pub-sdk
namespace.default.asan.lib.paths
=
/
data/tests/libc-test/src:/
system/lib:/system/lib/module:/vendor/lib:/vendor/lib/chipsetsdk:/vendor/lib/chipset-sdk:/system/lib/module/data:/system/lib/module/multimedia:/system/lib/module/security:/lib:/usr/local/lib:/usr/lib:/lib/platformsdk:/lib/chipset-pub-sdk
[test]
added.nslist
=
ns_no_allowed_libs,ns_normal,ns_wrong_lib_path,ns_wrong_allowed_path,for_inherit_A,for_inherit_AA,inherited_class,ns_separated_flase,ns_asan_lib_path,ns_asan_permit_path
added.nslist
=
ndk,ns_no_allowed_libs,ns_normal,ns_wrong_lib_path,ns_wrong_allowed_path,for_inherit_A,for_inherit_AA,inherited_class,ns_separated_flase,ns_asan_lib_path,ns_asan_permit_path
namespace.ndk.lib.paths
=
/system/lib/ndk
namespace.default.inherits
=
ndk
namespace.default.inherit.ndk.shared.libs
=
allow_all_shared_libs
namespace.ndk.inherits
=
default
namespace.ndk.inherit.default.shared.libs
=
allow_all_shared_libs
#ns_no_allowed_libs ,allowed libs not configed
namespace.ns_no_allowed_libs.separated
=
true
...
...
porting/linux/user/config/ld-musl-namespace-arm.ini
浏览文件 @
02a13aaa
...
...
@@ -6,3 +6,7 @@
namespace.ndk.lib.paths
=
/system/lib/ndk
namespace.default.lib.paths
=
/system/lib:/vendor/lib:/vendor/lib/chipsetsdk:/vendor/lib/chipset-sdk:/system/lib/chipset-pub-sdk:/system/lib/chipset-sdk:/system/lib/platformsdk:/system/lib/priv-platformsdk:/system/lib/priv-module:/system/lib/module:/system/lib/module/data:/system/lib/module/multimedia:/system/lib/module/security:/lib:/usr/local/lib:/usr/lib:/lib/platformsdk:/lib/chipset-pub-sdk
namespace.default.asan.lib.paths
=
/system/lib:/system/lib/module:/vendor/lib:/vendor/lib/chipsetsdk:/vendor/lib/chipset-sdk:/system/lib/module/data:/system/lib/module/multimedia:/system/lib/module/security:/lib:/usr/local/lib:/usr/lib:/lib/platformsdk:/lib/chipset-pub-sdk
namespace.default.inherits
=
ndk
namespace.default.inherit.ndk.shared.libs
=
allow_all_shared_libs
namespace.ndk.inherits
=
default
namespace.ndk.inherit.default.shared.libs
=
allow_all_shared_libs
\ No newline at end of file
porting/linux/user/config/ld-musl-namespace-x86_64-test.ini
浏览文件 @
02a13aaa
...
...
@@ -3,11 +3,17 @@
test
=
/data/tests/libc-test/src
[acquiescence]
namespace.default.lib.paths
=
/
system/lib64:/vendor/lib64:/vendor/lib64/chipsetsdk:/vendor/lib64/chipset-sdk:/system/lib64/n
dk:/system/lib64/chipset-pub-sdk:/system/lib64/chipset-sdk:/system/lib64/platformsdk:/system/lib64/priv-platformsdk:/system/lib64/priv-module:/system/lib64/module:/system/lib64/module/data:/system/lib64/module/multimedia:/system/lib64/module/security:/lib64:/lib64/platformsdk:/lib64/chipset-pub-sdk
namespace.default.asan.lib.paths
=
/system/lib64:/system/lib64/module:/vendor/lib64:/vendor/lib64/chipsetsdk:/vendor/lib64/chipset-sdk:/system/lib64/module/data:/system/lib64/module/multimedia:/system/lib64/module/security:/lib64:/lib64/platformsdk:/lib64/chipset-pub-sdk
namespace.default.lib.paths
=
/
data/tests/libc-test/src:/system/lib64:/vendor/lib64:/vendor/lib64/chipsetsdk:/vendor/lib64/chipset-s
dk:/system/lib64/chipset-pub-sdk:/system/lib64/chipset-sdk:/system/lib64/platformsdk:/system/lib64/priv-platformsdk:/system/lib64/priv-module:/system/lib64/module:/system/lib64/module/data:/system/lib64/module/multimedia:/system/lib64/module/security:/lib64:/lib64/platformsdk:/lib64/chipset-pub-sdk
namespace.default.asan.lib.paths
=
/
data/tests/libc-test/src:/
system/lib64:/system/lib64/module:/vendor/lib64:/vendor/lib64/chipsetsdk:/vendor/lib64/chipset-sdk:/system/lib64/module/data:/system/lib64/module/multimedia:/system/lib64/module/security:/lib64:/lib64/platformsdk:/lib64/chipset-pub-sdk
[test]
added.nslist
=
ns_no_allowed_libs,ns_normal,ns_wrong_lib_path,ns_wrong_allowed_path,for_inherit_A,for_inherit_AA,inherited_class,ns_separated_flase,ns_asan_lib_path,ns_asan_permit_path
added.nslist
=
ndk,ns_no_allowed_libs,ns_normal,ns_wrong_lib_path,ns_wrong_allowed_path,for_inherit_A,for_inherit_AA,inherited_class,ns_separated_flase,ns_asan_lib_path,ns_asan_permit_path
namespace.ndk.lib.paths
=
/system/lib/ndk
namespace.default.inherits
=
ndk
namespace.default.inherit.ndk.shared.libs
=
allow_all_shared_libs
namespace.ndk.inherits
=
default
namespace.ndk.inherit.default.shared.libs
=
allow_all_shared_libs
#ns_no_allowed_libs ,allowed libs not configed
namespace.ns_no_allowed_libs.separated
=
true
...
...
porting/linux/user/config/ld-musl-namespace-x86_64.ini
浏览文件 @
02a13aaa
...
...
@@ -6,3 +6,7 @@
namespace.ndk.lib.paths
=
/system/lib64/ndk:/system/lib/ndk
namespace.default.lib.paths
=
/system/lib64:/vendor/lib64:/vendor/lib64/chipsetsdk:/vendor/lib64/chipset-sdk:/system/lib64/chipset-pub-sdk:/system/lib64/chipset-sdk:/system/lib64/platformsdk:/system/lib64/priv-platformsdk:/system/lib64/priv-module:/system/lib64/module:/system/lib64/module/data:/system/lib64/module/multimedia:/system/lib64/module/security:/lib64:/lib64/platformsdk:/lib64/chipset-pub-sdk
namespace.default.asan.lib.paths
=
/system/lib64:/system/lib64/module:/vendor/lib64:/vendor/lib64/chipsetsdk:/vendor/lib64/chipset-sdk:/system/lib64/module/data:/system/lib64/module/multimedia:/system/lib64/module/security:/lib64:/lib64/platformsdk:/lib64/chipset-pub-sdk
namespace.default.inherits
=
ndk
namespace.default.inherit.ndk.shared.libs
=
allow_all_shared_libs
namespace.ndk.inherits
=
default
namespace.ndk.inherit.default.shared.libs
=
allow_all_shared_libs
\ No newline at end of file
scripts/runtest.sh
浏览文件 @
02a13aaa
...
...
@@ -37,7 +37,7 @@ ShieldedList=("trace_stresstest" "syslog" "vsyslog" "runtest"
"acoshl"
"asinhl"
"erfcl"
"fenv"
"fma"
"fmaf"
"fmal"
"lgammal"
"nearbyint"
"nearbyintf"
"nearbyintl"
"rint"
"rintf"
"rintl"
"sqrt"
"sqrtf"
"sqrtl"
"tgammal"
#TODO-arm32
"
dlopen_ns"
"
malloc-brk-fail"
"pthread_cancel"
"res_send"
"malloc-brk-fail"
"pthread_cancel"
"res_send"
)
#TODO-aarch64
...
...
scripts/runtest_Windows.bat
浏览文件 @
02a13aaa
...
...
@@ -82,6 +82,12 @@ hdc shell cp %REMOTE%/src/libdlopen_dso.so %REMOTE%/src/inherit_0700.so
hdc
shell
cp
%REMOTE%
/src/libdlopen
_dso.so
%REMOTE%
/src/inherit
_0800.so
hdc
shell
cp
%REMOTE%
/src/libdlopen
_dso.so
%REMOTE%
/src/inherit
_1100.so
hdc
shell
cp
%REMOTE%
/src/libdlopen
_ns_dso.so
/system/lib
hdc
shell
cp
%REMOTE%
/src/libdlopen
_dso.so
%REMOTE%
/src/lib
_for_no_delete.so
hdc
shell
cp
%REMOTE%
/src/libdlopen
_dso.so
%REMOTE%
/src/lib
_for_dlopen.so
hdc
shell
cp
%REMOTE%
/src/libdlopen
_ns_dso.so
/system/lib
64
/libdlopen
_ns_dso_sys.so
hdc
shell
cp
%REMOTE%
/src/libdlopen
_ns_dso.so
/system/lib/libdlopen
_ns_dso_sys.so
hdc
shell
cp
%REMOTE%
/src/libdlopen
_ns_dso.so
/system/lib
64
/ndk/libdlopen
_ns_dso_ndk.so
hdc
shell
cp
%REMOTE%
/src/libdlopen
_ns_dso.so
/system/lib/ndk/libdlopen
_ns_dso_ndk.so
hdc
shell
mv
%REMOTE%
/src/zh
_CN
/tmp/zh
_CN
...
...
scripts/runtest_linux.sh
浏览文件 @
02a13aaa
...
...
@@ -110,6 +110,12 @@ ${CMD} shell cp ${REMOTE}/src/libdlopen_dso.so ${REMOTE}/src/inherit_0700.so
${
CMD
}
shell
cp
${
REMOTE
}
/src/libdlopen_dso.so
${
REMOTE
}
/src/inherit_0800.so
${
CMD
}
shell
cp
${
REMOTE
}
/src/libdlopen_dso.so
${
REMOTE
}
/src/inherit_1100.so
${
CMD
}
shell
cp
${
REMOTE
}
/src/libdlopen_ns_dso.so /system/lib
${
CMD
}
shell
cp
${
REMOTE
}
/src/libdlopen_dso.so
${
REMOTE
}
/src/lib_for_no_delete.so
${
CMD
}
shell
cp
${
REMOTE
}
/src/libdlopen_dso.so
${
REMOTE
}
/src/lib_for_dlopen.so
${
CMD
}
shell
cp
${
REMOTE
}
/src/libdlopen_ns_dso.so /system/lib64/libdlopen_ns_dso_sys.so
${
CMD
}
shell
cp
${
REMOTE
}
/src/libdlopen_ns_dso.so /system/lib64/ndk/libdlopen_ns_dso_ndk.so
${
CMD
}
shell
cp
${
REMOTE
}
/src/libdlopen_ns_dso.so /system/lib/libdlopen_ns_dso_sys.so
${
CMD
}
shell
cp
${
REMOTE
}
/src/libdlopen_ns_dso.so /system/lib/ndk/libdlopen_ns_dso_ndk.so
${
CMD
}
shell
mv
${
REMOTE
}
/src/zh_CN /tmp/zh_CN
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录