Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Musl
提交
109684bc
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看板
未验证
提交
109684bc
编写于
5月 22, 2023
作者:
O
openharmony_ci
提交者:
Gitee
5月 22, 2023
浏览文件
操作
浏览文件
下载
差异文件
!912 Fix test cases' bugs in xts suite (2/2)
Merge pull request !912 from zzulilyw/master
上级
694b441d
32e61cb0
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
42 addition
and
22 deletion
+42
-22
libc-test/src/functional/atexit_dlclose.c
libc-test/src/functional/atexit_dlclose.c
+3
-2
libc-test/src/functionalext/common/sigchain_util.h
libc-test/src/functionalext/common/sigchain_util.h
+16
-1
libc-test/src/functionalext/sigchain/BUILD.gn
libc-test/src/functionalext/sigchain/BUILD.gn
+1
-0
libc-test/src/functionalext/supplement/stat/mknod.c
libc-test/src/functionalext/supplement/stat/mknod.c
+2
-2
libc-test/src/functionalext/supplement/time/timer_create.c
libc-test/src/functionalext/supplement/time/timer_create.c
+3
-3
libc-test/src/functionalext/supplement/time/timer_getoverrun.c
...test/src/functionalext/supplement/time/timer_getoverrun.c
+3
-3
libc-test/src/functionalext/supplement/time/timer_settime.c
libc-test/src/functionalext/supplement/time/timer_settime.c
+5
-5
libc-test/src/functionalext/trace/trace_marker.c
libc-test/src/functionalext/trace/trace_marker.c
+1
-0
libc-test/src/regression/raise-race.c
libc-test/src/regression/raise-race.c
+5
-5
libc-test/test_template.gni
libc-test/test_template.gni
+3
-1
未找到文件。
libc-test/src/functional/atexit_dlclose.c
浏览文件 @
109684bc
...
...
@@ -24,9 +24,10 @@
typedef
void
(
*
ATEXIT_CB
)();
#define TEST_DSO "libatexit_dlclose_dso.so"
#define TEST_DSO "
/data/tests/libc-test/src/
libatexit_dlclose_dso.so"
#define ATEXIT_CB_NAME "atexit_cb"
#define ATEXIT_WATCHPOINT_NAME "g_watchpoint"
#define LIBATEXIT_DLCLOSE_DSO_ABSOLUTE_PATH "/data/tests/libc-test/src/libatexit_dlclose_dso.so"
int
fork_main
(
char
*
exe
)
{
...
...
@@ -43,7 +44,7 @@ int fork_main(char *exe)
return
1
;
}
handler
=
dlopen
(
buf
,
RTLD_LAZY
|
RTLD_LOCAL
);
handler
=
dlopen
(
LIBATEXIT_DLCLOSE_DSO_ABSOLUTE_PATH
,
RTLD_LAZY
|
RTLD_LOCAL
);
if
(
!
handler
)
{
t_error
(
"dlopen %s failed: %s
\n
"
,
buf
,
dlerror
());
return
2
;
...
...
libc-test/src/functionalext/common/sigchain_util.h
浏览文件 @
109684bc
...
...
@@ -45,4 +45,19 @@
#define SIGCHAIN_SIGNAL_56 56
#define SIGCHAIN_SIGNAL_64 64
extern
bool
get_sigchain_mask_enable
();
\ No newline at end of file
bool
get_sigchain_mask_enable
()
{
#ifdef OHOS_ENABLE_PARAMETER
static
CachedHandle
sigchain_procmask_handle
=
NULL
;
if
(
sigchain_procmask_handle
==
NULL
)
{
sigchain_procmask_handle
=
CachedParameterCreate
(
param_name
,
"false"
);
}
char
*
param_value
=
CachedParameterGet
(
sigchain_procmask_handle
);
if
(
param_value
!=
NULL
)
{
if
(
strcmp
(
param_value
,
"true"
)
==
0
)
{
return
true
;
}
}
#endif
return
false
;
}
\ No newline at end of file
libc-test/src/functionalext/sigchain/BUILD.gn
浏览文件 @
109684bc
...
...
@@ -16,6 +16,7 @@ import("test_src_functionalext_sigchain.gni")
foreach(s, functionalext_sigchain_list) {
test_unittest(s) {
target_dir = "functionalext/sigchain"
musl_unit_test_flag = true
}
}
...
...
libc-test/src/functionalext/supplement/stat/mknod.c
浏览文件 @
109684bc
...
...
@@ -13,6 +13,7 @@
* limitations under the License.
*/
#include <errno.h>
#include <sys/stat.h>
#include "functionalext.h"
#include "filepath_util.h"
...
...
@@ -26,8 +27,7 @@
*/
void
mknod_0100
(
void
)
{
char
pathname
[
PATH_MAX
]
=
{
0
};
FILE_ABSOLUTE_PATH
(
"mknod"
,
pathname
);
char
pathname
[
PATH_MAX
]
=
"/dev/zero"
;
int
ret
=
mknod
(
pathname
,
TEST_MODE
,
0
);
EXPECT_EQ
(
"mknod_0100"
,
ret
,
ERREXPECT
);
}
...
...
libc-test/src/functionalext/supplement/time/timer_create.c
浏览文件 @
109684bc
...
...
@@ -19,7 +19,7 @@
#include <unistd.h>
#include "test.h"
#define SIGNUM 40
static
int
count
=
0
;
void
handler
(
int
sig
)
...
...
@@ -40,10 +40,10 @@ void timer_create_0100(void)
timer_t
timerid
;
sev
.
sigev_notify
=
SIGEV_SIGNAL
;
sev
.
sigev_signo
=
SIG
RTMIN
;
sev
.
sigev_signo
=
SIG
NUM
;
sev
.
sigev_value
.
sival_ptr
=
&
timerid
;
signal
(
SIG
RTMIN
,
handler
);
signal
(
SIG
NUM
,
handler
);
int
result
=
timer_create
(
CLOCK_REALTIME
,
&
sev
,
&
timerid
);
if
(
result
!=
0
)
{
...
...
libc-test/src/functionalext/supplement/time/timer_getoverrun.c
浏览文件 @
109684bc
...
...
@@ -20,7 +20,7 @@
#include <unistd.h>
#include "test.h"
#define SIGNUM 40
static
int
count
=
0
;
static
timer_t
timerid
;
...
...
@@ -45,10 +45,10 @@ void timer_getoverrun_0100(void)
struct
sigevent
sev
;
sev
.
sigev_notify
=
SIGEV_SIGNAL
;
sev
.
sigev_signo
=
SIG
RTMIN
;
sev
.
sigev_signo
=
SIG
NUM
;
sev
.
sigev_value
.
sival_ptr
=
&
timerid
;
signal
(
SIG
RTMIN
,
handler
);
signal
(
SIG
NUM
,
handler
);
int
result
=
timer_create
(
CLOCK_REALTIME
,
&
sev
,
&
timerid
);
if
(
result
!=
0
)
{
...
...
libc-test/src/functionalext/supplement/time/timer_settime.c
浏览文件 @
109684bc
...
...
@@ -20,7 +20,7 @@
#include <unistd.h>
#include "test.h"
#define SIGNUM 40
static
int
count
=
0
;
extern
int
__timer_settime64
(
timer_t
,
int
,
const
struct
itimerspec
*
__restrict
,
struct
itimerspec
*
__restrict
);
...
...
@@ -48,10 +48,10 @@ void timer_settime_0100(void)
timer_t
timerid
;
sev
.
sigev_notify
=
SIGEV_SIGNAL
;
sev
.
sigev_signo
=
SIG
RTMIN
;
sev
.
sigev_signo
=
SIG
NUM
;
sev
.
sigev_value
.
sival_ptr
=
&
timerid
;
signal
(
SIG
RTMIN
,
handler
);
signal
(
SIG
NUM
,
handler
);
int
result
=
timer_create
(
CLOCK_REALTIME
,
&
sev
,
&
timerid
);
if
(
result
!=
0
)
{
...
...
@@ -102,10 +102,10 @@ void timer_settime64_0100(void)
timer_t
timerid
;
sev
.
sigev_notify
=
SIGEV_SIGNAL
;
sev
.
sigev_signo
=
SIG
RTMIN
;
sev
.
sigev_signo
=
SIG
NUM
;
sev
.
sigev_value
.
sival_ptr
=
&
timerid
;
signal
(
SIG
RTMIN
,
handler
);
signal
(
SIG
NUM
,
handler
);
int
result
=
timer_create
(
CLOCK_REALTIME
,
&
sev
,
&
timerid
);
if
(
result
!=
0
)
{
...
...
libc-test/src/functionalext/trace/trace_marker.c
浏览文件 @
109684bc
...
...
@@ -1283,6 +1283,7 @@ TEST_FUN G_Fun_Array[] = {
int
main
(
void
)
{
trace_marker_reset
();
int
num
=
sizeof
(
G_Fun_Array
)
/
sizeof
(
TEST_FUN
);
for
(
int
pos
=
0
;
pos
<
num
;
++
pos
)
{
G_Fun_Array
[
pos
]();
...
...
libc-test/src/regression/raise-race.c
浏览文件 @
109684bc
...
...
@@ -8,7 +8,7 @@
#include <sys/wait.h>
#include <unistd.h>
#include "test.h"
#define SIGNUM 40
static
volatile
int
c0
;
static
volatile
int
c1
;
static
volatile
int
child
;
...
...
@@ -32,7 +32,7 @@ static void *start(void *arg)
int
i
,
r
,
s
;
for
(
i
=
0
;
i
<
1000
;
i
++
)
{
r
=
raise
(
SIG
RTMIN
);
r
=
raise
(
SIG
NUM
);
if
(
r
)
t_error
(
"raise failed: %s
\n
"
,
strerror
(
errno
));
}
...
...
@@ -59,16 +59,16 @@ int main(void)
void
*
p
;
int
r
,
i
,
s
;
if
(
signal
(
SIG
RTMIN
,
handler0
)
==
SIG_ERR
)
if
(
signal
(
SIG
NUM
,
handler0
)
==
SIG_ERR
)
t_error
(
"registering signal handler failed: %s
\n
"
,
strerror
(
errno
));
if
(
signal
(
SIG
RTMIN
+
1
,
handler1
)
==
SIG_ERR
)
if
(
signal
(
SIG
NUM
+
1
,
handler1
)
==
SIG_ERR
)
t_error
(
"registering signal handler failed: %s
\n
"
,
strerror
(
errno
));
r
=
pthread_create
(
&
t
,
0
,
start
,
0
);
if
(
r
)
t_error
(
"pthread_create failed: %s
\n
"
,
strerror
(
r
));
for
(
i
=
0
;
i
<
100
;
i
++
)
{
r
=
pthread_kill
(
t
,
SIG
RTMIN
+
1
);
r
=
pthread_kill
(
t
,
SIG
NUM
+
1
);
if
(
r
)
t_error
(
"phread_kill failed: %s
\n
"
,
strerror
(
r
));
}
...
...
libc-test/test_template.gni
浏览文件 @
109684bc
...
...
@@ -28,7 +28,9 @@ template("test_unittest") {
target_name = invoker.target_name
target_dir = invoker.target_dir
if (defined(invoker.musl_unit_test_flag)) {
musl_unit_test_flag = invoker.musl_unit_test_flag
}
target("ohos_executable", "${target_name}") {
subsystem_name = "musl"
part_name = "libc-test"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录