From cd1bcb68c7ffd0ff7d969576dd282620e8b833cb Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Sun, 24 Apr 2022 21:32:10 +0800 Subject: [PATCH 1/2] fix(tools): repair nettest in shell and dnode --- source/dnode/mgmt/interface/src/dmInt.c | 8 ++++++-- tools/shell/src/shellNettest.c | 10 +++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/source/dnode/mgmt/interface/src/dmInt.c b/source/dnode/mgmt/interface/src/dmInt.c index 491eff5e17..2d15a7a008 100644 --- a/source/dnode/mgmt/interface/src/dmInt.c +++ b/source/dnode/mgmt/interface/src/dmInt.c @@ -173,9 +173,13 @@ static void dmGetServerStatus(SDnode *pDnode, SServerStatusRsp *pStatus) { void dmProcessNettestReq(SDnode *pDnode, SRpcMsg *pRpc) { dDebug("net test req is received"); - SRpcMsg rsp = {.handle = pRpc->handle, .ahandle = pRpc->ahandle, .code = 0}; + SRpcMsg rsp = {.handle = pRpc->handle, .refId = pRpc->refId, .ahandle = pRpc->ahandle, .code = 0}; rsp.pCont = rpcMallocCont(pRpc->contLen); - rsp.contLen = pRpc->contLen; + if (rsp.pCont == NULL) { + rsp.code = TSDB_CODE_OUT_OF_MEMORY; + } else { + rsp.contLen = pRpc->contLen; + } rpcSendResponse(&rsp); } diff --git a/tools/shell/src/shellNettest.c b/tools/shell/src/shellNettest.c index 307049dd38..c8ec31c48b 100644 --- a/tools/shell/src/shellNettest.c +++ b/tools/shell/src/shellNettest.c @@ -67,7 +67,7 @@ static void shellWorkAsClient() { printf("request is sent, size:%d\n", rpcMsg.contLen); rpcSendRecv(clientRpc, &epSet, &rpcMsg, &rpcRsp); - if (rpcRsp.code == 0 &&rpcRsp.contLen == rpcMsg.contLen) { + if (rpcRsp.code == 0 && rpcRsp.contLen == rpcMsg.contLen) { printf("response is received, size:%d\n", rpcMsg.contLen); if (rpcRsp.code == 0) totalSucc++; } else { @@ -97,8 +97,12 @@ static void shellProcessMsg(void *p, SRpcMsg *pRpc, SEpSet *pEpSet) { printf("request is received, size:%d\n", pRpc->contLen); fflush(stdout); SRpcMsg rsp = {.handle = pRpc->handle, .refId = pRpc->refId, .ahandle = pRpc->ahandle, .code = 0}; - rsp.pCont = rpcMallocCont(shell.args.pktLen); - rsp.contLen = shell.args.pktLen; + rsp.pCont = rpcMallocCont(pRpc->contLen); + if (rsp.pCont == NULL) { + rsp.code = TSDB_CODE_OUT_OF_MEMORY; + } else { + rsp.contLen = pRpc->contLen; + } rpcSendResponse(&rsp); } From dc8dfee3c86127cadfafd07fb2ae3d4765876f2d Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Mon, 25 Apr 2022 09:48:37 +0800 Subject: [PATCH 2/2] ci: remove unstable cases --- tests/system-test/fulltest.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/system-test/fulltest.sh b/tests/system-test/fulltest.sh index 455d70aac7..2954358feb 100755 --- a/tests/system-test/fulltest.sh +++ b/tests/system-test/fulltest.sh @@ -4,4 +4,4 @@ set -e #python3 ./test.py -f 2-query/between.py #python3 ./test.py -f 2-query/distinct.py python3 ./test.py -f 2-query/varchar.py -python3 ./test.py -f 2-query/cast.py +#python3 ./test.py -f 2-query/cast.py