Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Musl
提交
fb686cb6
T
Third Party Musl
项目概览
OpenHarmony
/
Third Party Musl
接近 2 年 前同步成功
通知
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看板
提交
fb686cb6
编写于
2月 09, 2023
作者:
D
dhy308
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix review issues.
Issue: I6AEEI Test: Build & Boot Devices Signed-off-by:
N
dhy308
<
tony.gan@huawei.com
>
上级
8ae64692
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
24 addition
and
227 deletion
+24
-227
libc-test/src/functionalext/sigchain/sigchain_add_special_handler_d.c
...c/functionalext/sigchain/sigchain_add_special_handler_d.c
+5
-15
libc-test/src/functionalext/sigchain/sigchain_add_special_handler_e.c
...c/functionalext/sigchain/sigchain_add_special_handler_e.c
+5
-15
libc-test/src/functionalext/sigchain/sigchain_add_special_handler_f.c
...c/functionalext/sigchain/sigchain_add_special_handler_f.c
+5
-18
libc-test/src/functionalext/sigchain/sigchain_add_special_handler_m.c
...c/functionalext/sigchain/sigchain_add_special_handler_m.c
+0
-78
libc-test/src/functionalext/sigchain/sigchain_rm_special_handler_d.c
...rc/functionalext/sigchain/sigchain_rm_special_handler_d.c
+2
-10
libc-test/src/functionalext/sigchain/sigchain_rm_special_handler_e.c
...rc/functionalext/sigchain/sigchain_rm_special_handler_e.c
+2
-10
libc-test/src/functionalext/sigchain/sigchain_rm_special_handler_f.c
...rc/functionalext/sigchain/sigchain_rm_special_handler_f.c
+2
-10
libc-test/src/functionalext/sigchain/sigchain_rm_special_handler_g.c
...rc/functionalext/sigchain/sigchain_rm_special_handler_g.c
+2
-2
libc-test/src/functionalext/sigchain/sigchain_rm_special_handler_m.c
...rc/functionalext/sigchain/sigchain_rm_special_handler_m.c
+0
-67
libc-test/src/functionalext/sigchain/test_src_functionalext_sigchain.gni
...unctionalext/sigchain/test_src_functionalext_sigchain.gni
+1
-2
未找到文件。
libc-test/src/functionalext/sigchain/sigchain_add_special_handler_d.c
浏览文件 @
fb686cb6
...
...
@@ -38,15 +38,6 @@ static bool sigchain_special_handler2(int signo, siginfo_t *siginfo, void *ucont
return
true
;
}
/**
* @brief the special handler
*/
static
bool
sigchain_special_handler3
(
int
signo
,
siginfo_t
*
siginfo
,
void
*
ucontext_raw
)
{
EXPECT_FALSE
(
"sigchain_add_special_handler_004"
,
true
);
return
false
;
}
/**
* @tc.name : sigchain_add_special_handler_004
* @tc.desc : Add multiple special handlers for a signal that is not registered with
...
...
@@ -69,16 +60,15 @@ static void sigchain_add_special_handler_004()
};
add_special_signal_handler
(
SIGABRT
,
&
sigabrt1
);
struct
signal_chain_action
sigabrt2
=
{
.
sca_sigaction
=
sigchain_special_handler3
,
.
sca_mask
=
{},
.
sca_flags
=
0
,
};
add_special_signal_handler
(
SIGABRT
,
&
sigabrt2
);
sigset_t
set
=
{
0
};
int
signo
[
SIGCHIAN_TEST_SIGNAL_NUM_1
]
=
{
SIGABRT
};
SIGCHAIN_TEST_SET_MASK
(
set
,
"sigchain_add_special_handler_001"
,
signo
,
SIGCHIAN_TEST_SIGNAL_NUM_1
);
}
int
main
(
void
)
{
sigchain_add_special_handler_004
();
raise
(
SIGABRT
);
raise
(
SIGABRT
);
return
t_status
;
}
\ No newline at end of file
libc-test/src/functionalext/sigchain/sigchain_add_special_handler_e.c
浏览文件 @
fb686cb6
...
...
@@ -38,15 +38,6 @@ static bool sigchain_special_handler2(int signo, siginfo_t *siginfo, void *ucont
return
false
;
}
/**
* @brief the special handler
*/
static
bool
sigchain_special_handler3
(
int
signo
,
siginfo_t
*
siginfo
,
void
*
ucontext_raw
)
{
EXPECT_FALSE
(
"sigchain_add_special_handler_005"
,
true
);
return
false
;
}
/**
* @brief the signal handler
*/
...
...
@@ -79,16 +70,15 @@ static void sigchain_add_special_handler_005()
};
add_special_signal_handler
(
SIGABRT
,
&
sigabrt1
);
struct
signal_chain_action
sigabrt2
=
{
.
sca_sigaction
=
sigchain_special_handler3
,
.
sca_mask
=
{},
.
sca_flags
=
0
,
};
add_special_signal_handler
(
SIGABRT
,
&
sigabrt2
);
sigset_t
set
=
{
0
};
int
signo
[
SIGCHIAN_TEST_SIGNAL_NUM_1
]
=
{
SIGABRT
};
SIGCHAIN_TEST_SET_MASK
(
set
,
"sigchain_add_special_handler_001"
,
signo
,
SIGCHIAN_TEST_SIGNAL_NUM_1
);
}
int
main
(
void
)
{
sigchain_add_special_handler_005
();
raise
(
SIGABRT
);
raise
(
SIGABRT
);
return
t_status
;
}
\ No newline at end of file
libc-test/src/functionalext/sigchain/sigchain_add_special_handler_f.c
浏览文件 @
fb686cb6
...
...
@@ -38,15 +38,6 @@ static bool sigchain_special_handler2(int signo, siginfo_t *siginfo, void *ucont
return
false
;
}
/**
* @brief the special handler
*/
static
bool
sigchain_special_handler3
(
int
signo
,
siginfo_t
*
siginfo
,
void
*
ucontext_raw
)
{
EXPECT_FALSE
(
"sigchain_add_special_handler_006"
,
true
);
return
false
;
}
/**
* @brief the signal handler
*/
...
...
@@ -82,19 +73,15 @@ static void sigchain_add_special_handler_006()
};
add_special_signal_handler
(
SIGABRT
,
&
sigabrt2
);
struct
signal_chain_action
sigabrt3
=
{
.
sca_sigaction
=
sigchain_special_handler3
,
.
sca_mask
=
{},
.
sca_flags
=
0
,
};
add_special_signal_handler
(
SIGABRT
,
&
sigabrt3
);
sigset_t
set
=
{
0
};
int
signo
[
SIGCHIAN_TEST_SIGNAL_NUM_1
]
=
{
SIGABRT
};
SIGCHAIN_TEST_SET_MASK
(
set
,
"sigchain_add_special_handler_001"
,
signo
,
SIGCHIAN_TEST_SIGNAL_NUM_1
);
}
int
main
(
void
)
{
sigchain_add_special_handler_006
();
raise
(
SIGSEGV
);
raise
(
SIGSEGV
);
raise
(
SIGSEGV
);
raise
(
SIGABRT
);
raise
(
SIGABRT
);
return
t_status
;
}
\ No newline at end of file
libc-test/src/functionalext/sigchain/sigchain_add_special_handler_m.c
已删除
100644 → 0
浏览文件 @
8ae64692
/*
* Copyright (c) 2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <sigchain.h>
#include <wchar.h>
#include <stdlib.h>
#include "test.h"
#include "functionalext.h"
#include "sigchain_util.h"
/**
* @brief the special handler
*/
static
bool
sigchain_special_handler
(
int
signo
,
siginfo_t
*
siginfo
,
void
*
ucontext_raw
)
{
EXPECT_FALSE
(
"sigchain_add_special_handler_013"
,
true
);
return
false
;
}
/**
* @brief the special handler
*/
static
bool
sigchain_special_handler1
(
int
signo
,
siginfo_t
*
siginfo
,
void
*
ucontext_raw
)
{
EXPECT_FALSE
(
"sigchain_add_special_handler_013"
,
true
);
return
false
;
}
/**
* @brief the signal handler
*/
static
void
signal_handler
(
int
signo
)
{
EXPECT_EQ
(
"sigchain_add_special_handler_013"
,
signo
,
SIGABRT
);
return
;
}
/**
* @tc.name : sigchain_add_special_handler_013
* @tc.desc : Add the special handler with wrong signal
* @tc.level : Level 2
*/
static
void
sigchain_add_special_handler_013
()
{
signal
(
SIGABRT
,
signal_handler
);
struct
signal_chain_action
sig_special_action
=
{
.
sca_sigaction
=
sigchain_special_handler
,
.
sca_mask
=
{},
.
sca_flags
=
0
,
};
add_special_signal_handler
(
0
,
&
sig_special_action
);
struct
signal_chain_action
sig_special_action1
=
{
.
sca_sigaction
=
sigchain_special_handler1
,
.
sca_mask
=
{},
.
sca_flags
=
0
,
};
add_special_signal_handler
(
SIGCHAIN_SIGNAL_65
,
&
sig_special_action1
);
}
int
main
(
void
)
{
sigchain_add_special_handler_013
();
return
t_status
;
}
\ No newline at end of file
libc-test/src/functionalext/sigchain/sigchain_rm_special_handler_d.c
浏览文件 @
fb686cb6
...
...
@@ -38,15 +38,6 @@ static bool sigchain_special_handler2(int signo, siginfo_t *siginfo, void *ucont
return
false
;
}
/**
* @brief the special handler
*/
static
bool
sigchain_special_handler3
(
int
signo
,
siginfo_t
*
siginfo
,
void
*
ucontext_raw
)
{
EXPECT_FALSE
(
"sigchain_rm_special_handler_004"
,
true
);
return
false
;
}
/**
* @tc.name : sigchain_rm_special_handler_004
* @tc.desc : remove multiple special handlers for a signal that is not registered with
...
...
@@ -75,11 +66,12 @@ static void sigchain_rm_special_handler_004()
remove_special_signal_handler
(
SIGABRT
,
sigchain_special_handler2
);
remove_special_signal_handler
(
SIGABRT
,
sigchain_special_handler1
);
remove_special_signal_handler
(
SIGABRT
,
sigchain_special_handler3
);
}
int
main
(
void
)
{
sigchain_rm_special_handler_004
();
raise
(
SIGABRT
);
raise
(
SIGABRT
);
return
t_status
;
}
\ No newline at end of file
libc-test/src/functionalext/sigchain/sigchain_rm_special_handler_e.c
浏览文件 @
fb686cb6
...
...
@@ -38,15 +38,6 @@ static bool sigchain_special_handler2(int signo, siginfo_t *siginfo, void *ucont
return
false
;
}
/**
* @brief the special handler
*/
static
bool
sigchain_special_handler3
(
int
signo
,
siginfo_t
*
siginfo
,
void
*
ucontext_raw
)
{
EXPECT_FALSE
(
"sigchain_rm_special_handler_005"
,
true
);
return
false
;
}
/**
* @brief the signal handler
*/
...
...
@@ -85,11 +76,12 @@ static void sigchain_rm_special_handler_005()
remove_special_signal_handler
(
SIGABRT
,
sigchain_special_handler2
);
remove_special_signal_handler
(
SIGABRT
,
sigchain_special_handler1
);
remove_special_signal_handler
(
SIGABRT
,
sigchain_special_handler3
);
}
int
main
(
void
)
{
sigchain_rm_special_handler_005
();
raise
(
SIGABRT
);
raise
(
SIGABRT
);
return
t_status
;
}
\ No newline at end of file
libc-test/src/functionalext/sigchain/sigchain_rm_special_handler_f.c
浏览文件 @
fb686cb6
...
...
@@ -38,15 +38,6 @@ static bool sigchain_special_handler2(int signo, siginfo_t *siginfo, void *ucont
return
false
;
}
/**
* @brief the special handler
*/
static
bool
sigchain_special_handler3
(
int
signo
,
siginfo_t
*
siginfo
,
void
*
ucontext_raw
)
{
EXPECT_FALSE
(
"sigchain_rm_special_handler_006"
,
true
);
return
false
;
}
/**
* @brief the signal handler
*/
...
...
@@ -88,11 +79,12 @@ static void sigchain_rm_special_handler_006()
remove_special_signal_handler
(
SIGABRT
,
sigchain_special_handler2
);
remove_special_signal_handler
(
SIGABRT
,
sigchain_special_handler1
);
remove_special_signal_handler
(
SIGABRT
,
sigchain_special_handler3
);
}
int
main
(
void
)
{
sigchain_rm_special_handler_006
();
raise
(
SIGABRT
);
raise
(
SIGABRT
);
return
t_status
;
}
\ No newline at end of file
libc-test/src/functionalext/sigchain/sigchain_rm_special_handler_g.c
浏览文件 @
fb686cb6
...
...
@@ -64,8 +64,8 @@ static void sigchain_rm_special_handler_007()
int
signo
[
SIGCHIAN_TEST_SIGNAL_NUM_2
]
=
{
SIGCHAIN_SIGNAL_64
,
SIGHUP
};
SIGCHAIN_TEST_SET_MASK
(
set
,
"sigchain_rm_special_handler_007"
,
signo
,
SIGCHIAN_TEST_SIGNAL_NUM_2
);
remove_special_signal_handler
(
SIGHUP
,
sigchain_special_handler
1
);
remove_special_signal_handler
(
SIGCHAIN_SIGNAL_64
,
sigchain_special_handler
2
);
remove_special_signal_handler
(
SIGHUP
,
sigchain_special_handler
2
);
remove_special_signal_handler
(
SIGCHAIN_SIGNAL_64
,
sigchain_special_handler
1
);
}
int
main
(
void
)
...
...
libc-test/src/functionalext/sigchain/sigchain_rm_special_handler_m.c
已删除
100644 → 0
浏览文件 @
8ae64692
/*
* Copyright (c) 2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <sigchain.h>
#include <wchar.h>
#include <stdlib.h>
#include "test.h"
#include "functionalext.h"
#include "sigchain_util.h"
/**
* @brief the special handler
*/
static
bool
sigchain_special_handler
(
int
signo
,
siginfo_t
*
siginfo
,
void
*
ucontext_raw
)
{
EXPECT_FALSE
(
"sigchain_rm_special_handler_013"
,
true
);
return
false
;
}
/**
* @brief the special handler
*/
static
bool
sigchain_special_handler1
(
int
signo
,
siginfo_t
*
siginfo
,
void
*
ucontext_raw
)
{
EXPECT_FALSE
(
"sigchain_rm_special_handler_013"
,
true
);
return
false
;
}
/**
* @brief the signal handler
*/
static
void
signal_handler
(
int
signo
)
{
EXPECT_EQ
(
"sigchain_rm_special_handler_013"
,
signo
,
SIGABRT
);
return
;
}
/**
* @tc.name : sigchain_rm_special_handler_013
* @tc.desc : Remove the special handler with wrong signal
* @tc.level : Level 0
*/
static
void
sigchain_rm_special_handler_013
()
{
signal
(
SIGABRT
,
signal_handler
);
remove_special_signal_handler
(
0
,
sigchain_special_handler
);
remove_special_signal_handler
(
SIGCHAIN_SIGNAL_65
,
sigchain_special_handler1
);
}
int
main
(
void
)
{
sigchain_rm_special_handler_013
();
return
t_status
;
}
\ No newline at end of file
libc-test/src/functionalext/sigchain/test_src_functionalext_sigchain.gni
浏览文件 @
fb686cb6
...
...
@@ -23,11 +23,11 @@ functionalext_sigchain_list = [
"sigchain_add_special_handler_j",
"sigchain_add_special_handler_k",
"sigchain_add_special_handler_l",
"sigchain_add_special_handler_m",
"sigchain_rm_special_handler_a",
"sigchain_rm_special_handler_b",
"sigchain_rm_special_handler_c",
"sigchain_rm_special_handler_d",
"sigchain_rm_special_handler_e",
"sigchain_rm_special_handler_f",
"sigchain_rm_special_handler_g",
"sigchain_rm_special_handler_h",
...
...
@@ -35,7 +35,6 @@ functionalext_sigchain_list = [
"sigchain_rm_special_handler_j",
"sigchain_rm_special_handler_k",
"sigchain_rm_special_handler_l",
"sigchain_rm_special_handler_m",
"sigchain_intercept_sigaction_a",
"sigchain_intercept_sigaction_b",
"sigchain_intercept_sigaction_c",
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录