pike.git / src / testsuite.in

version» Context lines:

pike.git/src/testsuite.in:1: - test_true([["$Id: testsuite.in,v 1.693 2003/11/15 17:36:04 mast Exp $"]]); + test_true([["$Id: testsuite.in,v 1.694 2003/11/25 22:15:35 mast Exp $"]]);      // This triggered a bug only if run sufficiently early.   test_compile_any([[#pike 7.2]])   test_compile_any([[#pike 7.4]])   test_compile_any([[#pike 7.0]])   test_compile_any([[#pike 0.6]])      cond([[all_constants()->_verify_internals]],   [[    test_do(_verify_internals())
pike.git/src/testsuite.in:4101:    test_do(Thread.Condition()->broadcast())       test_true(objectp(Thread.Fifo()))    test_true(objectp(Thread.Queue()))       test_any([[object o=Thread.Queue(); thread_create(lambda(object f) { for(int e=0;e<10000;e++) f->write(random(4711)); f->write(-1); },o); int tmp=0; while(o->read() != -1) tmp++; return tmp;]],10000)    test_any([[object o=Thread.Fifo(); thread_create(lambda(object f) { for(int e=0;e<10000;e++) f->write(random(4711)); f->write(-1); },o); int tmp=0; while(o->read() != -1) tmp++; return tmp;]],10000)      dnl this will crash pike on out-of-address-space-related errors   dnl test_any([[ catch { allocate(10000,thread_create)(lambda() { sleep(1); })->wait(); } ]]) +  +  test_any([[ +  // Test that a loop relinquishes the interpreter lock every now and then. +  int count, stop; +  Thread.thread_create (lambda() {while (!stop) count++;}); +  sleep (0.1); +  stop = 1; +  sleep (0.1); +  return count > 0; +  ]], 1)   ]])      cond([[all_constants()->thread_create]],   [[    // _disable_threads    test_any([[   #ifndef __NT__   // Using a named pipe here to make open() block. That doesn't exist on NT.      object t = class {