feat: 支持killpg和waitid

killpg:给进程组发信号
waitid:等待进程结束
修改测试用例到full里面

Change-Id: Ice058ab4a6eede8ecbaacea0894c2161e3b9dce2
Signed-off-by: wjj <502004968@qq.com>
This commit is contained in:
wjj
2021-08-12 16:16:33 +08:00
parent bbdb977b5e
commit dc3cc094a7
14 changed files with 279 additions and 78 deletions

View File

@@ -91,16 +91,11 @@ sources_smoke = [
"smoke/process_test_049.cpp",
"smoke/process_test_050.cpp",
"smoke/process_test_051.cpp",
"smoke/process_test_053.cpp",
"smoke/process_test_054.cpp",
"smoke/process_test_055.cpp",
"smoke/process_test_056.cpp",
"smoke/process_test_057.cpp",
"smoke/process_test_058.cpp",
"smoke/process_test_059.cpp",
"smoke/process_test_060.cpp",
"smoke/process_test_061.cpp",
"smoke/process_test_062.cpp",
"smoke/process_test_063.cpp",
"smoke/process_test_064.cpp",
"smoke/process_test_065.cpp",
@@ -119,6 +114,11 @@ sources_smoke = [
]
sources_full = [
"full/process_test_053.cpp",
"full/process_test_054.cpp",
"full/process_test_055.cpp",
"full/process_test_061.cpp",
"full/process_test_062.cpp",
]
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {

View File

@@ -610,40 +610,6 @@ HWTEST_F(ProcessProcessTest, ItTestProcess051, TestSize.Level0)
ItTestProcess051();
}
/* *
* @tc.name: it_test_process_053
* @tc.desc: function for killpg:Sends a signal to the process group,
* Other processes in the process group can receive the signal.
* @tc.type: FUNC
* @tc.require: AR000E0QAB
*/
HWTEST_F(ProcessProcessTest, ItTestProcess053, TestSize.Level0)
{
ItTestProcess053();
}
/* *
* @tc.name: it_test_process_054
* @tc.desc: function for waitid: The waitid parameter is incorrect and the error code is verified.
* @tc.type: FUNC
* @tc.require: AR000E0QAB
*/
HWTEST_F(ProcessProcessTest, ItTestProcess054, TestSize.Level0)
{
ItTestProcess054();
}
/* *
* @tc.name: it_test_process_055
* @tc.desc: function for waitid:To test the function of transferring different parameters of the waitid.
* @tc.type: FUNC
* @tc.require: AR000E0QAB
*/
HWTEST_F(ProcessProcessTest, ItTestProcess055, TestSize.Level0)
{
ItTestProcess055();
}
/* *
* @tc.name: it_test_process_056
* @tc.desc: function for posix_spawn:Verifying Basic Functions
@@ -700,29 +666,6 @@ HWTEST_F(ProcessProcessTest, ItTestProcess060, TestSize.Level0)
ItTestProcess060();
}
/* *
* @tc.name: it_test_process_061
* @tc.desc: function for killpg: The killpg parameter is incorrect and the error code is verified.
* @tc.type: FUNC
* @tc.require: AR000E0QAB
*/
HWTEST_F(ProcessProcessTest, ItTestProcess061, TestSize.Level0)
{
ItTestProcess061();
}
/* *
* @tc.name: it_test_process_062
* @tc.desc: function for killpg:Fork two processes. The killpg sends a signal to the current process group.
* The other two processes can receive the signal.
* @tc.type: FUNC
* @tc.require: AR000E0QAB
*/
HWTEST_F(ProcessProcessTest, ItTestProcess062, TestSize.Level0)
{
ItTestProcess062();
}
/* *
* @tc.name: it_test_process_063
* @tc.desc: function for posix_spawn: The file path, argv command, and envp environment variable are invalid.
@@ -893,4 +836,63 @@ HWTEST_F(ProcessProcessTest, ItTestProcessSmp008, TestSize.Level0)
}
#endif
#endif
#if defined(LOSCFG_USER_TEST_FULL)
/* *
* @tc.name: it_test_process_053
* @tc.desc: function for killpg:Sends a signal to the process group,
* Other processes in the process group can receive the signal.
* @tc.type: FUNC
* @tc.require: AR000E0QAB
*/
HWTEST_F(ProcessProcessTest, ItTestProcess053, TestSize.Level0)
{
ItTestProcess053();
}
/* *
* @tc.name: it_test_process_054
* @tc.desc: function for waitid: The waitid parameter is incorrect and the error code is verified.
* @tc.type: FUNC
* @tc.require: AR000E0QAB
*/
HWTEST_F(ProcessProcessTest, ItTestProcess054, TestSize.Level0)
{
ItTestProcess054();
}
/* *
* @tc.name: it_test_process_055
* @tc.desc: function for waitid:To test the function of transferring different parameters of the waitid.
* @tc.type: FUNC
* @tc.require: AR000E0QAB
*/
HWTEST_F(ProcessProcessTest, ItTestProcess055, TestSize.Level0)
{
ItTestProcess055();
}
/* *
* @tc.name: it_test_process_061
* @tc.desc: function for killpg: The killpg parameter is incorrect and the error code is verified.
* @tc.type: FUNC
* @tc.require: AR000E0QAB
*/
HWTEST_F(ProcessProcessTest, ItTestProcess061, TestSize.Level0)
{
ItTestProcess061();
}
/* *
* @tc.name: it_test_process_062
* @tc.desc: function for killpg:Fork two processes. The killpg sends a signal to the current process group.
* The other two processes can receive the signal.
* @tc.type: FUNC
* @tc.require: AR000E0QAB
*/
HWTEST_F(ProcessProcessTest, ItTestProcess062, TestSize.Level0)
{
ItTestProcess062();
}
#endif
} // namespace OHOS