Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Musl
提交
e598dbfe
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看板
提交
e598dbfe
编写于
1月 04, 2023
作者:
D
dhy308
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix review problems
Signed-off-by:
N
dhy308
<
tony.gan@huawei.com
>
上级
36c724e1
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
16 addition
and
18 deletion
+16
-18
libc-test/src/functionalext/fortify/fcntl_ext.c
libc-test/src/functionalext/fortify/fcntl_ext.c
+5
-4
libc-test/src/functionalext/fortify/poll.c
libc-test/src/functionalext/fortify/poll.c
+3
-2
libc-test/src/functionalext/fortify/string_ext.c
libc-test/src/functionalext/fortify/string_ext.c
+2
-1
libc-test/src/functionalext/supplement/passwd/getspnam_r.c
libc-test/src/functionalext/supplement/passwd/getspnam_r.c
+4
-9
libc-test/src/functionalext/thread/pthread_mutex_ext.c
libc-test/src/functionalext/thread/pthread_mutex_ext.c
+1
-1
libc-test/src/functionalext/thread/pthread_rwlock_rdlock.c
libc-test/src/functionalext/thread/pthread_rwlock_rdlock.c
+1
-1
未找到文件。
libc-test/src/functionalext/fortify/fcntl_ext.c
浏览文件 @
e598dbfe
...
...
@@ -18,6 +18,7 @@
#include <string.h>
#include <sys/wait.h>
#include "fortify_test.h"
#include "functionalext.h"
#include "test.h"
#define FILE_MODE_ALL (0777)
...
...
@@ -120,7 +121,7 @@ static void open_0030(void)
static
void
open_0040
(
void
)
{
int
fd
=
open
(
"/proc/version"
,
O_RDWR
);
TEST
(
fd
!=
-
1
);
EXPECT_NE
(
open_0040
,
fd
,
-
1
);
close
(
fd
);
return
;
...
...
@@ -216,7 +217,7 @@ static void openat_0030(void)
static
void
openat_0040
(
void
)
{
int
fd
=
openat
(
AT_FDCWD
,
"/proc/version"
,
O_RDWR
);
TEST
(
fd
!=
-
1
);
EXPECT_NE
(
openat_0040
,
fd
,
-
1
);
close
(
fd
);
return
;
...
...
@@ -313,7 +314,7 @@ static void open64_0030(void)
static
void
open64_0040
(
void
)
{
int
fd
=
open64
(
"/proc/version"
,
O_RDWR
);
TEST
(
fd
!=
-
1
);
EXPECT_NE
(
open64_0040
,
fd
,
-
1
);
close
(
fd
);
return
;
...
...
@@ -409,7 +410,7 @@ static void openat64_0030(void)
static
void
openat64_0040
(
void
)
{
int
fd
=
openat64
(
AT_FDCWD
,
"/proc/version"
,
O_RDWR
);
TEST
(
fd
!=
-
1
);
EXPECT_NE
(
openat64_0040
,
fd
,
-
1
);
close
(
fd
);
return
;
...
...
libc-test/src/functionalext/fortify/poll.c
浏览文件 @
e598dbfe
...
...
@@ -19,6 +19,7 @@
#include <string.h>
#include <sys/wait.h>
#include "fortify_test.h"
#include "functionalext.h"
#include "test.h"
#define PPOLL_TIMESPEC_NSEC (100)
...
...
@@ -82,7 +83,7 @@ static void poll_0030(void)
{
nfds_t
fd_count
=
atoi
(
"1"
);
struct
pollfd
buf
[
2
]
=
{{
0
,
POLLIN
,
0
},
{
1
,
POLLIN
,
0
}};
TEST
(
poll
(
buf
,
fd_count
,
1
)
==
1
);
EXPECT_EQ
(
poll_0030
,
poll
(
buf
,
fd_count
,
1
),
1
);
return
;
}
...
...
@@ -151,7 +152,7 @@ static void ppoll_0030(void)
nfds_t
fd_count
=
atoi
(
"1"
);
struct
pollfd
buf
[
2
]
=
{{
0
,
POLLIN
,
0
},
{
1
,
POLLIN
,
0
}};
struct
timespec
ts
=
{
.
tv_nsec
=
PPOLL_TIMESPEC_NSEC
};
TEST
(
ppoll
(
buf
,
fd_count
,
&
ts
,
NULL
)
==
1
);
EXPECT_EQ
(
ppoll_0030
,
ppoll
(
buf
,
fd_count
,
&
ts
,
NULL
),
1
);
return
;
}
...
...
libc-test/src/functionalext/fortify/string_ext.c
浏览文件 @
e598dbfe
...
...
@@ -20,6 +20,7 @@
#include <string.h>
#include <sys/wait.h>
#include "fortify_test.h"
#include "functionalext.h"
#include "test.h"
#include "../../../../porting/linux/user/include/fortify/fortify.h"
...
...
@@ -909,7 +910,7 @@ static void test_strlen_0020()
exit
(
0
);
default:
waitpid
(
pid
,
&
status
,
WUNTRACED
);
TEST
(
WIFEXITED
(
status
)
==
0
);
EXPECT_EQ
(
test_strlen_0020
,
WIFEXITED
(
status
),
0
);
kill
(
pid
,
SIGCONT
);
break
;
}
...
...
libc-test/src/functionalext/supplement/passwd/getspnam_r.c
浏览文件 @
e598dbfe
...
...
@@ -16,6 +16,7 @@
#include <errno.h>
#include <shadow.h>
#include <string.h>
#include "functionalext.h"
#include "test.h"
/**
...
...
@@ -34,15 +35,9 @@ void getspnam_r_0100(void)
const
char
*
spwd_name
=
"root"
;
int
result
=
getspnam_r
(
spwd_name
,
&
spwd_storage
,
buf
,
sizeof
(
buf
),
&
spwd
);
if
(
result
!=
0
)
{
t_error
(
"%s getgrnam_r failed
\n
"
,
__func__
);
}
if
(
!
spwd
)
{
t_error
(
"%s failed, spwd is NULL
\n
"
,
__func__
);
}
if
(
strcmp
(
spwd_name
,
spwd
->
sp_namp
))
{
t_error
(
"%s spwd->sp_namp is %s
\n
"
,
__func__
,
spwd
->
sp_namp
);
}
EXPECT_EQ
(
getspnam_r_0100
,
result
,
0
);
EXPECT_PTRNE
(
getspnam_r_0100
,
spwd
,
NULL
);
EXPECT_EQ
(
getspnam_r_0100
,
strcmp
(
spwd_name
,
spwd
->
sp_namp
),
0
);
}
int
main
(
int
argc
,
char
*
argv
[])
...
...
libc-test/src/functionalext/thread/pthread_mutex_ext.c
浏览文件 @
e598dbfe
...
...
@@ -310,7 +310,7 @@ static void pthread_mutex_timedlock_monotonic_np_0030(void)
{
pthread_mutex_t
*
mtx
=
(
pthread_mutex_t
*
)
NULL
;
struct
timespec
ts
=
{
0
};
TEST
(
pthread_mutex_timedlock_monotonic_np
(
mtx
,
&
ts
)
==
EINVAL
);
EXPECT_EQ
(
pthread_mutex_timedlock_monotonic_np
(
mtx
,
&
ts
),
EINVAL
);
}
/********************************************* Test case dividing line ***********************************************/
...
...
libc-test/src/functionalext/thread/pthread_rwlock_rdlock.c
浏览文件 @
e598dbfe
...
...
@@ -277,7 +277,7 @@ static void pthread_rwlock_timedrdlock_monotonic_np_0020(void)
static
void
pthread_rwlock_timedrdlock_monotonic_np_0030
(
void
)
{
struct
timespec
ts
=
{
0
};
TEST
(
pthread_rwlock_timedrdlock_monotonic_np
((
pthread_rwlock_t
*
)
NULL
,
&
ts
)
==
EINVAL
);
EXPECT_EQ
(
pthread_rwlock_timedrdlock_monotonic_np
((
pthread_rwlock_t
*
)
NULL
,
&
ts
),
EINVAL
);
}
int
main
(
void
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录