test: 添加sys模块接口的测试用例
把测试用例放在full中,需要依赖文件group和passwd,放在/etc下 Change-Id: Ie038b64db96180b52ee10d70d494da42207d3b92 Signed-off-by: wjj <502004968@qq.com>
This commit is contained in:
parent
bbdb977b5e
commit
7c577d8963
|
@ -42,7 +42,6 @@ sources_entry = [
|
|||
]
|
||||
|
||||
sources_smoke = [
|
||||
"smoke/sys_test_001.cpp",
|
||||
"smoke/sys_test_004.cpp",
|
||||
"smoke/sys_test_005.cpp",
|
||||
"smoke/sys_test_006.cpp",
|
||||
|
@ -56,23 +55,24 @@ sources_smoke = [
|
|||
"smoke/sys_test_015.cpp",
|
||||
"smoke/sys_test_016.cpp",
|
||||
"smoke/sys_test_017.cpp",
|
||||
"smoke/sys_test_018.cpp",
|
||||
"smoke/sys_test_019.cpp",
|
||||
"smoke/sys_test_020.cpp",
|
||||
"smoke/sys_test_021.cpp",
|
||||
"smoke/sys_test_022.cpp",
|
||||
"smoke/sys_test_023.cpp",
|
||||
"smoke/sys_test_024.cpp",
|
||||
"smoke/sys_test_025.cpp",
|
||||
"smoke/sys_test_026.cpp",
|
||||
"smoke/sys_test_027.cpp",
|
||||
"smoke/sys_test_028.cpp",
|
||||
"smoke/sys_test_029.cpp",
|
||||
"smoke/sys_test_030.cpp",
|
||||
"smoke/sys_test_031.cpp",
|
||||
]
|
||||
|
||||
sources_full = [
|
||||
"full/sys_test_001.cpp",
|
||||
"full/sys_test_018.cpp",
|
||||
"full/sys_test_019.cpp",
|
||||
"full/sys_test_020.cpp",
|
||||
"full/sys_test_021.cpp",
|
||||
"full/sys_test_022.cpp",
|
||||
"full/sys_test_023.cpp",
|
||||
"full/sys_test_024.cpp",
|
||||
"full/sys_test_025.cpp",
|
||||
"full/sys_test_026.cpp",
|
||||
"full/sys_test_027.cpp",
|
||||
"full/sys_test_028.cpp",
|
||||
]
|
||||
|
||||
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
|
||||
|
|
|
@ -57,10 +57,12 @@ static UINT32 TestCase(VOID)
|
|||
ICUNIT_ASSERT_EQUAL(grp3->gr_gid, 2, -1);
|
||||
|
||||
setgrent();
|
||||
|
||||
grp4 = getgrent();
|
||||
ICUNIT_ASSERT_NOT_EQUAL(grp4, nullptr, -1);
|
||||
ICUNIT_ASSERT_STRING_EQUAL(grp1->gr_name, grp4->gr_name, -1);
|
||||
|
||||
setgrent();
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -41,7 +41,7 @@ static UINT32 TestCase(VOID)
|
|||
int id1 = 1;
|
||||
int id2 = 2;
|
||||
char *str1 = "/storage/1.txt";
|
||||
char *str2 = "/storage/2.txt";
|
||||
char *str2 = "/etc/2.txt";
|
||||
|
||||
fd = open(str1, O_CREAT);
|
||||
if (fd < 0) {
|
|
@ -219,4 +219,138 @@ HWTEST_F(SysTest, IT_TEST_SYS_031, TestSize.Level0)
|
|||
IT_TEST_SYS_031();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(LOSCFG_USER_TEST_FULL)
|
||||
/* *
|
||||
* @tc.name: IT_TEST_SYS_001
|
||||
* @tc.desc: function for SysTest
|
||||
* @tc.type: FUNC
|
||||
* @tc.require: AR000EEMQ9
|
||||
*/
|
||||
HWTEST_F(SysTest, ItTestSys001, TestSize.Level0)
|
||||
{
|
||||
ItTestSys001();
|
||||
}
|
||||
|
||||
/* *
|
||||
* @tc.name: IT_TEST_SYS_018
|
||||
* @tc.desc: function for SysTest
|
||||
* @tc.type: FUNC
|
||||
* @tc.require: AR000EEMQ9
|
||||
*/
|
||||
HWTEST_F(SysTest, ItTestSys018, TestSize.Level0)
|
||||
{
|
||||
ItTestSys018();
|
||||
}
|
||||
|
||||
/* *
|
||||
* @tc.name: IT_TEST_SYS_019
|
||||
* @tc.desc: function for SysTest
|
||||
* @tc.type: FUNC
|
||||
* @tc.require: AR000EEMQ9
|
||||
*/
|
||||
HWTEST_F(SysTest, ItTestSys019, TestSize.Level0)
|
||||
{
|
||||
ItTestSys019();
|
||||
}
|
||||
|
||||
/* *
|
||||
* @tc.name: IT_TEST_SYS_020
|
||||
* @tc.desc: function for SysTest
|
||||
* @tc.type: FUNC
|
||||
* @tc.require: AR000EEMQ9
|
||||
*/
|
||||
HWTEST_F(SysTest, ItTestSys020, TestSize.Level0)
|
||||
{
|
||||
ItTestSys020();
|
||||
}
|
||||
|
||||
/* *
|
||||
* @tc.name: IT_TEST_SYS_021
|
||||
* @tc.desc: function for SysTest
|
||||
* @tc.type: FUNC
|
||||
* @tc.require: AR000EEMQ9
|
||||
*/
|
||||
HWTEST_F(SysTest, ItTestSys021, TestSize.Level0)
|
||||
{
|
||||
ItTestSys021();
|
||||
}
|
||||
|
||||
/* *
|
||||
* @tc.name: IT_TEST_SYS_022
|
||||
* @tc.desc: function for SysTest
|
||||
* @tc.type: FUNC
|
||||
* @tc.require: AR000EEMQ9
|
||||
*/
|
||||
HWTEST_F(SysTest, ItTestSys022, TestSize.Level0)
|
||||
{
|
||||
ItTestSys022();
|
||||
}
|
||||
|
||||
/* *
|
||||
* @tc.name: IT_TEST_SYS_023
|
||||
* @tc.desc: function for SysTest
|
||||
* @tc.type: FUNC
|
||||
* @tc.require: AR000EEMQ9
|
||||
*/
|
||||
HWTEST_F(SysTest, ItTestSys023, TestSize.Level0)
|
||||
{
|
||||
ItTestSys023();
|
||||
}
|
||||
|
||||
/* *
|
||||
* @tc.name: IT_TEST_SYS_024
|
||||
* @tc.desc: function for SysTest
|
||||
* @tc.type: FUNC
|
||||
* @tc.require: AR000EEMQ9
|
||||
*/
|
||||
HWTEST_F(SysTest, ItTestSys024, TestSize.Level0)
|
||||
{
|
||||
ItTestSys024();
|
||||
}
|
||||
|
||||
/* *
|
||||
* @tc.name: IT_TEST_SYS_025
|
||||
* @tc.desc: function for SysTest
|
||||
* @tc.type: FUNC
|
||||
* @tc.require: AR000EEMQ9
|
||||
*/
|
||||
HWTEST_F(SysTest, ItTestSys025, TestSize.Level0)
|
||||
{
|
||||
ItTestSys025();
|
||||
}
|
||||
|
||||
/* *
|
||||
* @tc.name: IT_TEST_SYS_025
|
||||
* @tc.desc: function for SysTest
|
||||
* @tc.type: FUNC
|
||||
* @tc.require: AR000EEMQ9
|
||||
*/
|
||||
HWTEST_F(SysTest, ItTestSys026, TestSize.Level0)
|
||||
{
|
||||
ItTestSys026();
|
||||
}
|
||||
|
||||
/* *
|
||||
* @tc.name: IT_TEST_SYS_027
|
||||
* @tc.desc: function for ftok normal test
|
||||
* @tc.type: FUNC
|
||||
* @tc.require: AR000EEMQ9
|
||||
*/
|
||||
HWTEST_F(SysTest, ItTestSys027, TestSize.Level0)
|
||||
{
|
||||
ItTestSys027();
|
||||
}
|
||||
|
||||
/* *
|
||||
* @tc.name: IT_TEST_SYS_028
|
||||
* @tc.desc: function for nice:set pthread priority
|
||||
* @tc.type: FUNC
|
||||
* @tc.require: AR000EEMQ9
|
||||
*/
|
||||
HWTEST_F(SysTest, IT_TEST_SYS_028, TestSize.Level0)
|
||||
{
|
||||
IT_TEST_SYS_028();
|
||||
}
|
||||
#endif
|
||||
} // namespace OHOS
|
||||
|
|
Loading…
Reference in New Issue