Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
9bd66589
T
TDengine
项目概览
taosdata
/
TDengine
接近 2 年 前同步成功
通知
1192
Star
22018
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
9bd66589
编写于
5月 22, 2022
作者:
wafwerar
提交者:
GitHub
5月 22, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #12821 from taosdata/fix/ZhiqiangWang/fix-15602-win-not-close-file-ctest-error
fix(os): win not close file ctest error
上级
162b6632
8a0d6d6e
变更
48
隐藏空白更改
内联
并排
Showing
48 changed file
with
111 addition
and
103 deletion
+111
-103
include/os/osDir.h
include/os/osDir.h
+6
-0
source/dnode/mgmt/test/bnode/dbnode.cpp
source/dnode/mgmt/test/bnode/dbnode.cpp
+1
-1
source/dnode/mgmt/test/mnode/dmnode.cpp
source/dnode/mgmt/test/mnode/dmnode.cpp
+1
-1
source/dnode/mgmt/test/qnode/dqnode.cpp
source/dnode/mgmt/test/qnode/dqnode.cpp
+1
-1
source/dnode/mgmt/test/snode/dsnode.cpp
source/dnode/mgmt/test/snode/dsnode.cpp
+1
-1
source/dnode/mgmt/test/sut/src/sut.cpp
source/dnode/mgmt/test/sut/src/sut.cpp
+1
-1
source/dnode/mgmt/test/vnode/vnode.cpp
source/dnode/mgmt/test/vnode/vnode.cpp
+1
-1
source/dnode/mnode/impl/test/acct/acct.cpp
source/dnode/mnode/impl/test/acct/acct.cpp
+1
-1
source/dnode/mnode/impl/test/bnode/mbnode.cpp
source/dnode/mnode/impl/test/bnode/mbnode.cpp
+2
-2
source/dnode/mnode/impl/test/db/db.cpp
source/dnode/mnode/impl/test/db/db.cpp
+1
-1
source/dnode/mnode/impl/test/dnode/mdnode.cpp
source/dnode/mnode/impl/test/dnode/mdnode.cpp
+5
-5
source/dnode/mnode/impl/test/func/func.cpp
source/dnode/mnode/impl/test/func/func.cpp
+1
-1
source/dnode/mnode/impl/test/mnode/mnode.cpp
source/dnode/mnode/impl/test/mnode/mnode.cpp
+2
-2
source/dnode/mnode/impl/test/profile/profile.cpp
source/dnode/mnode/impl/test/profile/profile.cpp
+1
-1
source/dnode/mnode/impl/test/qnode/qnode.cpp
source/dnode/mnode/impl/test/qnode/qnode.cpp
+2
-2
source/dnode/mnode/impl/test/sdb/sdbTest.cpp
source/dnode/mnode/impl/test/sdb/sdbTest.cpp
+3
-3
source/dnode/mnode/impl/test/show/show.cpp
source/dnode/mnode/impl/test/show/show.cpp
+1
-1
source/dnode/mnode/impl/test/sma/sma.cpp
source/dnode/mnode/impl/test/sma/sma.cpp
+1
-1
source/dnode/mnode/impl/test/snode/snode.cpp
source/dnode/mnode/impl/test/snode/snode.cpp
+2
-2
source/dnode/mnode/impl/test/stb/stb.cpp
source/dnode/mnode/impl/test/stb/stb.cpp
+1
-1
source/dnode/mnode/impl/test/topic/topic.cpp
source/dnode/mnode/impl/test/topic/topic.cpp
+1
-1
source/dnode/mnode/impl/test/trans/trans1.cpp
source/dnode/mnode/impl/test/trans/trans1.cpp
+3
-3
source/dnode/mnode/impl/test/trans/trans2.cpp
source/dnode/mnode/impl/test/trans/trans2.cpp
+2
-2
source/dnode/mnode/impl/test/user/user.cpp
source/dnode/mnode/impl/test/user/user.cpp
+1
-1
source/dnode/vnode/test/tqMetaTest.cpp
source/dnode/vnode/test/tqMetaTest.cpp
+1
-1
source/libs/executor/src/executorimpl.c
source/libs/executor/src/executorimpl.c
+1
-1
source/libs/executor/src/groupoperator.c
source/libs/executor/src/groupoperator.c
+1
-1
source/libs/executor/src/scanoperator.c
source/libs/executor/src/scanoperator.c
+1
-1
source/libs/executor/src/tlinearhash.c
source/libs/executor/src/tlinearhash.c
+1
-1
source/libs/executor/src/tsort.c
source/libs/executor/src/tsort.c
+2
-2
source/libs/executor/test/index_executor_tests.cpp
source/libs/executor/test/index_executor_tests.cpp
+1
-1
source/libs/function/src/tpercentile.c
source/libs/function/src/tpercentile.c
+1
-1
source/libs/function/src/udfd.c
source/libs/function/src/udfd.c
+1
-1
source/libs/index/src/indexTfile.c
source/libs/index/src/indexTfile.c
+0
-1
source/libs/index/test/fstTest.cc
source/libs/index/test/fstTest.cc
+2
-2
source/libs/index/test/fstUT.cc
source/libs/index/test/fstUT.cc
+1
-1
source/libs/index/test/indexTests.cc
source/libs/index/test/indexTests.cc
+23
-23
source/libs/index/test/jsonUT.cc
source/libs/index/test/jsonUT.cc
+2
-2
source/libs/planner/test/planTestMain.cpp
source/libs/planner/test/planTestMain.cpp
+1
-1
source/libs/tfs/test/tfsTest.cpp
source/libs/tfs/test/tfsTest.cpp
+10
-10
source/libs/transport/test/rclient.c
source/libs/transport/test/rclient.c
+1
-1
source/libs/transport/test/rserver.c
source/libs/transport/test/rserver.c
+1
-1
source/libs/transport/test/transUT.cpp
source/libs/transport/test/transUT.cpp
+3
-3
source/libs/wal/src/walWrite.c
source/libs/wal/src/walWrite.c
+2
-0
source/libs/wal/test/walMetaTest.cpp
source/libs/wal/test/walMetaTest.cpp
+5
-4
source/util/test/cfgTest.cpp
source/util/test/cfgTest.cpp
+2
-2
source/util/test/pageBufferTest.cpp
source/util/test/pageBufferTest.cpp
+3
-3
source/util/test/procTest.cpp
source/util/test/procTest.cpp
+3
-3
未找到文件。
include/os/osDir.h
浏览文件 @
9bd66589
...
...
@@ -31,6 +31,12 @@
extern
"C"
{
#endif
#ifdef WINDOWS
#define TD_TMP_DIR_PATH "C:\\Windows\\Temp\\"
#else
#define TD_TMP_DIR_PATH "/tmp/"
#endif
typedef
struct
TdDir
*
TdDirPtr
;
typedef
struct
TdDirEntry
*
TdDirEntryPtr
;
...
...
source/dnode/mgmt/test/bnode/dbnode.cpp
浏览文件 @
9bd66589
...
...
@@ -14,7 +14,7 @@
class
DndTestBnode
:
public
::
testing
::
Test
{
protected:
static
void
SetUpTestSuite
()
{
test
.
Init
(
"/tmp/
dbnodeTest"
,
9112
);
test
.
Init
(
TD_TMP_DIR_PATH
"
dbnodeTest"
,
9112
);
taosMsleep
(
1100
);
}
static
void
TearDownTestSuite
()
{
test
.
Cleanup
();
}
...
...
source/dnode/mgmt/test/mnode/dmnode.cpp
浏览文件 @
9bd66589
...
...
@@ -13,7 +13,7 @@
class
DndTestMnode
:
public
::
testing
::
Test
{
protected:
static
void
SetUpTestSuite
()
{
test
.
Init
(
"/tmp/
dmnodeTest"
,
9114
);
}
static
void
SetUpTestSuite
()
{
test
.
Init
(
TD_TMP_DIR_PATH
"
dmnodeTest"
,
9114
);
}
static
void
TearDownTestSuite
()
{
test
.
Cleanup
();
}
static
Testbase
test
;
...
...
source/dnode/mgmt/test/qnode/dqnode.cpp
浏览文件 @
9bd66589
...
...
@@ -13,7 +13,7 @@
class
DndTestQnode
:
public
::
testing
::
Test
{
protected:
static
void
SetUpTestSuite
()
{
test
.
Init
(
"/tmp/
dqnodeTest"
,
9111
);
}
static
void
SetUpTestSuite
()
{
test
.
Init
(
TD_TMP_DIR_PATH
"
dqnodeTest"
,
9111
);
}
static
void
TearDownTestSuite
()
{
test
.
Cleanup
();
}
static
Testbase
test
;
...
...
source/dnode/mgmt/test/snode/dsnode.cpp
浏览文件 @
9bd66589
...
...
@@ -13,7 +13,7 @@
class
DndTestSnode
:
public
::
testing
::
Test
{
protected:
static
void
SetUpTestSuite
()
{
test
.
Init
(
"/tmp/
dsnodeTest"
,
9113
);
}
static
void
SetUpTestSuite
()
{
test
.
Init
(
TD_TMP_DIR_PATH
"
dsnodeTest"
,
9113
);
}
static
void
TearDownTestSuite
()
{
test
.
Cleanup
();
}
static
Testbase
test
;
...
...
source/dnode/mgmt/test/sut/src/sut.cpp
浏览文件 @
9bd66589
...
...
@@ -48,7 +48,7 @@ void Testbase::Init(const char* path, int16_t port) {
strcpy
(
tsDataDir
,
path
);
taosRemoveDir
(
path
);
taosMkDir
(
path
);
InitLog
(
"/tmp/
td"
);
InitLog
(
TD_TMP_DIR_PATH
"
td"
);
server
.
Start
();
client
.
Init
(
"root"
,
"taosdata"
);
...
...
source/dnode/mgmt/test/vnode/vnode.cpp
浏览文件 @
9bd66589
...
...
@@ -13,7 +13,7 @@
class
DndTestVnode
:
public
::
testing
::
Test
{
protected:
static
void
SetUpTestSuite
()
{
test
.
Init
(
"/tmp/
dvnodeTest"
,
9115
);
}
static
void
SetUpTestSuite
()
{
test
.
Init
(
TD_TMP_DIR_PATH
"
dvnodeTest"
,
9115
);
}
static
void
TearDownTestSuite
()
{
test
.
Cleanup
();
}
static
Testbase
test
;
...
...
source/dnode/mnode/impl/test/acct/acct.cpp
浏览文件 @
9bd66589
...
...
@@ -13,7 +13,7 @@
class
MndTestAcct
:
public
::
testing
::
Test
{
protected:
static
void
SetUpTestSuite
()
{
test
.
Init
(
"/tmp/
acctTest"
,
9012
);
}
static
void
SetUpTestSuite
()
{
test
.
Init
(
TD_TMP_DIR_PATH
"
acctTest"
,
9012
);
}
static
void
TearDownTestSuite
()
{
test
.
Cleanup
();
}
static
Testbase
test
;
...
...
source/dnode/mnode/impl/test/bnode/mbnode.cpp
浏览文件 @
9bd66589
...
...
@@ -18,11 +18,11 @@ class MndTestBnode : public ::testing::Test {
public:
static
void
SetUpTestSuite
()
{
test
.
Init
(
"/tmp/
mnode_test_bnode1"
,
9018
);
test
.
Init
(
TD_TMP_DIR_PATH
"
mnode_test_bnode1"
,
9018
);
const
char
*
fqdn
=
"localhost"
;
const
char
*
firstEp
=
"localhost:9018"
;
server2
.
Start
(
"/tmp/
mnode_test_bnode2"
,
9019
);
server2
.
Start
(
TD_TMP_DIR_PATH
"
mnode_test_bnode2"
,
9019
);
taosMsleep
(
300
);
}
...
...
source/dnode/mnode/impl/test/db/db.cpp
浏览文件 @
9bd66589
...
...
@@ -13,7 +13,7 @@
class
MndTestDb
:
public
::
testing
::
Test
{
protected:
static
void
SetUpTestSuite
()
{
test
.
Init
(
"/tmp/
mnode_test_db"
,
9030
);
}
static
void
SetUpTestSuite
()
{
test
.
Init
(
TD_TMP_DIR_PATH
"
mnode_test_db"
,
9030
);
}
static
void
TearDownTestSuite
()
{
test
.
Cleanup
();
}
static
Testbase
test
;
...
...
source/dnode/mnode/impl/test/dnode/mdnode.cpp
浏览文件 @
9bd66589
...
...
@@ -18,14 +18,14 @@ class MndTestDnode : public ::testing::Test {
public:
static
void
SetUpTestSuite
()
{
test
.
Init
(
"/tmp/
dnode_test_dnode1"
,
9023
);
test
.
Init
(
TD_TMP_DIR_PATH
"
dnode_test_dnode1"
,
9023
);
const
char
*
fqdn
=
"localhost"
;
const
char
*
firstEp
=
"localhost:9023"
;
// server2.Start(
"/tmp/
dnode_test_dnode2", fqdn, 9024, firstEp);
// server3.Start(
"/tmp/
dnode_test_dnode3", fqdn, 9025, firstEp);
// server4.Start(
"/tmp/
dnode_test_dnode4", fqdn, 9026, firstEp);
// server5.Start(
"/tmp/
dnode_test_dnode5", fqdn, 9027, firstEp);
// server2.Start(
TD_TMP_DIR_PATH "
dnode_test_dnode2", fqdn, 9024, firstEp);
// server3.Start(
TD_TMP_DIR_PATH "
dnode_test_dnode3", fqdn, 9025, firstEp);
// server4.Start(
TD_TMP_DIR_PATH "
dnode_test_dnode4", fqdn, 9026, firstEp);
// server5.Start(
TD_TMP_DIR_PATH "
dnode_test_dnode5", fqdn, 9027, firstEp);
taosMsleep
(
300
);
}
...
...
source/dnode/mnode/impl/test/func/func.cpp
浏览文件 @
9bd66589
...
...
@@ -13,7 +13,7 @@
class
MndTestFunc
:
public
::
testing
::
Test
{
protected:
static
void
SetUpTestSuite
()
{
test
.
Init
(
"/tmp/
mnode_test_func"
,
9038
);
}
static
void
SetUpTestSuite
()
{
test
.
Init
(
TD_TMP_DIR_PATH
"
mnode_test_func"
,
9038
);
}
static
void
TearDownTestSuite
()
{
test
.
Cleanup
();
}
static
Testbase
test
;
...
...
source/dnode/mnode/impl/test/mnode/mnode.cpp
浏览文件 @
9bd66589
...
...
@@ -18,11 +18,11 @@ class MndTestMnode : public ::testing::Test {
public:
static
void
SetUpTestSuite
()
{
test
.
Init
(
"/tmp/
mnode_test_mnode1"
,
9028
);
test
.
Init
(
TD_TMP_DIR_PATH
"
mnode_test_mnode1"
,
9028
);
const
char
*
fqdn
=
"localhost"
;
const
char
*
firstEp
=
"localhost:9028"
;
// server2.Start(
"/tmp/
mnode_test_mnode2", fqdn, 9029, firstEp);
// server2.Start(
TD_TMP_DIR_PATH "
mnode_test_mnode2", fqdn, 9029, firstEp);
taosMsleep
(
300
);
}
...
...
source/dnode/mnode/impl/test/profile/profile.cpp
浏览文件 @
9bd66589
...
...
@@ -13,7 +13,7 @@
class
MndTestProfile
:
public
::
testing
::
Test
{
protected:
static
void
SetUpTestSuite
()
{
test
.
Init
(
"/tmp/
mnode_test_profile"
,
9031
);
}
static
void
SetUpTestSuite
()
{
test
.
Init
(
TD_TMP_DIR_PATH
"
mnode_test_profile"
,
9031
);
}
static
void
TearDownTestSuite
()
{
test
.
Cleanup
();
}
static
Testbase
test
;
...
...
source/dnode/mnode/impl/test/qnode/qnode.cpp
浏览文件 @
9bd66589
...
...
@@ -18,11 +18,11 @@ class MndTestQnode : public ::testing::Test {
public:
static
void
SetUpTestSuite
()
{
test
.
Init
(
"/tmp/
mnode_test_qnode1"
,
9014
);
test
.
Init
(
TD_TMP_DIR_PATH
"
mnode_test_qnode1"
,
9014
);
const
char
*
fqdn
=
"localhost"
;
const
char
*
firstEp
=
"localhost:9014"
;
// server2.Start(
"/tmp/
mnode_test_qnode2", fqdn, 9015, firstEp);
// server2.Start(
TD_TMP_DIR_PATH "
mnode_test_qnode2", fqdn, 9015, firstEp);
taosMsleep
(
300
);
}
...
...
source/dnode/mnode/impl/test/sdb/sdbTest.cpp
浏览文件 @
9bd66589
...
...
@@ -31,7 +31,7 @@ class MndTestSdb : public ::testing::Test {
tsLogEmbedded
=
1
;
tsAsyncLog
=
0
;
const
char
*
path
=
"/tmp/
td"
;
const
char
*
path
=
TD_TMP_DIR_PATH
"
td"
;
taosRemoveDir
(
path
);
taosMkDir
(
path
);
tstrncpy
(
tsLogDir
,
path
,
PATH_MAX
);
...
...
@@ -385,7 +385,7 @@ TEST_F(MndTestSdb, 01_Write_Str) {
mnode
.
v100
=
100
;
mnode
.
v200
=
200
;
opt
.
pMnode
=
&
mnode
;
opt
.
path
=
"/tmp/
mnode_test_sdb"
;
opt
.
path
=
TD_TMP_DIR_PATH
"
mnode_test_sdb"
;
taosRemoveDir
(
opt
.
path
);
SSdbTable
strTable1
;
...
...
@@ -730,7 +730,7 @@ TEST_F(MndTestSdb, 01_Read_Str) {
mnode
.
v100
=
100
;
mnode
.
v200
=
200
;
opt
.
pMnode
=
&
mnode
;
opt
.
path
=
"/tmp/
mnode_test_sdb"
;
opt
.
path
=
TD_TMP_DIR_PATH
"
mnode_test_sdb"
;
SSdbTable
strTable1
;
memset
(
&
strTable1
,
0
,
sizeof
(
SSdbTable
));
...
...
source/dnode/mnode/impl/test/show/show.cpp
浏览文件 @
9bd66589
...
...
@@ -13,7 +13,7 @@
class
MndTestShow
:
public
::
testing
::
Test
{
protected:
static
void
SetUpTestSuite
()
{
test
.
Init
(
"/tmp/
mnode_test_show"
,
9021
);
}
static
void
SetUpTestSuite
()
{
test
.
Init
(
TD_TMP_DIR_PATH
"
mnode_test_show"
,
9021
);
}
static
void
TearDownTestSuite
()
{
test
.
Cleanup
();
}
static
Testbase
test
;
...
...
source/dnode/mnode/impl/test/sma/sma.cpp
浏览文件 @
9bd66589
...
...
@@ -13,7 +13,7 @@
class
MndTestSma
:
public
::
testing
::
Test
{
protected:
static
void
SetUpTestSuite
()
{
test
.
Init
(
"/tmp/
mnode_test_sma"
,
9035
);
}
static
void
SetUpTestSuite
()
{
test
.
Init
(
TD_TMP_DIR_PATH
"
mnode_test_sma"
,
9035
);
}
static
void
TearDownTestSuite
()
{
test
.
Cleanup
();
}
static
Testbase
test
;
...
...
source/dnode/mnode/impl/test/snode/snode.cpp
浏览文件 @
9bd66589
...
...
@@ -18,11 +18,11 @@ class MndTestSnode : public ::testing::Test {
public:
static
void
SetUpTestSuite
()
{
test
.
Init
(
"/tmp/
mnode_test_snode1"
,
9016
);
test
.
Init
(
TD_TMP_DIR_PATH
"
mnode_test_snode1"
,
9016
);
const
char
*
fqdn
=
"localhost"
;
const
char
*
firstEp
=
"localhost:9016"
;
// server2.Start(
"/tmp/
mnode_test_snode2", fqdn, 9017, firstEp);
// server2.Start(
TD_TMP_DIR_PATH "
mnode_test_snode2", fqdn, 9017, firstEp);
taosMsleep
(
300
);
}
...
...
source/dnode/mnode/impl/test/stb/stb.cpp
浏览文件 @
9bd66589
...
...
@@ -13,7 +13,7 @@
class
MndTestStb
:
public
::
testing
::
Test
{
protected:
static
void
SetUpTestSuite
()
{
test
.
Init
(
"/tmp/
mnode_test_stb"
,
9034
);
}
static
void
SetUpTestSuite
()
{
test
.
Init
(
TD_TMP_DIR_PATH
"
mnode_test_stb"
,
9034
);
}
static
void
TearDownTestSuite
()
{
test
.
Cleanup
();
}
static
Testbase
test
;
...
...
source/dnode/mnode/impl/test/topic/topic.cpp
浏览文件 @
9bd66589
...
...
@@ -13,7 +13,7 @@
class
MndTestTopic
:
public
::
testing
::
Test
{
protected:
static
void
SetUpTestSuite
()
{
test
.
Init
(
"/tmp/
mnode_test_topic"
,
9039
);
}
static
void
SetUpTestSuite
()
{
test
.
Init
(
TD_TMP_DIR_PATH
"
mnode_test_topic"
,
9039
);
}
static
void
TearDownTestSuite
()
{
test
.
Cleanup
();
}
static
Testbase
test
;
...
...
source/dnode/mnode/impl/test/trans/trans1.cpp
浏览文件 @
9bd66589
...
...
@@ -14,10 +14,10 @@
class
MndTestTrans1
:
public
::
testing
::
Test
{
protected:
static
void
SetUpTestSuite
()
{
test
.
Init
(
"/tmp/
mnode_test_trans1"
,
9013
);
test
.
Init
(
TD_TMP_DIR_PATH
"
mnode_test_trans1"
,
9013
);
const
char
*
fqdn
=
"localhost"
;
const
char
*
firstEp
=
"localhost:9013"
;
// server2.Start(
"/tmp/
mnode_test_trans2", fqdn, 9020, firstEp);
// server2.Start(
TD_TMP_DIR_PATH "
mnode_test_trans2", fqdn, 9020, firstEp);
}
static
void
TearDownTestSuite
()
{
...
...
@@ -26,7 +26,7 @@ class MndTestTrans1 : public ::testing::Test {
}
static
void
KillThenRestartServer
()
{
char
file
[
PATH_MAX
]
=
"/tmp/
mnode_test_trans1/mnode/data/sdb.data"
;
char
file
[
PATH_MAX
]
=
TD_TMP_DIR_PATH
"
mnode_test_trans1/mnode/data/sdb.data"
;
TdFilePtr
pFile
=
taosOpenFile
(
file
,
TD_FILE_READ
);
int32_t
size
=
3
*
1024
*
1024
;
void
*
buffer
=
taosMemoryMalloc
(
size
);
...
...
source/dnode/mnode/impl/test/trans/trans2.cpp
浏览文件 @
9bd66589
...
...
@@ -41,7 +41,7 @@ class MndTestTrans2 : public ::testing::Test {
tsLogEmbedded
=
1
;
tsAsyncLog
=
0
;
const
char
*
logpath
=
"/tmp/
td"
;
const
char
*
logpath
=
TD_TMP_DIR_PATH
"
td"
;
taosRemoveDir
(
logpath
);
taosMkDir
(
logpath
);
tstrncpy
(
tsLogDir
,
logpath
,
PATH_MAX
);
...
...
@@ -68,7 +68,7 @@ class MndTestTrans2 : public ::testing::Test {
tsTransPullupInterval
=
1
;
const
char
*
mnodepath
=
"/tmp/
mnode_test_trans"
;
const
char
*
mnodepath
=
TD_TMP_DIR_PATH
"
mnode_test_trans"
;
taosRemoveDir
(
mnodepath
);
pMnode
=
mndOpen
(
mnodepath
,
&
opt
);
mndStart
(
pMnode
);
...
...
source/dnode/mnode/impl/test/user/user.cpp
浏览文件 @
9bd66589
...
...
@@ -13,7 +13,7 @@
class
MndTestUser
:
public
::
testing
::
Test
{
protected:
static
void
SetUpTestSuite
()
{
test
.
Init
(
"/tmp/
mnode_test_user"
,
9011
);
}
static
void
SetUpTestSuite
()
{
test
.
Init
(
TD_TMP_DIR_PATH
"
mnode_test_user"
,
9011
);
}
static
void
TearDownTestSuite
()
{
test
.
Cleanup
();
}
static
Testbase
test
;
...
...
source/dnode/vnode/test/tqMetaTest.cpp
浏览文件 @
9bd66589
...
...
@@ -41,7 +41,7 @@ class TqMetaUpdateAppendTest : public ::testing::Test {
void
TearDown
()
override
{
tqStoreClose
(
pMeta
);
}
STqMetaStore
*
pMeta
;
const
char
*
pathName
=
"/tmp/
tq_test"
;
const
char
*
pathName
=
TD_TMP_DIR_PATH
"
tq_test"
;
};
TEST_F
(
TqMetaUpdateAppendTest
,
copyPutTest
)
{
...
...
source/libs/executor/src/executorimpl.c
浏览文件 @
9bd66589
...
...
@@ -4059,7 +4059,7 @@ int32_t doInitAggInfoSup(SAggSupporter* pAggSup, SqlFunctionCtx* pCtx, int32_t n
defaultBufsz
=
defaultPgsz
*
4
;
}
int32_t
code
=
createDiskbasedBuf
(
&
pAggSup
->
pResultBuf
,
defaultPgsz
,
defaultBufsz
,
pKey
,
"/tmp/"
);
int32_t
code
=
createDiskbasedBuf
(
&
pAggSup
->
pResultBuf
,
defaultPgsz
,
defaultBufsz
,
pKey
,
TD_TMP_DIR_PATH
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
return
code
;
}
...
...
source/libs/executor/src/groupoperator.c
浏览文件 @
9bd66589
...
...
@@ -614,7 +614,7 @@ SOperatorInfo* createPartitionOperatorInfo(SOperatorInfo* downstream, SExprInfo*
goto
_error
;
}
int32_t
code
=
createDiskbasedBuf
(
&
pInfo
->
pBuf
,
4096
,
4096
*
256
,
pTaskInfo
->
id
.
str
,
"/tmp/"
);
int32_t
code
=
createDiskbasedBuf
(
&
pInfo
->
pBuf
,
4096
,
4096
*
256
,
pTaskInfo
->
id
.
str
,
TD_TMP_DIR_PATH
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
goto
_error
;
}
...
...
source/libs/executor/src/scanoperator.c
浏览文件 @
9bd66589
...
...
@@ -990,7 +990,7 @@ SOperatorInfo* createStreamScanOperatorInfo(void* streamReadHandle, void* pDataR
size_t
childKeyBufSize
=
sizeof
(
int64_t
)
+
sizeof
(
int64_t
)
+
sizeof
(
TSKEY
);
initCatchSupporter
(
&
pInfo
->
childAggSup
,
1024
,
childKeyBufSize
,
"StreamFinalInterval"
,
"/tmp/"
);
// TODO(liuyao) get row size from phy plan
"StreamFinalInterval"
,
TD_TMP_DIR_PATH
);
// TODO(liuyao) get row size from phy plan
pOperator
->
name
=
"StreamBlockScanOperator"
;
pOperator
->
operatorType
=
QUERY_NODE_PHYSICAL_PLAN_STREAM_SCAN
;
...
...
source/libs/executor/src/tlinearhash.c
浏览文件 @
9bd66589
...
...
@@ -247,7 +247,7 @@ SLHashObj* tHashInit(int32_t inMemPages, int32_t pageSize, _hash_fn_t fn, int32_
return
NULL
;
}
int32_t
code
=
createDiskbasedBuf
(
&
pHashObj
->
pBuf
,
pageSize
,
inMemPages
*
pageSize
,
0
,
"/tmp"
);
int32_t
code
=
createDiskbasedBuf
(
&
pHashObj
->
pBuf
,
pageSize
,
inMemPages
*
pageSize
,
0
,
TD_TMP_DIR_PATH
);
if
(
code
!=
0
)
{
terrno
=
code
;
return
NULL
;
...
...
source/libs/executor/src/tsort.c
浏览文件 @
9bd66589
...
...
@@ -155,7 +155,7 @@ static int32_t doAddToBuf(SSDataBlock* pDataBlock, SSortHandle* pHandle) {
int32_t
start
=
0
;
if
(
pHandle
->
pBuf
==
NULL
)
{
int32_t
code
=
createDiskbasedBuf
(
&
pHandle
->
pBuf
,
pHandle
->
pageSize
,
pHandle
->
numOfPages
*
pHandle
->
pageSize
,
"doAddToBuf"
,
"/tmp"
);
int32_t
code
=
createDiskbasedBuf
(
&
pHandle
->
pBuf
,
pHandle
->
pageSize
,
pHandle
->
numOfPages
*
pHandle
->
pageSize
,
"doAddToBuf"
,
TD_TMP_DIR_PATH
);
dBufSetPrintInfo
(
pHandle
->
pBuf
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
return
code
;
...
...
@@ -217,7 +217,7 @@ static int32_t sortComparInit(SMsortComparParam* cmpParam, SArray* pSources, int
}
else
{
// multi-pass internal merge sort is required
if
(
pHandle
->
pBuf
==
NULL
)
{
code
=
createDiskbasedBuf
(
&
pHandle
->
pBuf
,
pHandle
->
pageSize
,
pHandle
->
numOfPages
*
pHandle
->
pageSize
,
"sortComparInit"
,
"/tmp"
);
code
=
createDiskbasedBuf
(
&
pHandle
->
pBuf
,
pHandle
->
pageSize
,
pHandle
->
numOfPages
*
pHandle
->
pageSize
,
"sortComparInit"
,
TD_TMP_DIR_PATH
);
dBufSetPrintInfo
(
pHandle
->
pBuf
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
return
code
;
...
...
source/libs/executor/test/index_executor_tests.cpp
浏览文件 @
9bd66589
...
...
@@ -57,7 +57,7 @@ void sifInitLogFile() {
tsAsyncLog
=
0
;
qDebugFlag
=
159
;
strcpy
(
tsLogDir
,
"/tmp/
sif"
);
strcpy
(
tsLogDir
,
TD_TMP_DIR_PATH
"
sif"
);
taosRemoveDir
(
tsLogDir
);
taosMkDir
(
tsLogDir
);
...
...
source/libs/function/src/tpercentile.c
浏览文件 @
9bd66589
...
...
@@ -255,7 +255,7 @@ tMemBucket *tMemBucketCreate(int16_t nElemSize, int16_t dataType, double minval,
resetSlotInfo
(
pBucket
);
int32_t
ret
=
createDiskbasedBuf
(
&
pBucket
->
pBuffer
,
pBucket
->
bufPageSize
,
pBucket
->
bufPageSize
*
512
,
"1"
,
"/tmp"
);
int32_t
ret
=
createDiskbasedBuf
(
&
pBucket
->
pBuffer
,
pBucket
->
bufPageSize
,
pBucket
->
bufPageSize
*
512
,
"1"
,
TD_TMP_DIR_PATH
);
if
(
ret
!=
0
)
{
tMemBucketDestroy
(
pBucket
);
return
NULL
;
...
...
source/libs/function/src/udfd.c
浏览文件 @
9bd66589
...
...
@@ -144,7 +144,7 @@ void udfdProcessRpcRsp(void *parent, SRpcMsg *pMsg, SEpSet *pEpSet) {
udf
->
bufSize
=
pFuncInfo
->
bufSize
;
char
path
[
PATH_MAX
]
=
{
0
};
snprintf
(
path
,
sizeof
(
path
),
"%s/lib%s.so"
,
"/tmp"
,
pFuncInfo
->
name
);
snprintf
(
path
,
sizeof
(
path
),
"%s/lib%s.so"
,
TD_TMP_DIR_PATH
,
pFuncInfo
->
name
);
TdFilePtr
file
=
taosOpenFile
(
path
,
TD_FILE_CREATE
|
TD_FILE_WRITE
|
TD_FILE_READ
|
TD_FILE_TRUNC
|
TD_FILE_AUTO_DEL
);
// TODO check for failure of flush to disk
...
...
source/libs/index/src/indexTfile.c
浏览文件 @
9bd66589
...
...
@@ -141,7 +141,6 @@ void tfileCacheDestroy(TFileCache* tcache) {
TFileReader
*
p
=
*
reader
;
indexInfo
(
"drop table cache suid: %"
PRIu64
", colName: %s, colType: %d"
,
p
->
header
.
suid
,
p
->
header
.
colName
,
p
->
header
.
colType
);
tfileReaderUnRef
(
p
);
reader
=
taosHashIterate
(
tcache
->
tableCache
,
reader
);
}
...
...
source/libs/index/test/fstTest.cc
浏览文件 @
9bd66589
...
...
@@ -15,7 +15,7 @@
#include "tutil.h"
void
*
callback
(
void
*
s
)
{
return
s
;
}
static
std
::
string
fileName
=
"/tmp/
tindex.tindex"
;
static
std
::
string
fileName
=
TD_TMP_DIR_PATH
"
tindex.tindex"
;
class
FstWriter
{
public:
FstWriter
()
{
...
...
@@ -48,7 +48,7 @@ class FstWriter {
class
FstReadMemory
{
public:
FstReadMemory
(
int32_t
size
,
const
std
::
string
&
fileName
=
"/tmp/
tindex.tindex"
)
{
FstReadMemory
(
int32_t
size
,
const
std
::
string
&
fileName
=
TD_TMP_DIR_PATH
"
tindex.tindex"
)
{
_wc
=
writerCtxCreate
(
TFile
,
fileName
.
c_str
(),
true
,
64
*
1024
);
_w
=
fstCountingWriterCreate
(
_wc
);
_size
=
size
;
...
...
source/libs/index/test/fstUT.cc
浏览文件 @
9bd66589
...
...
@@ -17,7 +17,7 @@
#include "tskiplist.h"
#include "tutil.h"
static
std
::
string
dir
=
"/tmp/
index"
;
static
std
::
string
dir
=
TD_TMP_DIR_PATH
"
index"
;
static
char
indexlog
[
PATH_MAX
]
=
{
0
};
static
char
tindex
[
PATH_MAX
]
=
{
0
};
...
...
source/libs/index/test/indexTests.cc
浏览文件 @
9bd66589
...
...
@@ -51,7 +51,7 @@ class DebugInfo {
class
FstWriter
{
public:
FstWriter
()
{
_wc
=
writerCtxCreate
(
TFile
,
"/tmp/
tindex"
,
false
,
64
*
1024
*
1024
);
_wc
=
writerCtxCreate
(
TFile
,
TD_TMP_DIR_PATH
"
tindex"
,
false
,
64
*
1024
*
1024
);
_b
=
fstBuilderCreate
(
NULL
,
0
);
}
bool
Put
(
const
std
::
string
&
key
,
uint64_t
val
)
{
...
...
@@ -75,7 +75,7 @@ class FstWriter {
class
FstReadMemory
{
public:
FstReadMemory
(
size_t
size
)
{
_wc
=
writerCtxCreate
(
TFile
,
"/tmp/
tindex"
,
true
,
64
*
1024
);
_wc
=
writerCtxCreate
(
TFile
,
TD_TMP_DIR_PATH
"
tindex"
,
true
,
64
*
1024
);
_w
=
fstCountingWriterCreate
(
_wc
);
_size
=
size
;
memset
((
void
*
)
&
_s
,
0
,
sizeof
(
_s
));
...
...
@@ -285,7 +285,7 @@ class IndexEnv : public ::testing::Test {
indexOptsDestroy
(
opts
);
}
const
char
*
path
=
"/tmp/
tindex"
;
const
char
*
path
=
TD_TMP_DIR_PATH
"
tindex"
;
SIndexOpts
*
opts
;
SIndex
*
index
;
};
...
...
@@ -342,7 +342,7 @@ class IndexEnv : public ::testing::Test {
class
TFileObj
{
public:
TFileObj
(
const
std
::
string
&
path
=
"/tmp/
tindex"
,
const
std
::
string
&
colName
=
"voltage"
)
TFileObj
(
const
std
::
string
&
path
=
TD_TMP_DIR_PATH
"
tindex"
,
const
std
::
string
&
colName
=
"voltage"
)
:
path_
(
path
),
colName_
(
colName
)
{
colId_
=
10
;
reader_
=
NULL
;
...
...
@@ -437,7 +437,7 @@ class IndexTFileEnv : public ::testing::Test {
// tfileWriterDestroy(twrite);
}
TFileObj
*
fObj
;
std
::
string
dir
=
"/tmp/
tindex"
;
std
::
string
dir
=
TD_TMP_DIR_PATH
"
tindex"
;
std
::
string
colName
=
"voltage"
;
int
coldId
=
2
;
...
...
@@ -822,7 +822,7 @@ class IndexEnv2 : public ::testing::Test {
IndexObj
*
index
;
};
TEST_F
(
IndexEnv2
,
testIndexOpen
)
{
std
::
string
path
=
"/tmp/
test"
;
std
::
string
path
=
TD_TMP_DIR_PATH
"
test"
;
if
(
index
->
Init
(
path
)
!=
0
)
{
std
::
cout
<<
"failed to init index"
<<
std
::
endl
;
exit
(
1
);
...
...
@@ -891,7 +891,7 @@ TEST_F(IndexEnv2, testIndexOpen) {
}
TEST_F
(
IndexEnv2
,
testIndex_TrigeFlush
)
{
std
::
string
path
=
"/tmp/
testxxx"
;
std
::
string
path
=
TD_TMP_DIR_PATH
"
testxxx"
;
if
(
index
->
Init
(
path
)
!=
0
)
{
// r
std
::
cout
<<
"failed to init"
<<
std
::
endl
;
...
...
@@ -914,7 +914,7 @@ static void multi_write_and_search(IndexObj* idx) {
idx
->
WriteMultiMillonData
(
"tag2"
,
"world test nothing"
,
100
*
10
);
}
TEST_F
(
IndexEnv2
,
testIndex_serarch_cache_and_tfile
)
{
std
::
string
path
=
"/tmp/
cache_and_tfile"
;
std
::
string
path
=
TD_TMP_DIR_PATH
"
cache_and_tfile"
;
if
(
index
->
Init
(
path
)
!=
0
)
{
// opt
}
...
...
@@ -934,7 +934,7 @@ TEST_F(IndexEnv2, testIndex_serarch_cache_and_tfile) {
}
}
TEST_F
(
IndexEnv2
,
testIndex_MultiWrite_and_MultiRead
)
{
std
::
string
path
=
"/tmp/
cache_and_tfile"
;
std
::
string
path
=
TD_TMP_DIR_PATH
"
cache_and_tfile"
;
if
(
index
->
Init
(
path
)
!=
0
)
{
}
...
...
@@ -950,14 +950,14 @@ TEST_F(IndexEnv2, testIndex_MultiWrite_and_MultiRead) {
}
// TEST_F(IndexEnv2, testIndex_restart) {
// std::string path =
"/tmp/
cache_and_tfile";
// std::string path =
TD_TMP_DIR_PATH "
cache_and_tfile";
// if (index->Init(path) != 0) {
// }
// index->SearchOneTarget("tag1", "Hello", 10);
// index->SearchOneTarget("tag2", "Test", 10);
//}
// TEST_F(IndexEnv2, testIndex_restart1) {
// std::string path =
"/tmp/
cache_and_tfile";
// std::string path =
TD_TMP_DIR_PATH "
cache_and_tfile";
// if (index->Init(path) != 0) {
// }
// index->ReadMultiMillonData("tag1", "coding");
...
...
@@ -966,7 +966,7 @@ TEST_F(IndexEnv2, testIndex_MultiWrite_and_MultiRead) {
//}
// TEST_F(IndexEnv2, testIndex_read_performance) {
// std::string path =
"/tmp/
cache_and_tfile";
// std::string path =
TD_TMP_DIR_PATH "
cache_and_tfile";
// if (index->Init(path) != 0) {
// }
// index->PutOneTarge("tag1", "Hello", 12);
...
...
@@ -976,7 +976,7 @@ TEST_F(IndexEnv2, testIndex_MultiWrite_and_MultiRead) {
// assert(3 == index->SearchOne("tag1", "Hello"));
//}
// TEST_F(IndexEnv2, testIndexMultiTag) {
// std::string path =
"/tmp/
multi_tag";
// std::string path =
TD_TMP_DIR_PATH "
multi_tag";
// if (index->Init(path) != 0) {
// }
// int64_t st = taosGetTimestampUs();
...
...
@@ -986,7 +986,7 @@ TEST_F(IndexEnv2, testIndex_MultiWrite_and_MultiRead) {
// // index->WriteMultiMillonData("tag2", "xxxxxxxxxxxxxxxxxxxxxxxxx", 100 * 10000);
//}
TEST_F
(
IndexEnv2
,
testLongComVal1
)
{
std
::
string
path
=
"/tmp/
long_colVal"
;
std
::
string
path
=
TD_TMP_DIR_PATH
"
long_colVal"
;
if
(
index
->
Init
(
path
)
!=
0
)
{
}
// gen colVal by randstr
...
...
@@ -995,7 +995,7 @@ TEST_F(IndexEnv2, testLongComVal1) {
}
TEST_F
(
IndexEnv2
,
testLongComVal2
)
{
std
::
string
path
=
"/tmp/
long_colVal"
;
std
::
string
path
=
TD_TMP_DIR_PATH
"
long_colVal"
;
if
(
index
->
Init
(
path
)
!=
0
)
{
}
// gen colVal by randstr
...
...
@@ -1003,7 +1003,7 @@ TEST_F(IndexEnv2, testLongComVal2) {
index
->
WriteMultiMillonData
(
"tag1"
,
randstr
,
100
*
1000
);
}
TEST_F
(
IndexEnv2
,
testLongComVal3
)
{
std
::
string
path
=
"/tmp/
long_colVal"
;
std
::
string
path
=
TD_TMP_DIR_PATH
"
long_colVal"
;
if
(
index
->
Init
(
path
)
!=
0
)
{
}
// gen colVal by randstr
...
...
@@ -1011,7 +1011,7 @@ TEST_F(IndexEnv2, testLongComVal3) {
index
->
WriteMultiMillonData
(
"tag1"
,
randstr
,
100
*
1000
);
}
TEST_F
(
IndexEnv2
,
testLongComVal4
)
{
std
::
string
path
=
"/tmp/
long_colVal"
;
std
::
string
path
=
TD_TMP_DIR_PATH
"
long_colVal"
;
if
(
index
->
Init
(
path
)
!=
0
)
{
}
// gen colVal by randstr
...
...
@@ -1019,7 +1019,7 @@ TEST_F(IndexEnv2, testLongComVal4) {
index
->
WriteMultiMillonData
(
"tag1"
,
randstr
,
100
*
100
);
}
TEST_F
(
IndexEnv2
,
testIndex_read_performance1
)
{
std
::
string
path
=
"/tmp/
cache_and_tfile"
;
std
::
string
path
=
TD_TMP_DIR_PATH
"
cache_and_tfile"
;
if
(
index
->
Init
(
path
)
!=
0
)
{
}
index
->
PutOneTarge
(
"tag1"
,
"Hello"
,
12
);
...
...
@@ -1029,7 +1029,7 @@ TEST_F(IndexEnv2, testIndex_read_performance1) {
EXPECT_EQ
(
2
,
index
->
SearchOne
(
"tag1"
,
"Hello"
));
}
TEST_F
(
IndexEnv2
,
testIndex_read_performance2
)
{
std
::
string
path
=
"/tmp/
cache_and_tfile"
;
std
::
string
path
=
TD_TMP_DIR_PATH
"
cache_and_tfile"
;
if
(
index
->
Init
(
path
)
!=
0
)
{
}
index
->
PutOneTarge
(
"tag1"
,
"Hello"
,
12
);
...
...
@@ -1039,7 +1039,7 @@ TEST_F(IndexEnv2, testIndex_read_performance2) {
EXPECT_EQ
(
2
,
index
->
SearchOne
(
"tag1"
,
"Hello"
));
}
TEST_F
(
IndexEnv2
,
testIndex_read_performance3
)
{
std
::
string
path
=
"/tmp/
cache_and_tfile"
;
std
::
string
path
=
TD_TMP_DIR_PATH
"
cache_and_tfile"
;
if
(
index
->
Init
(
path
)
!=
0
)
{
}
index
->
PutOneTarge
(
"tag1"
,
"Hello"
,
12
);
...
...
@@ -1049,7 +1049,7 @@ TEST_F(IndexEnv2, testIndex_read_performance3) {
EXPECT_EQ
(
2
,
index
->
SearchOne
(
"tag1"
,
"Hello"
));
}
TEST_F
(
IndexEnv2
,
testIndex_read_performance4
)
{
std
::
string
path
=
"/tmp/
cache_and_tfile"
;
std
::
string
path
=
TD_TMP_DIR_PATH
"
cache_and_tfile"
;
if
(
index
->
Init
(
path
)
!=
0
)
{
}
index
->
PutOneTarge
(
"tag10"
,
"Hello"
,
12
);
...
...
@@ -1059,7 +1059,7 @@ TEST_F(IndexEnv2, testIndex_read_performance4) {
EXPECT_EQ
(
1
,
index
->
SearchOne
(
"tag10"
,
"Hello"
));
}
TEST_F
(
IndexEnv2
,
testIndex_cache_del
)
{
std
::
string
path
=
"/tmp/
cache_and_tfile"
;
std
::
string
path
=
TD_TMP_DIR_PATH
"
cache_and_tfile"
;
if
(
index
->
Init
(
path
)
!=
0
)
{
}
for
(
int
i
=
0
;
i
<
100
;
i
++
)
{
...
...
@@ -1098,7 +1098,7 @@ TEST_F(IndexEnv2, testIndex_cache_del) {
}
TEST_F
(
IndexEnv2
,
testIndex_del
)
{
std
::
string
path
=
"/tmp/
cache_and_tfile"
;
std
::
string
path
=
TD_TMP_DIR_PATH
"
cache_and_tfile"
;
if
(
index
->
Init
(
path
)
!=
0
)
{
}
for
(
int
i
=
0
;
i
<
100
;
i
++
)
{
...
...
source/libs/index/test/jsonUT.cc
浏览文件 @
9bd66589
...
...
@@ -16,8 +16,8 @@
#include "tskiplist.h"
#include "tutil.h"
static
std
::
string
dir
=
"/tmp/
json"
;
static
std
::
string
logDir
=
"/tmp/
log"
;
static
std
::
string
dir
=
TD_TMP_DIR_PATH
"
json"
;
static
std
::
string
logDir
=
TD_TMP_DIR_PATH
"
log"
;
static
void
initLog
()
{
const
char
*
defaultLogFileNamePrefix
=
"taoslog"
;
...
...
source/libs/planner/test/planTestMain.cpp
浏览文件 @
9bd66589
...
...
@@ -25,7 +25,7 @@ class PlannerEnv : public testing::Environment {
virtual
void
SetUp
()
{
initMetaDataEnv
();
generateMetaData
();
initLog
(
"/tmp/
td"
);
initLog
(
TD_TMP_DIR_PATH
"
td"
);
}
virtual
void
TearDown
()
{
destroyMetaDataEnv
();
}
...
...
source/libs/tfs/test/tfsTest.cpp
浏览文件 @
9bd66589
...
...
@@ -16,7 +16,7 @@
class
TfsTest
:
public
::
testing
::
Test
{
protected:
static
void
SetUpTestSuite
()
{
root
=
"/tmp/
tfsTest"
;
}
static
void
SetUpTestSuite
()
{
root
=
TD_TMP_DIR_PATH
"
tfsTest"
;
}
static
void
TearDownTestSuite
()
{}
public:
...
...
@@ -299,15 +299,15 @@ TEST_F(TfsTest, 04_File) {
TEST_F
(
TfsTest
,
05
_MultiDisk
)
{
int32_t
code
=
0
;
const
char
*
root00
=
"/tmp/
tfsTest00"
;
const
char
*
root01
=
"/tmp/
tfsTest01"
;
const
char
*
root10
=
"/tmp/
tfsTest10"
;
const
char
*
root11
=
"/tmp/
tfsTest11"
;
const
char
*
root12
=
"/tmp/
tfsTest12"
;
const
char
*
root20
=
"/tmp/
tfsTest20"
;
const
char
*
root21
=
"/tmp/
tfsTest21"
;
const
char
*
root22
=
"/tmp/
tfsTest22"
;
const
char
*
root23
=
"/tmp/
tfsTest23"
;
const
char
*
root00
=
TD_TMP_DIR_PATH
"
tfsTest00"
;
const
char
*
root01
=
TD_TMP_DIR_PATH
"
tfsTest01"
;
const
char
*
root10
=
TD_TMP_DIR_PATH
"
tfsTest10"
;
const
char
*
root11
=
TD_TMP_DIR_PATH
"
tfsTest11"
;
const
char
*
root12
=
TD_TMP_DIR_PATH
"
tfsTest12"
;
const
char
*
root20
=
TD_TMP_DIR_PATH
"
tfsTest20"
;
const
char
*
root21
=
TD_TMP_DIR_PATH
"
tfsTest21"
;
const
char
*
root22
=
TD_TMP_DIR_PATH
"
tfsTest22"
;
const
char
*
root23
=
TD_TMP_DIR_PATH
"
tfsTest23"
;
SDiskCfg
dCfg
[
9
]
=
{
0
};
tstrncpy
(
dCfg
[
0
].
dir
,
root01
,
TSDB_FILENAME_LEN
);
...
...
source/libs/transport/test/rclient.c
浏览文件 @
9bd66589
...
...
@@ -161,7 +161,7 @@ int main(int argc, char *argv[]) {
}
}
const
char
*
path
=
"/tmp/
transport/client"
;
const
char
*
path
=
TD_TMP_DIR_PATH
"
transport/client"
;
taosRemoveDir
(
path
);
taosMkDir
(
path
);
tstrncpy
(
tsLogDir
,
path
,
PATH_MAX
);
...
...
source/libs/transport/test/rserver.c
浏览文件 @
9bd66589
...
...
@@ -160,7 +160,7 @@ int main(int argc, char *argv[]) {
tsAsyncLog
=
0
;
rpcInit
.
connType
=
TAOS_CONN_SERVER
;
const
char
*
path
=
"/tmp/
transport/server"
;
const
char
*
path
=
TD_TMP_DIR_PATH
"
transport/server"
;
taosRemoveDir
(
path
);
taosMkDir
(
path
);
tstrncpy
(
tsLogDir
,
path
,
PATH_MAX
);
...
...
source/libs/transport/test/transUT.cpp
浏览文件 @
9bd66589
...
...
@@ -43,7 +43,7 @@ static void processResp(void *parent, SRpcMsg *pMsg, SEpSet *pEpSet);
class
Client
{
public:
void
Init
(
int
nThread
)
{
memcpy
(
tsTempDir
,
"/tmp"
,
strlen
(
"/tmp"
));
memcpy
(
tsTempDir
,
TD_TMP_DIR_PATH
,
strlen
(
TD_TMP_DIR_PATH
));
memset
(
&
rpcInit_
,
0
,
sizeof
(
rpcInit_
));
rpcInit_
.
localPort
=
0
;
rpcInit_
.
label
=
(
char
*
)
label
;
...
...
@@ -105,7 +105,7 @@ class Client {
class
Server
{
public:
Server
()
{
memcpy
(
tsTempDir
,
"/tmp"
,
strlen
(
"/tmp"
));
memcpy
(
tsTempDir
,
TD_TMP_DIR_PATH
,
strlen
(
TD_TMP_DIR_PATH
));
memset
(
&
rpcInit_
,
0
,
sizeof
(
rpcInit_
));
memcpy
(
rpcInit_
.
localFqdn
,
"localhost"
,
strlen
(
"localhost"
));
...
...
@@ -219,7 +219,7 @@ static void initEnv() {
tsLogEmbedded
=
1
;
tsAsyncLog
=
0
;
std
::
string
path
=
"/tmp/
transport"
;
std
::
string
path
=
TD_TMP_DIR_PATH
"
transport"
;
// taosRemoveDir(path.c_str());
taosMkDir
(
path
.
c_str
());
...
...
source/libs/wal/src/walWrite.c
浏览文件 @
9bd66589
...
...
@@ -121,6 +121,8 @@ int32_t walRollback(SWal *pWal, int64_t ver) {
pWal
->
vers
.
lastVer
=
ver
-
1
;
((
SWalFileInfo
*
)
taosArrayGetLast
(
pWal
->
fileInfoSet
))
->
lastVer
=
ver
-
1
;
((
SWalFileInfo
*
)
taosArrayGetLast
(
pWal
->
fileInfoSet
))
->
fileSize
=
entry
.
offset
;
taosCloseFile
(
&
pIdxTFile
);
taosCloseFile
(
&
pLogTFile
);
// unlock
taosThreadMutexUnlock
(
&
pWal
->
mutex
);
...
...
source/libs/wal/test/walMetaTest.cpp
浏览文件 @
9bd66589
...
...
@@ -37,7 +37,7 @@ class WalCleanEnv : public ::testing::Test {
}
SWal
*
pWal
=
NULL
;
const
char
*
pathName
=
"/tmp/
wal_test"
;
const
char
*
pathName
=
TD_TMP_DIR_PATH
"
wal_test"
;
};
class
WalCleanDeleteEnv
:
public
::
testing
::
Test
{
...
...
@@ -67,7 +67,7 @@ class WalCleanDeleteEnv : public ::testing::Test {
}
SWal
*
pWal
=
NULL
;
const
char
*
pathName
=
"/tmp/
wal_test"
;
const
char
*
pathName
=
TD_TMP_DIR_PATH
"
wal_test"
;
};
class
WalKeepEnv
:
public
::
testing
::
Test
{
...
...
@@ -104,7 +104,7 @@ class WalKeepEnv : public ::testing::Test {
}
SWal
*
pWal
=
NULL
;
const
char
*
pathName
=
"/tmp/
wal_test"
;
const
char
*
pathName
=
TD_TMP_DIR_PATH
"
wal_test"
;
};
class
WalRetentionEnv
:
public
::
testing
::
Test
{
...
...
@@ -141,7 +141,7 @@ class WalRetentionEnv : public ::testing::Test {
}
SWal
*
pWal
=
NULL
;
const
char
*
pathName
=
"/tmp/
wal_test"
;
const
char
*
pathName
=
TD_TMP_DIR_PATH
"
wal_test"
;
};
TEST_F
(
WalCleanEnv
,
createNew
)
{
...
...
@@ -325,6 +325,7 @@ TEST_F(WalKeepEnv, readHandleRead) {
EXPECT_EQ
(
newStr
[
j
],
pRead
->
pHead
->
head
.
body
[
j
]);
}
}
walCloseReadHandle
(
pRead
);
}
TEST_F
(
WalRetentionEnv
,
repairMeta1
)
{
...
...
source/util/test/cfgTest.cpp
浏览文件 @
9bd66589
...
...
@@ -59,7 +59,7 @@ TEST_F(CfgTest, 02_Basic) {
EXPECT_EQ
(
cfgAddInt64
(
pConfig
,
"test_int64"
,
2
,
0
,
16
,
0
),
0
);
EXPECT_EQ
(
cfgAddFloat
(
pConfig
,
"test_float"
,
3
,
0
,
16
,
0
),
0
);
EXPECT_EQ
(
cfgAddString
(
pConfig
,
"test_string"
,
"4"
,
0
),
0
);
EXPECT_EQ
(
cfgAddDir
(
pConfig
,
"test_dir"
,
"/tmp"
,
0
),
0
);
EXPECT_EQ
(
cfgAddDir
(
pConfig
,
"test_dir"
,
TD_TMP_DIR_PATH
,
0
),
0
);
EXPECT_EQ
(
cfgGetSize
(
pConfig
),
6
);
...
...
@@ -126,7 +126,7 @@ TEST_F(CfgTest, 02_Basic) {
EXPECT_EQ
(
pItem
->
stype
,
CFG_STYPE_DEFAULT
);
EXPECT_EQ
(
pItem
->
dtype
,
CFG_DTYPE_DIR
);
EXPECT_STREQ
(
pItem
->
name
,
"test_dir"
);
EXPECT_STREQ
(
pItem
->
str
,
"/tmp"
);
EXPECT_STREQ
(
pItem
->
str
,
TD_TMP_DIR_PATH
);
cfgCleanup
(
pConfig
);
}
source/util/test/pageBufferTest.cpp
浏览文件 @
9bd66589
...
...
@@ -13,7 +13,7 @@ namespace {
// simple test
void
simpleTest
()
{
SDiskbasedBuf
*
pBuf
=
NULL
;
int32_t
ret
=
createDiskbasedBuf
(
&
pBuf
,
1024
,
4096
,
""
,
"/tmp/"
);
int32_t
ret
=
createDiskbasedBuf
(
&
pBuf
,
1024
,
4096
,
""
,
TD_TMP_DIR_PATH
);
int32_t
pageId
=
0
;
int32_t
groupId
=
0
;
...
...
@@ -57,7 +57,7 @@ void simpleTest() {
void
writeDownTest
()
{
SDiskbasedBuf
*
pBuf
=
NULL
;
int32_t
ret
=
createDiskbasedBuf
(
&
pBuf
,
1024
,
4
*
1024
,
"1"
,
"/tmp/"
);
int32_t
ret
=
createDiskbasedBuf
(
&
pBuf
,
1024
,
4
*
1024
,
"1"
,
TD_TMP_DIR_PATH
);
int32_t
pageId
=
0
;
int32_t
writePageId
=
0
;
...
...
@@ -106,7 +106,7 @@ void writeDownTest() {
void
recyclePageTest
()
{
SDiskbasedBuf
*
pBuf
=
NULL
;
int32_t
ret
=
createDiskbasedBuf
(
&
pBuf
,
1024
,
4
*
1024
,
"1"
,
"/tmp/"
);
int32_t
ret
=
createDiskbasedBuf
(
&
pBuf
,
1024
,
4
*
1024
,
"1"
,
TD_TMP_DIR_PATH
);
int32_t
pageId
=
0
;
int32_t
writePageId
=
0
;
...
...
source/util/test/procTest.cpp
浏览文件 @
9bd66589
...
...
@@ -38,9 +38,9 @@ class UtilTesProc : public ::testing::Test {
head.noResp = 3;
head.persistHandle = 4;
taosRemoveDir(
"/tmp/
td");
taosMkDir(
"/tmp/
td");
tstrncpy(tsLogDir,
"/tmp/
td", PATH_MAX);
taosRemoveDir(
TD_TMP_DIR_PATH "
td");
taosMkDir(
TD_TMP_DIR_PATH "
td");
tstrncpy(tsLogDir,
TD_TMP_DIR_PATH "
td", PATH_MAX);
if (taosInitLog("taosdlog", 1) != 0) {
printf("failed to init log file\n");
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录