Changeset: a1524ef8eba1 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a1524ef8eba1
Modified Files:
        gdk/gdk_system.h
        testing/Mtest.py.in
Branch: default
Log Message:

Merge with Apr2019 branch.


diffs (67 lines):

diff --git a/gdk/gdk_system.h b/gdk/gdk_system.h
--- a/gdk/gdk_system.h
+++ b/gdk/gdk_system.h
@@ -438,11 +438,15 @@ typedef struct MT_Lock {
                _DBG_LOCK_COUNT_0(l);                                   \
                if (!MT_lock_try(l)) {                                  \
                        /* we didn't get the lock */                    \
+                       int _spincnt = 0;                               \
                        _DBG_LOCK_CONTENTION(l);                        \
                        MT_thread_setlockwait(l);                       \
                        do {                                            \
-                               _DBG_LOCK_SLEEP(l);                     \
-                               MT_sleep_ms(1);                         \
+                               if (++_spincnt == 2048) {               \
+                                       _spincnt = 0;                   \
+                                       _DBG_LOCK_SLEEP(l);             \
+                                       MT_sleep_ms(1);                 \
+                               }                                       \
                        } while (!MT_lock_try(l));                      \
                        MT_thread_setlockwait(NULL);                    \
                }                                                       \
diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -1371,9 +1371,15 @@ def PerformDir(env, testdir, testlist, B
         alllinks = []
         try:
             for TST,COND in testlist:
-                os.environ['TST'] = TST
-                tt, FtOut, FtErr, bodyline, reason, links = RunTest(env, TST, 
BusyPorts, COND, oktests, length, all_tests)
-                alllinks.extend(links)
+                if global_timeout and start_time + global_timeout < 
time.time():
+                    if not testweb:
+                        print('\nGlobal testing timeout reached\n')
+                        break
+                    tt, FtOut, FtErr, bodyline, reason = 
0,F_SKIP,F_SKIP,None,"as the global timeout has been reached"
+                else:
+                    os.environ['TST'] = TST
+                    tt, FtOut, FtErr, bodyline, reason, links = RunTest(env, 
TST, BusyPorts, COND, oktests, length, all_tests)
+                    alllinks.extend(links)
                 if tt:
                     t = "%7.3f" % tt
                 else:
@@ -1389,9 +1395,6 @@ def PerformDir(env, testdir, testlist, B
                         body_bad.append(bodyline)
                 if FtOut in (F_OK, F_WARN) and FtErr in (F_OK, F_WARN):
                     oktests.append(TST)
-                if global_timeout and start_time + global_timeout < 
time.time():
-                    print('\nGlobal testing timeout reached\n')
-                    break
         except KeyboardInterrupt:
             print('\nInterrupted')
             interrupted = True
@@ -4502,10 +4505,10 @@ def main(argv) :
                             body_bad.append(elem)
                     if interrupted:
                         break
-                    if global_timeout and start_time + global_timeout < 
time.time():
-                        print('\nGlobal testing timeout reached\n')
-                        break
                     if not testweb:
+                        if global_timeout and start_time + global_timeout < 
time.time():
+                            print('\nGlobal testing timeout reached\n')
+                            break
                         # after a directory has been tested, create
                         # the index file so that we can look at test
                         # results while the tests are running
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to