From ce944ebb83959fca5944329fc18f39358916f576 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Fri, 15 May 2020 15:40:01 +0800 Subject: [PATCH 1/4] reduce valgrind output. --- .travis.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 41937853d6..b9a653e795 100644 --- a/.travis.yml +++ b/.travis.yml @@ -49,7 +49,7 @@ matrix: ./test-all.sh $TRAVIS_EVENT_TYPE || travis_terminate $? cd ${TRAVIS_BUILD_DIR}/tests/pytest - ./valgrind-test.sh -g 2>&1 | tee mem-error-out.txt + ./valgrind-test.sh -g 2>&1 > mem-error-out.txt sleep 1 # Color setting @@ -59,12 +59,13 @@ matrix: GREEN_UNDERLINE='\033[4;32m' NC='\033[0m' - grep 'ERROR SUMMARY' mem-error-out.txt|grep -v 'grep'|uniq|tee uniq-mem-error-out.txt + grep 'start to execute\|ERROR SUMMARY' mem-error-out.txt|grep -v 'grep'|uniq|tee uniq-mem-error-out.txt for memError in `cat uniq-mem-error-out.txt | awk '{print $4}'` do if [ -n "$memError" ]; then if [ "$memError" -gt 12 ]; then + cat uniq-mem-error-out.txt echo -e "${RED} ## Memory errors number valgrind reports is $memError.\ More than our threshold! ## ${NC}" travis_terminate $memError @@ -72,11 +73,12 @@ matrix: fi done - grep 'definitely lost:' mem-error-out.txt|grep -v 'grep'|uniq|tee uniq-definitely-lost-out.txt + grep 'start to execute\|definitely lost:' mem-error-out.txt|grep -v 'grep'|uniq|tee uniq-definitely-lost-out.txt for defiMemError in `cat uniq-definitely-lost-out.txt | awk '{print $7}'` do if [ -n "$defiMemError" ]; then if [ "$defiMemError" -gt 13 ]; then + cat uniq-definitely-list-out.txt echo -e "${RED} ## Memory errors number valgrind reports \ Definitely lost is $defiMemError. More than our threshold! ## ${NC}" travis_terminate $defiMemError From 5868f3459c45b904bb8257144e4af0e7e05aa31e Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Fri, 15 May 2020 16:00:26 +0800 Subject: [PATCH 2/4] reduce python test case output. --- tests/pytest/insert/float.py | 8 ++++---- tests/pytest/insert/int.py | 10 +++++----- tests/pytest/test.py | 3 ++- tests/pytest/util/cases.py | 4 +--- tests/pytest/util/dnodes.py | 4 ++-- 5 files changed, 14 insertions(+), 15 deletions(-) diff --git a/tests/pytest/insert/float.py b/tests/pytest/insert/float.py index 30d7e223f1..414833877e 100644 --- a/tests/pytest/insert/float.py +++ b/tests/pytest/insert/float.py @@ -43,7 +43,7 @@ class TDTestCase: "This test failed: insert wrong data error _not_ catched") except Exception as e: tdLog.info(repr(e)) - tdLog.notice("insert wrong data error catched") + tdLog.info("insert wrong data error catched") cmd = 'select * from tb order by ts desc' tdLog.info(cmd) @@ -82,7 +82,7 @@ class TDTestCase: insert wrong data error _not_ catched") except Exception as e: tdLog.info(repr(e)) - tdLog.notice("insert wrong data error catched") + tdLog.info("insert wrong data error catched") cmd = "insert into tb values (now+4a, 0)" tdLog.info(cmd) @@ -103,7 +103,7 @@ class TDTestCase: "This test failed: insert wrong data error _not_ catched") except Exception as e: tdLog.info(repr(e)) - tdLog.notice("insert wrong data error catched") + tdLog.info("insert wrong data error catched") cmd = "insert into tb values (now+5a, 2)" tdLog.info(cmd) @@ -124,7 +124,7 @@ class TDTestCase: "This test failed: insert wrong data error _not_ catched") except Exception as e: tdLog.info(repr(e)) - tdLog.notice("insert wrong data error catched") + tdLog.info("insert wrong data error catched") cmd = "insert into tb values (now+6a, 2)" tdLog.info(cmd) diff --git a/tests/pytest/insert/int.py b/tests/pytest/insert/int.py index d007cc56ea..350426a5bd 100644 --- a/tests/pytest/insert/int.py +++ b/tests/pytest/insert/int.py @@ -47,7 +47,7 @@ class TDTestCase: "This test failed: INT data overflow error _not_ catched") except Exception as e: tdLog.info(repr(e)) - tdLog.notice("INT data overflow error catched") + tdLog.info("INT data overflow error catched") cmd = 'insert into tb values (now+1m, NULL)' tdLog.info(cmd) @@ -76,7 +76,7 @@ class TDTestCase: "This test failed: INT data overflow error _not_ catched") except Exception as e: tdLog.info(repr(e)) - tdLog.notice("INT data overflow error catched") + tdLog.info("INT data overflow error catched") cmd = 'insert into tb values (now+3m, NULL)' tdLog.info(cmd) @@ -96,7 +96,7 @@ class TDTestCase: "This test failed: insert wrong data error _not_ catched") except Exception as e: tdLog.info(repr(e)) - tdLog.notice("insert wrong data error catched") + tdLog.info("insert wrong data error catched") cmd = 'insert into tb values (now+4m, 0)' tdLog.info(cmd) @@ -116,7 +116,7 @@ class TDTestCase: "This test failed: insert wrong data error _not_ catched") except Exception as e: tdLog.info(repr(e)) - tdLog.notice("insert wrong data error catched") + tdLog.info("insert wrong data error catched") cmd = 'insert into tb values (now+5m, 2)' tdLog.info(cmd) @@ -135,7 +135,7 @@ class TDTestCase: "This test failed: insert wrong data error _not_ catched") except Exception as e: tdLog.info(repr(e)) - tdLog.notice("insert wrong data error catched") + tdLog.info("insert wrong data error catched") cmd = 'insert into tb values (now+6m, 2)' tdLog.info(cmd) diff --git a/tests/pytest/test.py b/tests/pytest/test.py index 65685fecdc..9d76b0a70e 100644 --- a/tests/pytest/test.py +++ b/tests/pytest/test.py @@ -79,7 +79,8 @@ if __name__ == "__main__": time.sleep(1) processID = subprocess.check_output(psCmd, shell=True) - tdLog.exit('stop All dnodes') + tdLog.info('stop All dnodes') + sys.exit(0) tdDnodes.init(deployPath) tdDnodes.setTestCluster(testCluster) diff --git a/tests/pytest/util/cases.py b/tests/pytest/util/cases.py index 9a4f0fc98a..9026cd0f2f 100644 --- a/tests/pytest/util/cases.py +++ b/tests/pytest/util/cases.py @@ -57,7 +57,7 @@ class TDCases: runNum += 1 continue - tdLog.notice("total %d Linux test case(s) executed" % (runNum)) + tdLog.info("total %d Linux test case(s) executed" % (runNum)) def runOneLinux(self, conn, fileName): testModule = self.__dynamicLoadModule(fileName) @@ -76,8 +76,6 @@ class TDCases: runNum += 1 continue - tdLog.success("total %d Linux test case(s) executed" % (runNum)) - def runAllWindows(self, conn): # TODO: load all Windows cases here runNum = 0 diff --git a/tests/pytest/util/dnodes.py b/tests/pytest/util/dnodes.py index 63cdccecbc..0789c3bc3f 100644 --- a/tests/pytest/util/dnodes.py +++ b/tests/pytest/util/dnodes.py @@ -202,7 +202,7 @@ class TDDnode: if (binPath == ""): tdLog.exit("taosd not found!s") else: - tdLog.notice("taosd found in %s" % rootRealPath) + tdLog.info("taosd found in %s" % rootRealPath) if self.deployed == 0: tdLog.exit("dnode:%d is not deployed" % (self.index)) @@ -408,7 +408,7 @@ class TDDnodes: tdLog.exit("index:%d should on a scale of [1, 10]" % (index)) def stopAll(self): - tdLog.debug("stop all dnodes") + tdLog.info("stop all dnodes") for i in range(len(self.dnodes)): self.dnodes[i].stop() From 22d79ca1eccd455afd77c21e98c307459688cc9f Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Fri, 15 May 2020 16:43:51 +0800 Subject: [PATCH 3/4] fixup: do not cat log again. --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index b9a653e795..714fb6a405 100644 --- a/.travis.yml +++ b/.travis.yml @@ -65,7 +65,6 @@ matrix: do if [ -n "$memError" ]; then if [ "$memError" -gt 12 ]; then - cat uniq-mem-error-out.txt echo -e "${RED} ## Memory errors number valgrind reports is $memError.\ More than our threshold! ## ${NC}" travis_terminate $memError @@ -78,7 +77,6 @@ matrix: do if [ -n "$defiMemError" ]; then if [ "$defiMemError" -gt 13 ]; then - cat uniq-definitely-list-out.txt echo -e "${RED} ## Memory errors number valgrind reports \ Definitely lost is $defiMemError. More than our threshold! ## ${NC}" travis_terminate $defiMemError From 221ae2dc5d32e4bc6af6da8fbfa8392403642720 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Fri, 15 May 2020 16:45:07 +0800 Subject: [PATCH 4/4] remove importCacheFileT.py as not consistant result for now. --- tests/pytest/smoketest.sh | 2 -- tests/pytest/valgrind-test.sh | 2 -- 2 files changed, 4 deletions(-) diff --git a/tests/pytest/smoketest.sh b/tests/pytest/smoketest.sh index 853ebe1d76..c0878354e0 100755 --- a/tests/pytest/smoketest.sh +++ b/tests/pytest/smoketest.sh @@ -29,8 +29,6 @@ python3 ./test.py $1 -s && sleep 1 python3 ./test.py $1 -f table/db_table.py python3 ./test.py $1 -s && sleep 1 -python3 ./test.py $1 -f import_merge/importCacheFileT.py -python3 ./test.py $1 -s && sleep 1 python3 ./test.py $1 -f import_merge/importDataLastSub.py python3 ./test.py $1 -s && sleep 1 python3 ./test.py $1 -f import_merge/importHead.py diff --git a/tests/pytest/valgrind-test.sh b/tests/pytest/valgrind-test.sh index 1d65830fa3..77c2b321df 100755 --- a/tests/pytest/valgrind-test.sh +++ b/tests/pytest/valgrind-test.sh @@ -29,7 +29,5 @@ python3 ./test.py $1 -s && sleep 1 python3 ./test.py $1 -f table/db_table.py python3 ./test.py $1 -s && sleep 1 -python3 ./test.py $1 -f import_merge/importCacheFileT.py -python3 ./test.py $1 -s && sleep 1 python3 ./test.py $1 -f import_merge/importDataLastSub.py python3 ./test.py $1 -s && sleep 1