提交 444f44ad 编写于 作者: C chuaizhzh

fix failed testcase

Change-Id: I8d928d1b3408752ca76f627dcb26e947a3b85745
上级 60a9a17d
......@@ -22,6 +22,9 @@ using namespace testing::ext;
// delete test file and dir
void DeleteTestFiles()
{
if (access(TOP_DIR "/DIR_NEW", F_OK) == 0) {
RemoveDir(TOP_DIR "/DIR_NEW");
}
if (access(TOP_DIR "/" DIR0, F_OK) == 0) {
RemoveDir(TOP_DIR "/" DIR0);
}
......
......@@ -324,6 +324,7 @@ HWTEST_F(FileSystemTest, testOpenEisdir, Function | MediumTest | Level2)
fd = open(DIR0, O_RDWR, 0777);
EXPECT_EQ(fd, -1) << "> Should open failed";
EXPECT_EQ(errno, EISDIR);
close(fd);
}
/**
......
......@@ -50,7 +50,7 @@ HWTEST_F(ProcessTest, testLineBigExit, Function | MediumTest | Level2)
}
Msleep(50);
exitCode = 0;
ASSERT_EQ(CheckProcStatus(pid, &exitCode), 1);
ASSERT_EQ(CheckProcStatus(pid, &exitCode, 0), 1);
ASSERT_EQ(exitCode, reInt[i]);
}
}
......@@ -160,7 +160,7 @@ HWTEST_F(ProcessTest, testLineExit, Function | MediumTest | Level2)
}
Msleep(50);
exitCode = 0;
ASSERT_EQ(CheckProcStatus(pid, &exitCode), 1);
ASSERT_EQ(CheckProcStatus(pid, &exitCode, 0), 1);
ASSERT_EQ(exitCode, reInt[i]);
}
}
......@@ -270,7 +270,7 @@ HWTEST_F(ProcessTest, testExit, Function | MediumTest | Level2)
}
Msleep(50);
exitCode = 0;
ASSERT_EQ(CheckProcStatus(pid, &exitCode), 1);
ASSERT_EQ(CheckProcStatus(pid, &exitCode, 0), 1);
ASSERT_EQ(exitCode, reInt[i]);
}
}
......@@ -343,7 +343,7 @@ int FunctionAssertFalse(void)
}
Msleep(50);
int exitCode = 0;
int reInt = CheckProcStatus(pid, &exitCode);
int reInt = CheckProcStatus(pid, &exitCode, 0);
if ((reInt == 2) && (exitCode == SIGABRT)) {
LOG("> Success");
return 1;
......@@ -368,7 +368,7 @@ HWTEST_F(ProcessTest, testAssertFalse, Function | MediumTest | Level3)
}
Msleep(50);
int exitCode = 0;
ASSERT_EQ(CheckProcStatus(pid, &exitCode), 2);
ASSERT_EQ(CheckProcStatus(pid, &exitCode, 0), 2);
ASSERT_EQ(exitCode, SIGABRT);
}
......@@ -534,5 +534,6 @@ HWTEST_F(ProcessTest, testWaitPidTest, Function | MediumTest | Level3)
EXPECT_EQ(expectPid, 1);
EXPECT_EQ(pidChild, 0);
Msleep(50);
WaitProcExitedOK(pid);
DeleteGlobalVariable();
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册