Changeset: b9427d00dcb5 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b9427d00dcb5
Modified Files:
testing/Mtest.py.in
Branch: Aug2011
Log Message:
Mtest: remove legacy --at option.
This implies removing the "Killed" outcome of a test.
diffs (292 lines):
diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -209,9 +209,8 @@ F_WARN = 1
F_SOCK = 2
F_TIME = 3
F_RECU = 4
-F_KILL = 5
-F_SEGV = 6
-F_ERROR = 7
+F_SEGV = 5
+F_ERROR = 6
FAILURES = {
F_SKIP : "F_SKIP",
@@ -220,7 +219,6 @@ FAILURES = {
F_SOCK : "F_SOCK",
F_TIME : "F_TIME",
F_RECU : "F_RECU",
- F_KILL : "F_KILL",
F_SEGV : "F_SEGV",
F_ERROR : "F_ERROR"
}
@@ -447,7 +445,6 @@ purple = '#aa00aa'
stylesheet = Element('style', None, Text('''
.error { font-weight: bold; font-style: italic; color: red; }
.segfault { font-weight: bold; font-style: italic; color: purple; }
-.killed { font-weight: bold; font-style: italic; color: purple; }
.recursion { font-weight: bold; font-style: italic; color: purple; }
.timeout { font-weight: bold; font-style: italic; color: purple; }
.socket { font-weight: bold; font-style: italic; color: purple; }
@@ -654,7 +651,7 @@ def CreateTstWhatXhtml (env, TST, stable
f.close()
diffclass = 'error'
difftext = 'Major differences'
- if diffclass == 'error' and SockTime in (F_SOCK, F_TIME, F_RECU, F_KILL,
F_SEGV):
+ if diffclass == 'error' and SockTime in (F_SOCK, F_TIME, F_RECU, F_SEGV):
if SockTime == F_SOCK:
diffclass = 'socket'
difftext = difftext + ' (Socket)'
@@ -664,9 +661,6 @@ def CreateTstWhatXhtml (env, TST, stable
if SockTime == F_RECU:
diffclass = 'recursion'
difftext = difftext + ' (Recursion)'
- if SockTime == F_KILL:
- diffclass = 'killed'
- difftext = difftext + ' (Killed)'
if SockTime == F_SEGV:
diffclass = 'segfault'
difftext = difftext + ' (Crash)'
@@ -867,8 +861,6 @@ def CreateSrcIndex (env, TST, EXT) :
def AddHref (href, target, linktext, diff) :
if diff == F_ERROR:
klass = 'error'
- elif diff == F_KILL:
- klass = 'killed'
elif diff == F_RECU:
klass = 'recursion'
elif diff == F_TIME:
@@ -923,12 +915,10 @@ def AddTstToHtmlIndex (env, TST, STABLEo
ff.write("\n<!--MajorDiffs-->\n")
ff.close()
e = F_ERROR
- if e == F_ERROR and SockTime in (F_SOCK, F_TIME, F_RECU, F_KILL, F_SEGV):
+ if e == F_ERROR and SockTime in (F_SOCK, F_TIME, F_RECU, F_SEGV):
e = SockTime
if o == F_ERROR or e == F_ERROR:
tstclass = 'error'
- elif e == F_KILL:
- tstclass = 'killed'
elif e == F_RECU:
tstclass = 'recursion'
elif e == F_TIME:
@@ -1448,30 +1438,6 @@ def CheckTests(env, TST, oktests):
return missing
### CheckTests(env, TST, oktests) #
-def StartAt(cmd) :
- if procdebug:
- print 'StartAt: starting process "%s" (inpipe, outpipe, errpipe)\n' %
cmd
- proc = subprocess.Popen(cmd, shell = True, stdin = subprocess.PIPE, stdout
= subprocess.PIPE, stderr = subprocess.PIPE, universal_newlines = True)
- qOut, qErr = proc.communicate()
- if procdebug:
- print 'StartAt: starting exited "%s"\n' % cmd
- return qOut.split('\n', 1)[0].strip()
-### StartAt(cmd) #
-
-def StopAt(ATJOB,ME) :
- while os.path.isfile(path("/tmp/.MkillUsers."+ME)):
- time.sleep(9)
- if SYST in ("IRIX", "IRIX64", "Darwin", "HPUX") or SYSTVER[:-1] ==
"SunOS5.1":
- ATRM = 'at -r '
- elif SYST == "SunOS":
- ATRM = 'atrm -f '
- else:
- ATRM = 'atrm '
- os.system(ATRM+ATJOB)
- #TODO:
- #LOG1x at -l >&2
-### StopAt(ATJOB,ME) #
-
def StableOutErr(env,par,TST,SYST,RELEASE,DIST,VERSION) :
BITS = env['TST_BITS']
OIDS = env['TST_OIDS']
@@ -1712,31 +1678,6 @@ def RunTest(env, TST, BusyPorts, COND, o
STIMEOUT = STIMEOUT + TIMEOUT + min(TIMEOUT, par['TIMEOUT'])
ME = ""
- ATJOB1 = ""
- MkillUsers = ""
- MkillUsersAT = ""
- if TIMEOUT and os.name != "nt" and sys.platform != 'cygwin' and
env.get('USE_AT'):
- for f in TST+".KILLED.out", TST+".KILLED.err":
- if os.path.isfile(f):
- os.remove(f)
- ME = str(os.getpid())
- WAIT = str(int(STIMEOUT / 60) + 2)
- FILES = os.path.join(TSTTRGDIR,TST)+"
"+os.path.join(TSTTRGDIR,TST)+".*"
- for f in ["bat/\\*", '.gdk_lock']:
- FILES = FILES+" "+os.path.join(env['GDK_DBFARM'],TSTDB,path(f))
- WHAT0 = os.path.join(THISPATH,"MkillUsers")
- if env.get('CONCURRENT'):
- WHAT0 = WHAT0+" --concurrent"
- WHAT0 = WHAT0+" -l"+ME
- WHAT1 = FILES+r"
\>\>"+os.path.join(TSTTRGDIR,TST+".KILLED.out")+r"
2\>\>"+os.path.join(TSTTRGDIR,TST+".KILLED.err")
- WHAT = WHAT0+" -p"+ME+" "+WHAT1
- WHEN = "now + "+WAIT+" minutes"
- cmd = "echo "+WHAT+" 2>/dev/null | at "+WHEN+" 2>&1 | awk
'/^[Jj]ob/{print $2}'"
- ATJOB1 = StartAt(cmd)
- #TODO:
- #LOG1x at -l >&2
- MkillUsers = (WHAT0+" "+WHAT1).replace('\\','')
- MkillUsersAT = "echo "+WHAT+" 2>/dev/null | at now + 1 minute
2>&1 | awk '/^[Jj]ob/{print $2}'"
TestOutFile = TST+".test.out"
TestErrFile = TST+".test.err"
@@ -1748,7 +1689,7 @@ def RunTest(env, TST, BusyPorts, COND, o
TestErr.close()
t0 = time.time()
- tres = DoIt(env, SERVER, CALL, TST, EXT, PRELUDE, TestOutFile,
TestErrFile, STIMEOUT, CTIMEOUT, TIMEOUT, MkillUsersAT, ME, MAPIsockets, length)
+ tres = DoIt(env, SERVER, CALL, TST, EXT, PRELUDE, TestOutFile,
TestErrFile, STIMEOUT, CTIMEOUT, TIMEOUT, ME, MAPIsockets, length)
t1 = time.time()
TX = t1 - t0
@@ -1757,7 +1698,6 @@ def RunTest(env, TST, BusyPorts, COND, o
timeout = F_OK
recursion = F_OK
- killed = F_OK
segfaulted = F_OK
if tres == 'timeout':
@@ -1767,33 +1707,6 @@ def RunTest(env, TST, BusyPorts, COND, o
elif tres == 'segfault':
segfaulted = F_SEGV
- if ATJOB1:
- StopAt(ATJOB1,ME)
- os.system(WHAT.replace('\\', '').replace(" -p"+ME+" ", ' '))
- else:
- while os.path.exists(os.path.join(TSTTRGBASE,".KILLED.lck")):
- time.sleep(1)
-
- if MkillUsers:
- os.system(MkillUsers)
-
- n = TST+".KILLED."
- for (x,txf) in [("out",TestOutFile),("err",TestErrFile)]:
- f = n+x
- if os.name == "nt":
- for t in os.path.join(TSTTRGBASE,f),
os.path.join(TSTTRGBASE,".KILLED."+x):
- if os.path.isfile(t):
- shutil.copy(t,f)
- os.remove(t)
- break
- if os.path.isfile(f) and os.path.getsize(f):
- p = try_open(txf, 'a')
- if p is not None:
- for l in open(f):
- p.write("! "+l)
- killed = F_KILL
- p.close()
-
sockerr = F_OK
sockerr = max(sockerr, CheckSocket3(env, "MAPI", TestErrFile))
@@ -1824,12 +1737,6 @@ def RunTest(env, TST, BusyPorts, COND, o
elif verbose:
STDOUT.write("(Recursion!) ")
- if killed == F_KILL:
- if quiet:
- STDOUT.write("\n%s : Killed!\n" % TST)
- elif verbose:
- STDOUT.write("(Killed!) ")
-
if segfaulted == F_SEGV:
if quiet:
STDOUT.write("\n%s : Crashed!\n" % TST)
@@ -1866,8 +1773,8 @@ def RunTest(env, TST, BusyPorts, COND, o
diff_html.write('<!--MajorDiffs-->\n')
diff_html.close()
timedout = True
- if timeout == F_TIME or recursion == F_RECU or killed == F_KILL or
segfaulted == F_SEGV:
- # test run timed out or orphan processes were killed => expect
major differences!
+ if timeout == F_TIME or recursion == F_RECU or segfaulted == F_SEGV:
+ # test run timed out or crashed => expect major differences!
ACCURACYout = -1
else:
fs = open("%s%s.FILTERED" % (TST, STABLEout))
@@ -1936,8 +1843,8 @@ def RunTest(env, TST, BusyPorts, COND, o
diff_html.write('<!--MajorDiffs-->\n')
diff_html.close()
timedout = True
- if timeout == F_TIME or recursion == F_RECU or killed == F_KILL or
segfaulted == F_SEGV:
- # test run timed out or orphan processes were killed => expect
major differences!
+ if timeout == F_TIME or recursion == F_RECU or segfaulted == F_SEGV:
+ # test run timed out or crashed => expect major differences!
ACCURACYerr = -1
else:
fs = open("%s%s.FILTERED" % (TST, STABLEerr))
@@ -2001,15 +1908,13 @@ def RunTest(env, TST, BusyPorts, COND, o
proc = subprocess.Popen(cmd)
proc.wait()
- FailedOut, FailedErr, elem = AddTstToHtmlIndex(env, TST, STABLEout,
STABLEerr, EXT, max(sockerr, timeout, recursion, killed, segfaulted))
+ FailedOut, FailedErr, elem = AddTstToHtmlIndex(env, TST, STABLEout,
STABLEerr, EXT, max(sockerr, timeout, recursion, segfaulted))
if not verbose and not quiet:
if timeout == F_TIME:
STDOUT.write("TIMEOUT")
elif recursion == F_RECU:
STDOUT.write("RECURSION")
- elif killed == F_KILL:
- STDOUT.write("KILLED")
elif segfaulted == F_SEGV:
STDOUT.write("CRASHED")
else:
@@ -2264,7 +2169,7 @@ def mapi_ping(port,lang) :
return False
### mapi_ping() #
-def DoIt(env, SERVER, CALL, TST, EXT, PRELUDE, TestOutFile, TestErrFile,
STIMEOUT, CTIMEOUT, TIMEOUT, MkillUsersAT, ME, MAPIsockets, length) :
+def DoIt(env, SERVER, CALL, TST, EXT, PRELUDE, TestOutFile, TestErrFile,
STIMEOUT, CTIMEOUT, TIMEOUT, ME, MAPIsockets, length) :
ATJOB2 = ""
STDERR.flush()
if quiet:
@@ -2451,8 +2356,6 @@ def DoIt(env, SERVER, CALL, TST, EXT, PR
except IOError, (IOerrNo, IOerrStr):
Warn("Closing input pipe in DoIt failed with #%d: '%s'." %
(IOerrNo, IOerrStr))
- if MkillUsersAT:
- ATJOB2 = StartAt(MkillUsersAT)
CollectIt(pSrvr.stdout, SrvrOut)
pSrvr.wait()
pSrvrTimer.cancel()
@@ -2555,7 +2458,7 @@ def DoIt(env, SERVER, CALL, TST, EXT, PR
return None
-### DoIt(env, SERVER, CALL, TST, EXT, PRELUDE, TestOut, TestErr, STIMEOUT,
CTIMEOUT, TIMEOUT, MkillUsersAT, ME, MAPIsockets) #
+### DoIt(env, SERVER, CALL, TST, EXT, PRELUDE, TestOut, TestErr, STIMEOUT,
CTIMEOUT, TIMEOUT, ME, MAPIsockets) #
def Check(command, input) :
if procdebug:
@@ -2980,7 +2883,6 @@ def main(argv) :
'default: %s' % dft['SQLCLIENT']),
('SQLDUMP', None, 'SQLDUMP', '<sql-dump program>',
'default: %s' % dft['SQLDUMP']),
- ('at', None, 'use_at', None, 'Use at command as watchdog'),
('concurrent', None, 'concurrent', None,
'There are concurrent Mtest runs using the same MonetDB
installation'),
('dbg', None, 'dbg', '<debugger/valgrind>',
@@ -3070,9 +2972,6 @@ def main(argv) :
a = opts.get('gdk_dbfarm')
if a is not None:
env['GDK_DBFARM'] = a
- a = opts.get('use_at')
- if a is not None:
- env['USE_AT'] = a
a = opts.get('concurrent')
if a is not None:
env['CONCURRENT'] = a
@@ -3647,7 +3546,6 @@ VALUES (%s, '%s', '%s', '%s',
(F_WARN, "produced slightly different output",
"slightly"),
(F_SOCK, "did not properly release socket(s)",
"SIGNIFICANTLY"),
(F_TIME, "ran into timeout", "SIGNIFICANTLY"),
- (F_KILL, "had orphan processes killed",
"SIGNIFICANTLY"),
(F_SEGV, "resulted in a crash", "SIGNIFICANTLY"),
(F_RECU, "ran into too deep recursion",
"SIGNIFICANTLY"),
(F_ERROR, "produced SIGNIFICANTLY different output",
"SIGNIFICANTLY")]:
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list