Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
d9ad2c3c
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看板
提交
d9ad2c3c
编写于
6月 30, 2021
作者:
O
openharmony_ci
提交者:
Gitee
6月 30, 2021
浏览文件
操作
浏览文件
下载
差异文件
!301 【轻内核】【master】修改由权限问题导致的用例失败的问题
Merge pull request !301 from limeng/kernel_lite_20210629_01
上级
b19a73a8
1ee821fb
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
3 addition
and
5 deletion
+3
-5
kernel_lite/process_posix/src/UidGidTest.cpp
kernel_lite/process_posix/src/UidGidTest.cpp
+2
-5
kernel_lite/process_posix/src/UidGidTest.h
kernel_lite/process_posix/src/UidGidTest.h
+1
-0
未找到文件。
kernel_lite/process_posix/src/UidGidTest.cpp
浏览文件 @
d9ad2c3c
...
@@ -642,7 +642,6 @@ HWTEST_F(UidGidTest, testGetgroups, Function | MediumTest | Level1)
...
@@ -642,7 +642,6 @@ HWTEST_F(UidGidTest, testGetgroups, Function | MediumTest | Level1)
int
n
=
getgroups
(
0
,
gidList
);
int
n
=
getgroups
(
0
,
gidList
);
ASSERT_EQ
(
n
,
1
);
ASSERT_EQ
(
n
,
1
);
ASSERT_EQ
(
gidList
[
0
],
0
);
ASSERT_EQ
(
gidList
[
0
],
0
);
n
=
getgroups
(
testSize
,
gidList
);
n
=
getgroups
(
testSize
,
gidList
);
ASSERT_EQ
(
n
,
1
);
ASSERT_EQ
(
n
,
1
);
ASSERT_EQ
(
gidList
[
0
],
SHELL_GID
);
ASSERT_EQ
(
gidList
[
0
],
SHELL_GID
);
...
@@ -691,8 +690,6 @@ HWTEST_F(UidGidTest, testSetgroups1, Function | MediumTest | Level1)
...
@@ -691,8 +690,6 @@ HWTEST_F(UidGidTest, testSetgroups1, Function | MediumTest | Level1)
n
=
getgroups
(
2
,
gidListOut
);
n
=
getgroups
(
2
,
gidListOut
);
EXPECT_EQ
(
n
,
1
);
EXPECT_EQ
(
n
,
1
);
EXPECT_EQ
(
gidListOut
[
0
],
SHELL_GID
);
EXPECT_EQ
(
gidListOut
[
0
],
SHELL_GID
);
gidListOut
[
0
]
=
2
;
int
ret
=
setgroups
(
2
,
gidListOut
);
free
(
gidListIn
);
free
(
gidListIn
);
free
(
gidListOut
);
free
(
gidListOut
);
}
}
...
@@ -708,8 +705,8 @@ HWTEST_F(UidGidTest, testSetgroups2, Function | MediumTest | Level1)
...
@@ -708,8 +705,8 @@ HWTEST_F(UidGidTest, testSetgroups2, Function | MediumTest | Level1)
gid_t
gidListOut
[
4
]
=
{
0
};
gid_t
gidListOut
[
4
]
=
{
0
};
LOG
(
"Init: make sure groups not changed by other test."
);
LOG
(
"Init: make sure groups not changed by other test."
);
int
n
=
getgroups
(
2
,
gidListOut
);
int
n
=
getgroups
(
1
,
gidListOut
);
EXPECT_EQ
(
n
,
2
);
EXPECT_EQ
(
n
,
1
);
EXPECT_EQ
(
gidListOut
[
0
],
SHELL_GID
);
EXPECT_EQ
(
gidListOut
[
0
],
SHELL_GID
);
LOG
(
"add 2 groups"
);
LOG
(
"add 2 groups"
);
...
...
kernel_lite/process_posix/src/UidGidTest.h
浏览文件 @
d9ad2c3c
...
@@ -61,6 +61,7 @@ protected:
...
@@ -61,6 +61,7 @@ protected:
setgid
(
SHELL_GID
);
setgid
(
SHELL_GID
);
AssertAllUid
(
SHELL_UID
);
AssertAllUid
(
SHELL_UID
);
AssertAllGid
(
SHELL_GID
);
AssertAllGid
(
SHELL_GID
);
int
rt
=
setgroups
(
0
,
NULL
);
}
}
};
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录