From 17ddb4587ddce910fb3ccf9bc3a806e50c301f99 Mon Sep 17 00:00:00 2001 From: Minglei Jin Date: Thu, 6 May 2021 14:36:40 +0800 Subject: [PATCH 01/15] [TD-4056]: fix possible char string buffer length overflow --- src/plugins/http/inc/httpInt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/http/inc/httpInt.h b/src/plugins/http/inc/httpInt.h index 634468f3cc..0a5822b908 100644 --- a/src/plugins/http/inc/httpInt.h +++ b/src/plugins/http/inc/httpInt.h @@ -171,7 +171,7 @@ typedef struct HttpThread { EpollFd pollFd; int32_t numOfContexts; int32_t threadId; - char label[HTTP_LABEL_SIZE]; + char label[HTTP_LABEL_SIZE << 1]; bool (*processData)(HttpContext *pContext); } HttpThread; From 702cb8549918bdaf44ad31204d8d57ad7e0ad69e Mon Sep 17 00:00:00 2001 From: liuyq-617 Date: Thu, 6 May 2021 14:55:18 +0800 Subject: [PATCH 02/15] smoke test --- .drone.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.drone.yml b/.drone.yml index b71b99e488..1619b031d7 100644 --- a/.drone.yml +++ b/.drone.yml @@ -16,6 +16,8 @@ steps: - cd debug - cmake .. - make + - cd ../tests + - ./test-all.sh smoke when: branch: - develop From 8258fc25334cd83d962a78a7728afcda82e366e2 Mon Sep 17 00:00:00 2001 From: liuyq-617 Date: Thu, 6 May 2021 14:55:36 +0800 Subject: [PATCH 03/15] smoke --- tests/test-all.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-all.sh b/tests/test-all.sh index 47e5de6aa0..997894c509 100755 --- a/tests/test-all.sh +++ b/tests/test-all.sh @@ -66,7 +66,7 @@ function runSimCaseOneByOne { echo -e "${RED} failed${NC}" | tee -a out.log else echo -n $case - ./test.sh -f $case > /dev/null 2>&1 && \ + ./test.sh -f $case && \ ( grep -q 'script.*'$case'.*failed.*, err.*lineNum' ../../sim/tsim/log/taoslog0.0 && echo -e "${RED} failed${NC}" | tee -a out.log || echo -e "${GREEN} success${NC}" | tee -a out.log )|| \ ( grep -q 'script.*success.*m$' ../../sim/tsim/log/taoslog0.0 && echo -e "${GREEN} success${NC}" | tee -a out.log ) || \ echo -e "${RED} failed${NC}" | tee -a out.log From ee6d50e059adfa2f0b53afc64b492dae28c0c0c5 Mon Sep 17 00:00:00 2001 From: liuyq-617 Date: Thu, 6 May 2021 15:05:51 +0800 Subject: [PATCH 04/15] test --- .drone.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 1619b031d7..b71b99e488 100644 --- a/.drone.yml +++ b/.drone.yml @@ -16,8 +16,6 @@ steps: - cd debug - cmake .. - make - - cd ../tests - - ./test-all.sh smoke when: branch: - develop From 642830a10e672d26f1081c9f1fee184ca2d52d9a Mon Sep 17 00:00:00 2001 From: liuyq-617 Date: Thu, 6 May 2021 15:10:35 +0800 Subject: [PATCH 05/15] test --- .drone.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.drone.yml b/.drone.yml index b71b99e488..ae536ac2c7 100644 --- a/.drone.yml +++ b/.drone.yml @@ -24,6 +24,8 @@ steps: - name: smoke_test image: python:3.8 commands: + - apt-get update + - apt-get install -y cmake build-essential gcc - pip3 install psutil - pip3 install guppy3 - pip3 install src/connector/python/linux/python3/ From 5d5027f82087a51e71a24a7a8f88cec2009fdffa Mon Sep 17 00:00:00 2001 From: liuyq-617 Date: Thu, 6 May 2021 15:16:16 +0800 Subject: [PATCH 06/15] test --- tests/script/general/cache/new_metrics.sim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/script/general/cache/new_metrics.sim b/tests/script/general/cache/new_metrics.sim index eb9b042483..b12938f25e 100644 --- a/tests/script/general/cache/new_metrics.sim +++ b/tests/script/general/cache/new_metrics.sim @@ -5,7 +5,7 @@ system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c walLevel -v 1 system sh/exec.sh -n dnode1 -s start -sleep 2000 +sleep 20000 sql connect $i = 0 From 6bba155857aa8d902b6fd2ae72eb56674d649f89 Mon Sep 17 00:00:00 2001 From: liuyq-617 Date: Thu, 6 May 2021 15:23:25 +0800 Subject: [PATCH 07/15] test --- .drone.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index ae536ac2c7..5ecc78490c 100644 --- a/.drone.yml +++ b/.drone.yml @@ -24,11 +24,10 @@ steps: - name: smoke_test image: python:3.8 commands: - - apt-get update - - apt-get install -y cmake build-essential gcc - pip3 install psutil - pip3 install guppy3 - pip3 install src/connector/python/linux/python3/ + - mkdir sim/tsim - cd tests - ./test-all.sh smoke when: From 2268535d28ea9655bde6f33b101b7496f5774272 Mon Sep 17 00:00:00 2001 From: liuyq-617 Date: Thu, 6 May 2021 15:58:36 +0800 Subject: [PATCH 08/15] test --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 5ecc78490c..22ef72f80d 100644 --- a/.drone.yml +++ b/.drone.yml @@ -27,7 +27,7 @@ steps: - pip3 install psutil - pip3 install guppy3 - pip3 install src/connector/python/linux/python3/ - - mkdir sim/tsim + - mkdir -p /drone/src/sim/tsim - cd tests - ./test-all.sh smoke when: From fc57fad2db36b7226c8cd33b6a3c9132eb09675d Mon Sep 17 00:00:00 2001 From: liuyq-617 Date: Thu, 6 May 2021 16:08:26 +0800 Subject: [PATCH 09/15] test --- .drone.yml | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/.drone.yml b/.drone.yml index 22ef72f80d..f0e2974a2a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -11,24 +11,15 @@ steps: image: gcc commands: - apt-get update - - apt-get install -y cmake build-essential + - apt-get install -y cmake build-essential python3.8 python3-pip + - pip3 install psutil + - pip3 install guppy3 + - pip3 install src/connector/python/linux/python3/ - mkdir debug - cd debug - cmake .. - make - when: - branch: - - develop - - master - -- name: smoke_test - image: python:3.8 - commands: - - pip3 install psutil - - pip3 install guppy3 - - pip3 install src/connector/python/linux/python3/ - - mkdir -p /drone/src/sim/tsim - - cd tests + - cd ../tests - ./test-all.sh smoke when: branch: @@ -36,6 +27,7 @@ steps: - master + - name: crash_gen image: python:3.8 commands: From dd16e2d95c4360ea23ec03502222e6918f6ce599 Mon Sep 17 00:00:00 2001 From: liuyq-617 Date: Thu, 6 May 2021 16:33:39 +0800 Subject: [PATCH 10/15] test --- .drone.yml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index f0e2974a2a..07d31cb118 100644 --- a/.drone.yml +++ b/.drone.yml @@ -11,7 +11,24 @@ steps: image: gcc commands: - apt-get update - - apt-get install -y cmake build-essential python3.8 python3-pip + - apt-get install -y cmake build-essential + - pip3 install psutil + - pip3 install guppy3 + - pip3 install src/connector/python/linux/python3/ + - mkdir debug + - cd debug + - cmake .. + - make + when: + branch: + - develop + - master + +- name: smoke_test + image: python:3.8 + commands: + - apt-get update + - apt-get install -y cmake build-essential gcc - pip3 install psutil - pip3 install guppy3 - pip3 install src/connector/python/linux/python3/ @@ -27,7 +44,6 @@ steps: - master - - name: crash_gen image: python:3.8 commands: From e2f8b44617213f0ef4d1ebde6d17262096317e16 Mon Sep 17 00:00:00 2001 From: liuyq-617 Date: Thu, 6 May 2021 16:36:09 +0800 Subject: [PATCH 11/15] test --- .drone.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index 07d31cb118..fac8efc0bf 100644 --- a/.drone.yml +++ b/.drone.yml @@ -12,9 +12,6 @@ steps: commands: - apt-get update - apt-get install -y cmake build-essential - - pip3 install psutil - - pip3 install guppy3 - - pip3 install src/connector/python/linux/python3/ - mkdir debug - cd debug - cmake .. From 302cb46953f4dcad9cb3d9446ce020a46adaeaff Mon Sep 17 00:00:00 2001 From: liuyq-617 Date: Thu, 6 May 2021 16:40:51 +0800 Subject: [PATCH 12/15] test --- .drone.yml | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/.drone.yml b/.drone.yml index fac8efc0bf..926883b0ba 100644 --- a/.drone.yml +++ b/.drone.yml @@ -7,19 +7,6 @@ platform: arch: amd64 steps: -- name: build - image: gcc - commands: - - apt-get update - - apt-get install -y cmake build-essential - - mkdir debug - - cd debug - - cmake .. - - make - when: - branch: - - develop - - master - name: smoke_test image: python:3.8 From 0056a7f39ed3ffd8876089ccf798ef143db57638 Mon Sep 17 00:00:00 2001 From: liuyq-617 Date: Thu, 6 May 2021 16:44:47 +0800 Subject: [PATCH 13/15] test --- .drone.yml | 19 ++++++++++++++----- tests/test-all.sh | 2 +- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.drone.yml b/.drone.yml index 926883b0ba..5d997560d4 100644 --- a/.drone.yml +++ b/.drone.yml @@ -7,6 +7,19 @@ platform: arch: amd64 steps: +- name: build + image: gcc + commands: + - apt-get update + - apt-get install -y cmake build-essential + - mkdir debug + - cd debug + - cmake .. + - make + when: + branch: + - develop + - master - name: smoke_test image: python:3.8 @@ -16,11 +29,7 @@ steps: - pip3 install psutil - pip3 install guppy3 - pip3 install src/connector/python/linux/python3/ - - mkdir debug - - cd debug - - cmake .. - - make - - cd ../tests + - cd tests - ./test-all.sh smoke when: branch: diff --git a/tests/test-all.sh b/tests/test-all.sh index 997894c509..47e5de6aa0 100755 --- a/tests/test-all.sh +++ b/tests/test-all.sh @@ -66,7 +66,7 @@ function runSimCaseOneByOne { echo -e "${RED} failed${NC}" | tee -a out.log else echo -n $case - ./test.sh -f $case && \ + ./test.sh -f $case > /dev/null 2>&1 && \ ( grep -q 'script.*'$case'.*failed.*, err.*lineNum' ../../sim/tsim/log/taoslog0.0 && echo -e "${RED} failed${NC}" | tee -a out.log || echo -e "${GREEN} success${NC}" | tee -a out.log )|| \ ( grep -q 'script.*success.*m$' ../../sim/tsim/log/taoslog0.0 && echo -e "${GREEN} success${NC}" | tee -a out.log ) || \ echo -e "${RED} failed${NC}" | tee -a out.log From 828628ab2ec504af21b31d00a7ba6c525c997682 Mon Sep 17 00:00:00 2001 From: liuyq-617 Date: Thu, 6 May 2021 16:49:11 +0800 Subject: [PATCH 14/15] test --- .drone.yml | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/.drone.yml b/.drone.yml index 5d997560d4..e7ae6ebbda 100644 --- a/.drone.yml +++ b/.drone.yml @@ -7,20 +7,6 @@ platform: arch: amd64 steps: -- name: build - image: gcc - commands: - - apt-get update - - apt-get install -y cmake build-essential - - mkdir debug - - cd debug - - cmake .. - - make - when: - branch: - - develop - - master - - name: smoke_test image: python:3.8 commands: @@ -29,7 +15,11 @@ steps: - pip3 install psutil - pip3 install guppy3 - pip3 install src/connector/python/linux/python3/ - - cd tests + - mkdir debug + - cd debug + - cmake .. + - make + - cd ../tests - ./test-all.sh smoke when: branch: From d8b9ed31da00d38eebfbb059f7d001c2f448eaed Mon Sep 17 00:00:00 2001 From: liuyq-617 Date: Thu, 6 May 2021 17:46:09 +0800 Subject: [PATCH 15/15] recovery new_metrics.sim --- tests/script/general/cache/new_metrics.sim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/script/general/cache/new_metrics.sim b/tests/script/general/cache/new_metrics.sim index b12938f25e..eb9b042483 100644 --- a/tests/script/general/cache/new_metrics.sim +++ b/tests/script/general/cache/new_metrics.sim @@ -5,7 +5,7 @@ system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c walLevel -v 1 system sh/exec.sh -n dnode1 -s start -sleep 20000 +sleep 2000 sql connect $i = 0