From 57dc3f4562ee30b3e6fa141083cd213cba21b27e Mon Sep 17 00:00:00 2001 From: Shungang Li Date: Mon, 15 Jul 2024 15:15:17 +0800 Subject: [PATCH] fix: disable dynamic modification of 'tempdir' --- source/common/src/tglobal.c | 2 +- tests/army/cmdline/fullopt.py | 21 ++++++++++----------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/source/common/src/tglobal.c b/source/common/src/tglobal.c index 119438fbd6..7538b504e3 100644 --- a/source/common/src/tglobal.c +++ b/source/common/src/tglobal.c @@ -504,7 +504,7 @@ static int32_t taosAddClientCfg(SConfig *pCfg) { if (cfgAddString(pCfg, "secondEp", "", CFG_SCOPE_BOTH, CFG_DYN_CLIENT) != 0) return -1; if (cfgAddString(pCfg, "fqdn", defaultFqdn, CFG_SCOPE_SERVER, CFG_DYN_CLIENT) != 0) return -1; if (cfgAddInt32(pCfg, "serverPort", defaultServerPort, 1, 65056, CFG_SCOPE_SERVER, CFG_DYN_CLIENT) != 0) return -1; - if (cfgAddDir(pCfg, "tempDir", tsTempDir, CFG_SCOPE_BOTH, CFG_DYN_CLIENT) != 0) return -1; + if (cfgAddDir(pCfg, "tempDir", tsTempDir, CFG_SCOPE_BOTH, CFG_DYN_NONE) != 0) return -1; if (cfgAddFloat(pCfg, "minimalTmpDirGB", 1.0f, 0.001f, 10000000, CFG_SCOPE_BOTH, CFG_DYN_CLIENT) != 0) return -1; if (cfgAddInt32(pCfg, "shellActivityTimer", tsShellActivityTimer, 1, 120, CFG_SCOPE_BOTH, CFG_DYN_CLIENT) != 0) return -1; diff --git a/tests/army/cmdline/fullopt.py b/tests/army/cmdline/fullopt.py index 77a22b9256..6fc8e858a3 100644 --- a/tests/army/cmdline/fullopt.py +++ b/tests/army/cmdline/fullopt.py @@ -28,13 +28,13 @@ from frame import * class TDTestCase(TBase): updatecfgDict = { - 'queryMaxConcurrentTables': '2K', - 'streamMax': '1M', + 'queryMaxConcurrentTables': '2K', + 'streamMax': '1M', 'totalMemoryKB': '1G', 'streamMax': '1P', 'streamBufferSize':'1T', 'slowLogScope':"query" - } + } def insertData(self): tdLog.info(f"insert data.") @@ -53,7 +53,7 @@ class TDTestCase(TBase): def doTaos(self): tdLog.info(f"check taos command options...") - + # local command options = [ "DebugFlag 143", @@ -71,7 +71,6 @@ class TDTestCase(TBase): "smlTsDefaultName tsdef", "serverPort 6030", "timezone tz", - "tempDir /var/tmp" ] # exec for option in options: @@ -83,7 +82,7 @@ class TDTestCase(TBase): # help rets = etool.runBinFile("taos", "--help") self.checkListNotEmpty(rets) - # b r w s + # b r w s sql = f"select * from {self.db}.{self.stb} limit 10" rets = etool.runBinFile("taos", f'-B -r -w 100 -s "{sql}" ') self.checkListNotEmpty(rets) @@ -124,16 +123,16 @@ class TDTestCase(TBase): tdLog.info(f"check taosd command options...") idx = 1 # dnode1 cfg = sc.dnodeCfgPath(idx) - + # -s sdb = "./sdb.json" eos.delFile(sdb) etool.exeBinFile("taosd", f"-s -c {cfg}") - + # -C etool.exeBinFile("taosd", "-C") - # -k + # -k etool.exeBinFile("taosd", "-k", False) # -V rets = etool.runBinFile("taosd", "-V") @@ -153,7 +152,7 @@ class TDTestCase(TBase): sc.dnodeStop(idx) etool.exeBinFile("taosd", "-a http://192.168.1.10") - #exe + #exe etool.exeBinFile("taosd", f"-E abc -c {cfg}", False) sc.dnodeStop(idx) etool.exeBinFile("taosd", f"-e def -c {cfg}", False) @@ -182,7 +181,7 @@ class TDTestCase(TBase): # do action self.doTaosd() - + tdLog.success(f"{__file__} successfully executed")