add coverity scan
This commit is contained in:
parent
3aa2e24d78
commit
3416d68433
|
@ -906,6 +906,7 @@ int32_t chkpMayDelObsolete(void* arg, int64_t chkpId, char* path) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef BUILD_NO_CALL
|
||||
static int32_t chkpIdComp(const void* a, const void* b) {
|
||||
int64_t x = *(int64_t*)a;
|
||||
int64_t y = *(int64_t*)b;
|
||||
|
@ -964,6 +965,7 @@ int32_t streamBackendLoadCheckpointInfo(void* arg) {
|
|||
taosMemoryFree(chkpPath);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef BUILD_NO_CALL
|
||||
int32_t chkpGetAllDbCfHandle(SStreamMeta* pMeta, rocksdb_column_family_handle_t*** ppHandle, SArray* refs) {
|
||||
|
|
|
@ -410,9 +410,19 @@ TEST_F(BackendEnv, checkOpen) {
|
|||
SArray * result = taosArrayInit(4, sizeof(void *));
|
||||
bkdMgtGetDelta(mgt, p->pTdbState->idstr, 3, result, (char *)dump);
|
||||
|
||||
taskDbDoCheckpoint(p->pTdbState->pOwner->pBackend, 4);
|
||||
|
||||
taosArrayClear(result);
|
||||
bkdMgtGetDelta(mgt, p->pTdbState->idstr, 4, result, (char *)dump);
|
||||
bkdMgtDestroy(mgt);
|
||||
streamStateClose((SStreamState *)p, true);
|
||||
// {
|
||||
// taosRemoveDir("/tmp/backend");
|
||||
// const char * path = "/tmp/backend";
|
||||
// SStreamState *p = stateCreate(path);
|
||||
// }
|
||||
taosRemoveDir(path);
|
||||
// streamStateClose((SStreamState *)p, true);
|
||||
}
|
||||
|
||||
TEST_F(BackendEnv, backendChkp) { const char *path = "/tmp"; }
|
||||
|
@ -430,6 +440,20 @@ TEST_F(BackendEnv, backendUtil) {
|
|||
ASSERT_EQ(nextPow2((uint32_t)(kvDict[i].k)), kvDict[i].v);
|
||||
}
|
||||
}
|
||||
TEST_F(BackendEnv, oldBackendInit) {
|
||||
const char *path = "/tmp/backend1";
|
||||
taosMulMkDir(path);
|
||||
{
|
||||
SBackendWrapper *p = (SBackendWrapper *)streamBackendInit(path, 10, 10);
|
||||
streamBackendCleanup((void *)p);
|
||||
}
|
||||
{
|
||||
SBackendWrapper *p = (SBackendWrapper *)streamBackendInit(path, 10, 10);
|
||||
streamBackendCleanup((void *)p);
|
||||
}
|
||||
|
||||
taosRemoveDir(path);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
testing::InitGoogleTest(&argc, argv);
|
||||
|
|
Loading…
Reference in New Issue