Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
8be8f079
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
8be8f079
编写于
8月 26, 2022
作者:
F
FondMemoryVVV
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Modify the format
Signed-off-by:
N
FondMemoryVVV
<
mashuai53@huawei.com
>
上级
f1486d77
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
21 addition
and
12 deletion
+21
-12
toolchain/libc-test/include/getfiles.cpp
toolchain/libc-test/include/getfiles.cpp
+4
-3
toolchain/libc-test/include/runtest.h
toolchain/libc-test/include/runtest.h
+8
-3
toolchain/libc-test/include/setrlim.cpp
toolchain/libc-test/include/setrlim.cpp
+4
-3
toolchain/libc-test/src/toolchaintest.cpp
toolchain/libc-test/src/toolchaintest.cpp
+5
-3
未找到文件。
toolchain/libc-test/include/getfiles.cpp
浏览文件 @
8be8f079
...
...
@@ -20,11 +20,11 @@
#include "gettestfiles.cpp"
#include "runtest.h"
namespace
OHOS
{
using
namespace
std
;
static
vector
<
std
::
string
>
filenames
;
vector
<
std
::
string
>
GetFileNames
(
std
::
string
path
)
std
::
vector
<
std
::
string
>
runtest
::
GetFileNames
(
std
::
string
path
)
{
vector
<
string
>
tempName
;
GetTestNames
(
path
,
tempName
);
...
...
@@ -37,4 +37,5 @@ vector<std::string> GetFileNames(std::string path)
filenames
.
push_back
(
tempName
[
i
]);
}
return
filenames
;
}
\ No newline at end of file
}
}
//namespace OHOS
\ No newline at end of file
toolchain/libc-test/include/runtest.h
浏览文件 @
8be8f079
...
...
@@ -18,8 +18,13 @@
#include <iostream>
#include <string>
#include <vector>
namespace
OHOS
{
int
t_setrlim
(
int
r
,
long
lim
);
std
::
vector
<
std
::
string
>
GetFileNames
(
std
::
string
path
);
class
runtest
{
public:
static
int
t_setrlim
(
int
r
,
long
lim
);
static
std
::
vector
<
std
::
string
>
GetFileNames
(
std
::
string
path
);
};
}
//namespace OHOS
#endif // TOOLCHAIN_LIBC_TEST_INCLUDE_RUNTEST_H_
toolchain/libc-test/include/setrlim.cpp
浏览文件 @
8be8f079
...
...
@@ -18,8 +18,8 @@
#include <sys/resource.h>
#include "runtest.h"
int
t_setrlim
(
int
r
,
long
lim
)
namespace
OHOS
{
int
runtest
::
t_setrlim
(
int
r
,
long
lim
)
{
struct
rlimit
rl
;
...
...
@@ -40,4 +40,5 @@ int t_setrlim(int r, long lim)
return
-
1
;
}
return
0
;
}
\ No newline at end of file
}
}
//namespace OHOS
\ No newline at end of file
toolchain/libc-test/src/toolchaintest.cpp
浏览文件 @
8be8f079
...
...
@@ -37,7 +37,7 @@ namespace OHOS {
class
toolchaintest
:
public
::
testing
::
TestWithParam
<
string
>
{};
static
string
filepath
=
"/data/local/tmp/libc-test/src"
;
static
vector
<
st
ring
>
temp
=
GetFileNames
(
filepath
);
static
vector
<
st
d
::
string
>
temp
=
runtest
::
GetFileNames
(
filepath
);
volatile
int
t_status
=
0
;
static
void
handler
(
int
s
)
...
...
@@ -50,7 +50,7 @@ static int start(char *wrap, const char *argvs)
pid
=
fork
();
if
(
pid
==
0
)
{
t_setrlim
(
RLIMIT_STACK
,
space_size
);
runtest
::
t_setrlim
(
RLIMIT_STACK
,
space_size
);
int
exe
=
execl
(
argvs
,
"strptime"
,
nullptr
);
printf
(
"exe:%d %s exec failed: %s
\n
"
,
exe
,
argvs
,
strerror
(
errno
));
exit
(
1
);
...
...
@@ -64,11 +64,13 @@ static int runTests(const char *argvs)
int
timeoutsec
=
5
,
timeout
=
0
;
int
status
,
pid
;
sigset_t
set
;
void
(
*
retfunc
)(
int
);
sigemptyset
(
&
set
);
sigaddset
(
&
set
,
SIGCHLD
);
sigprocmask
(
SIG_BLOCK
,
&
set
,
nullptr
);
if
(
signal
(
SIGCHLD
,
handler
)
==
SIG_ERR
)
{
retfunc
=
signal
(
SIGCHLD
,
handler
);
if
(
retfunc
==
SIG_ERR
)
{
printf
(
"signal triggering failed:%s
\n
"
,
strerror
(
errno
));
}
pid
=
start
(
wrap
,
argvs
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录