diff --git a/tests/pytest/util/dnodes.py b/tests/pytest/util/dnodes.py index 96723978ae..613673ea8e 100644 --- a/tests/pytest/util/dnodes.py +++ b/tests/pytest/util/dnodes.py @@ -488,10 +488,13 @@ class TDDnode: psCmd = "ps -ef|grep -w %s| grep -v grep | awk '{print $2}'" % toBeKilled processID = subprocess.check_output( psCmd, shell=True).decode("utf-8") - + + onlyKillOnceWindows = 0 while(processID): - killCmd = "kill -INT %s > /dev/null 2>&1" % processID - os.system(killCmd) + if not platform.system().lower() == 'windows' or (onlyKillOnceWindows == 0 and platform.system().lower() == 'windows'): + killCmd = "kill -INT %s > /dev/null 2>&1" % processID + os.system(killCmd) + onlyKillOnceWindows = 1 time.sleep(1) processID = subprocess.check_output( psCmd, shell=True).decode("utf-8") @@ -524,9 +527,12 @@ class TDDnode: processID = subprocess.check_output( psCmd, shell=True).decode("utf-8") + onlyKillOnceWindows = 0 while(processID): - killCmd = "kill -INT %s > /dev/null 2>&1" % processID - os.system(killCmd) + if not platform.system().lower() == 'windows' or (onlyKillOnceWindows == 0 and platform.system().lower() == 'windows'): + killCmd = "kill -INT %s > /dev/null 2>&1" % processID + os.system(killCmd) + onlyKillOnceWindows = 1 time.sleep(1) processID = subprocess.check_output( psCmd, shell=True).decode("utf-8") @@ -550,9 +556,12 @@ class TDDnode: processID = subprocess.check_output( psCmd, shell=True).decode("utf-8") + onlyKillOnceWindows = 0 while(processID): - killCmd = "kill -KILL %s > /dev/null 2>&1" % processID - os.system(killCmd) + if not platform.system().lower() == 'windows' or (onlyKillOnceWindows == 0 and platform.system().lower() == 'windows'): + killCmd = "kill -KILL %s > /dev/null 2>&1" % processID + os.system(killCmd) + onlyKillOnceWindows = 1 time.sleep(1) processID = subprocess.check_output( psCmd, shell=True).decode("utf-8") diff --git a/tests/tsim/inc/simParse.h b/tests/tsim/inc/simParse.h index 349a117944..2a683f9561 100644 --- a/tests/tsim/inc/simParse.h +++ b/tests/tsim/inc/simParse.h @@ -35,14 +35,14 @@ enum { /* label stack */ typedef struct { - char top; /* number of labels */ + int8_t top; /* number of labels */ int16_t pos[MAX_NUM_LABLES]; /* the position of the label */ char label[MAX_NUM_LABLES][MAX_LABEL_LEN]; /* name of the label */ } SLabel; /* block definition */ typedef struct { - char top; /* the number of blocks stacked */ + int8_t top; /* the number of blocks stacked */ char type[MAX_NUM_BLOCK]; /* the block type */ int16_t *pos[MAX_NUM_BLOCK]; /* position of the jump for if/elif/case */ int16_t back[MAX_NUM_BLOCK]; /* go back, endw and continue */ diff --git a/tools/shell/src/shellEngine.c b/tools/shell/src/shellEngine.c index 14cab041f6..a496cc2864 100644 --- a/tools/shell/src/shellEngine.c +++ b/tools/shell/src/shellEngine.c @@ -758,7 +758,6 @@ void shellReadHistory() { taosCloseFile(&pFile); int64_t file_size; if (taosStatFile(pHistory->file, &file_size, NULL) == 0 && file_size > SHELL_MAX_COMMAND_SIZE) { - fprintf(stdout,"%s(%d) %s %08" PRId64 "\n", __FILE__, __LINE__,__func__,taosGetSelfPthreadId());fflush(stdout); TdFilePtr pFile = taosOpenFile(pHistory->file, TD_FILE_CREATE | TD_FILE_WRITE | TD_FILE_STREAM | TD_FILE_TRUNC); if (pFile == NULL) return; int32_t endIndex = pHistory->hstart;