mirror of
https://gitee.com/openharmony/startup_init
synced 2024-11-24 00:30:12 +00:00
modify ut name
Signed-off-by: yh <yanghao236@huawei.com>
This commit is contained in:
parent
7e1703f9de
commit
c58100c27c
@ -210,7 +210,7 @@ HWTEST_F(DeviceInfoUnittest, Init_TestDeviceInfoProxy_001, TestSize.Level1)
|
||||
auto remotePtr = device_info::DeviceInfoKits::GetInstance().GetService(lock);
|
||||
ASSERT_NE(remotePtr, nullptr);
|
||||
auto remote = remotePtr->AsObject();
|
||||
sptr<device_info::DeviceInfoProxy> proxy = new(std::nothrow) device_info::DeviceInfoProxy(remote);
|
||||
proxy = new(std::nothrow) device_info::DeviceInfoProxy(remote);
|
||||
ASSERT_NE(proxy, nullptr);
|
||||
}
|
||||
device_info::DeviceInfoKits::GetInstance().FinishStartSASuccess(proxy->AsObject());
|
||||
|
@ -253,12 +253,17 @@ HWTEST_F(InnerkitsUnitTest, Init_InnerkitsTest_MountAllWithFstabFile001, TestSiz
|
||||
EXPECT_EQ(GetMountStatusForMountPoint(nullptr), -1);
|
||||
FstabItem fstabItem = {};
|
||||
fstabItem.fsType = strdup("notSupport");
|
||||
fstabItem.mountPoint = strdup("");
|
||||
EXPECT_EQ(MountOneItem(nullptr), -1);
|
||||
EXPECT_EQ(MountOneItem(&fstabItem), 0);
|
||||
if (fstabItem.fsType != nullptr) {
|
||||
free(fstabItem.fsType);
|
||||
fstabItem.fsType = nullptr;
|
||||
}
|
||||
if (fstabItem.mountPoint != nullptr) {
|
||||
free(fstabItem.mountPoint);
|
||||
fstabItem.mountPoint = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
#define SYSCAP_MAX_SIZE 100
|
||||
|
@ -240,27 +240,27 @@ private:
|
||||
ParamTaskPtr serverTask_ = nullptr;
|
||||
};
|
||||
|
||||
HWTEST_F(LoopEventUnittest, LeTaskTest, TestSize.Level1)
|
||||
HWTEST_F(LoopEventUnittest, Init_LeTaskTest_001, TestSize.Level1)
|
||||
{
|
||||
LoopEventUnittest loopevtest = LoopEventUnittest();
|
||||
loopevtest.LeTaskTest();
|
||||
}
|
||||
HWTEST_F(LoopEventUnittest, runServerTest, TestSize.Level1)
|
||||
HWTEST_F(LoopEventUnittest, Init_TestRunServer_001, TestSize.Level1)
|
||||
{
|
||||
LoopEventUnittest loopevtest = LoopEventUnittest();
|
||||
loopevtest.ProcessEventTest();
|
||||
}
|
||||
HWTEST_F(LoopEventUnittest, ProcessasynEvent, TestSize.Level1)
|
||||
HWTEST_F(LoopEventUnittest, Init_TestProcessasynEvent_001, TestSize.Level1)
|
||||
{
|
||||
LoopEventUnittest loopevtest = LoopEventUnittest();
|
||||
loopevtest.ProcessasynEvent();
|
||||
}
|
||||
HWTEST_F(LoopEventUnittest, CreateSocketTest, TestSize.Level1)
|
||||
HWTEST_F(LoopEventUnittest, Init_TestCreateSocketTest_001, TestSize.Level1)
|
||||
{
|
||||
LoopEventUnittest loopevtest = LoopEventUnittest();
|
||||
loopevtest.CreateSocketTest();
|
||||
}
|
||||
HWTEST_F(LoopEventUnittest, ProcessWatcherTask, TestSize.Level1)
|
||||
HWTEST_F(LoopEventUnittest, Init_TestProcessWatcherTask_001, TestSize.Level1)
|
||||
{
|
||||
LoopEventUnittest loopevtest = LoopEventUnittest();
|
||||
loopevtest.ProcessWatcherTask();
|
||||
@ -277,7 +277,7 @@ static void Test_ProcessTimer(const TimerHandle taskHandle, void *context)
|
||||
}
|
||||
}
|
||||
|
||||
HWTEST_F(LoopEventUnittest, LoopAbnormalTest, TestSize.Level1)
|
||||
HWTEST_F(LoopEventUnittest, Init_TestLoopAbnormal_001, TestSize.Level1)
|
||||
{
|
||||
LE_StartWatcher(nullptr, nullptr, nullptr, nullptr);
|
||||
LE_WatchInfo info = {};
|
||||
@ -289,14 +289,14 @@ HWTEST_F(LoopEventUnittest, LoopAbnormalTest, TestSize.Level1)
|
||||
LE_StartWatcher(LE_GetDefaultLoop(), nullptr, nullptr, nullptr);
|
||||
}
|
||||
|
||||
HWTEST_F(LoopEventUnittest, LoopIdleTest, TestSize.Level1)
|
||||
HWTEST_F(LoopEventUnittest, Init_TestLoopIdle_001, TestSize.Level1)
|
||||
{
|
||||
int ret = LE_DelayProc(LE_GetDefaultLoop(), nullptr, nullptr);
|
||||
ASSERT_NE(ret, 0);
|
||||
LE_DelIdle(nullptr);
|
||||
}
|
||||
|
||||
HWTEST_F(LoopEventUnittest, LE_FreeBufferTest, TestSize.Level1)
|
||||
HWTEST_F(LoopEventUnittest, Init_TestLEFreeBuffer_001, TestSize.Level1)
|
||||
{
|
||||
uint64_t eventId = 0;
|
||||
BufferHandle handle = LE_CreateBuffer(LE_GetDefaultLoop(), 1 + sizeof(eventId));
|
||||
|
@ -329,13 +329,13 @@ private:
|
||||
std::thread *serverThread_ = nullptr;
|
||||
};
|
||||
|
||||
HWTEST_F(LoopServerUnitTest, TestRunServer, TestSize.Level1)
|
||||
HWTEST_F(LoopServerUnitTest, Init_TestRunServer_001, TestSize.Level1)
|
||||
{
|
||||
LoopServerUnitTest test;
|
||||
test.StartServer();
|
||||
}
|
||||
|
||||
HWTEST_F(LoopServerUnitTest, TestPipConnect, TestSize.Level1)
|
||||
HWTEST_F(LoopServerUnitTest, Init_TestPipConnect_001, TestSize.Level1)
|
||||
{
|
||||
g_cmd = 2; // 2 only close client
|
||||
LoopServerUnitTest test;
|
||||
@ -348,7 +348,7 @@ HWTEST_F(LoopServerUnitTest, TestPipConnect, TestSize.Level1)
|
||||
g_loopClient_ = nullptr;
|
||||
}
|
||||
|
||||
HWTEST_F(LoopServerUnitTest, TestTcpConnect, TestSize.Level1)
|
||||
HWTEST_F(LoopServerUnitTest, Init_TestTcpConnect_001, TestSize.Level1)
|
||||
{
|
||||
g_cmd = 2; // 2 only close client
|
||||
LoopServerUnitTest test;
|
||||
@ -361,7 +361,7 @@ HWTEST_F(LoopServerUnitTest, TestTcpConnect, TestSize.Level1)
|
||||
g_loopClient_ = nullptr;
|
||||
}
|
||||
|
||||
HWTEST_F(LoopServerUnitTest, TestTimer, TestSize.Level1)
|
||||
HWTEST_F(LoopServerUnitTest, Init_TestTimer_001, TestSize.Level1)
|
||||
{
|
||||
LoopServerUnitTest test;
|
||||
g_maxCount = 2; // 2 stop
|
||||
@ -372,7 +372,7 @@ HWTEST_F(LoopServerUnitTest, TestTimer, TestSize.Level1)
|
||||
g_loopClient_ = nullptr;
|
||||
}
|
||||
|
||||
HWTEST_F(LoopServerUnitTest, TestTimer2, TestSize.Level1)
|
||||
HWTEST_F(LoopServerUnitTest, Init_TestTimer_002, TestSize.Level1)
|
||||
{
|
||||
LoopServerUnitTest test;
|
||||
g_maxCount = 3; // 3 stop timer
|
||||
@ -383,7 +383,7 @@ HWTEST_F(LoopServerUnitTest, TestTimer2, TestSize.Level1)
|
||||
g_loopClient_ = nullptr;
|
||||
}
|
||||
|
||||
HWTEST_F(LoopServerUnitTest, TestWatcher, TestSize.Level1)
|
||||
HWTEST_F(LoopServerUnitTest, Init_TestWatcher_001, TestSize.Level1)
|
||||
{
|
||||
int fd = open(WATCHER_FILE.c_str(), O_RDWR | O_CREAT | O_CLOEXEC, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
|
||||
if (fd >= 0) {
|
||||
@ -405,7 +405,7 @@ HWTEST_F(LoopServerUnitTest, TestWatcher, TestSize.Level1)
|
||||
g_loopClient_ = nullptr;
|
||||
}
|
||||
|
||||
HWTEST_F(LoopServerUnitTest, TestStopServer, TestSize.Level1)
|
||||
HWTEST_F(LoopServerUnitTest, Init_TestStopServer_001, TestSize.Level1)
|
||||
{
|
||||
g_cmd = 5; // 5 close server
|
||||
LoopServerUnitTest test;
|
||||
@ -418,7 +418,7 @@ HWTEST_F(LoopServerUnitTest, TestStopServer, TestSize.Level1)
|
||||
g_loopClient_ = nullptr;
|
||||
}
|
||||
|
||||
HWTEST_F(LoopServerUnitTest, Init_LoopServerTest_ServerTimeout008, TestSize.Level1)
|
||||
HWTEST_F(LoopServerUnitTest, Init_TestServerTimeout_001, TestSize.Level1)
|
||||
{
|
||||
int flag = TASK_STREAM | TASK_PIPE | TASK_SERVER | TASK_TEST;
|
||||
int serverSock = CreateSocket(flag, "/data/test1pipe");
|
||||
|
@ -41,7 +41,7 @@ public:
|
||||
void TearDown() {};
|
||||
};
|
||||
|
||||
HWTEST_F(LoopSignalUnitTest, SignalInitTestRmSig, TestSize.Level1)
|
||||
HWTEST_F(LoopSignalUnitTest, Init_TestSignalInitTestRmSig_001, TestSize.Level1)
|
||||
{
|
||||
static LoopHandle loopClient = nullptr;
|
||||
LE_STATUS status = LE_CreateLoop(&loopClient);
|
||||
|
Loading…
Reference in New Issue
Block a user