pike.git / lib / modules / testsuite.in

version» Context lines:

pike.git/lib/modules/testsuite.in:1: - dnl $Id: testsuite.in,v 1.27 2004/04/21 19:27:53 mast Exp $ + dnl $Id: testsuite.in,v 1.28 2004/05/01 15:42:02 mast Exp $      dnl - Array      test_equal(Array.diff(({ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }),    ({ 6, 7, 8, 9, 3, 4, 5, 1, 2, 0 })),    ({ ({ ({ 0, 1, 2, 3, 4, 5 }),    ({ 6, 7, 8, 9 }), ({}) }),    ({ ({}), ({ 6, 7, 8, 9 }),    ({ 3, 4, 5, 1, 2, 0 }) }) }))   test_equal(Array.diff(({ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }),
pike.git/lib/modules/testsuite.in:803:   ]])      cond([[all_constants()->thread_create]],   [[    test_any([[    int num_ok = 0;       Thread.Mutex m = Thread.Mutex();    Thread.MutexKey l = m->lock();    -  void thread_fn () +  void thread_fn()    {    m->lock();    num_ok++;    };       array(Thread.Thread) t = (({Thread.thread_create}) * 5) (thread_fn);       sleep (0.5); // Make sure they are waiting for the lock.    destruct (m); -  +  l = 0;    sleep (0.5); // Wait for them to finish.       return num_ok;    ]], 5) -  +  +  test_any([[ +  #pike 7.4 +  int num_ok = 0; +  +  Thread.Mutex m = Thread.Mutex(); +  Thread.MutexKey l = m->lock(); +  +  void thread_fn() +  { +  m->lock(); +  num_ok++; +  }; +  +  array(Thread.Thread) t = (({Thread.thread_create}) * 5) (thread_fn); +  +  sleep (0.5); // Make sure they are waiting for the lock. +  destruct (m); // Destructs the outstanding lock too. +  sleep (0.5); // Wait for them to finish. +  +  return num_ok; +  ]], 5)   ]])      dnl - This test is disabled for now.   cond([[ 0 && __builtin->TraceProcess && (cpp("__NT__")/"\n")[1]=="__NT__" ]],   [[   test_any([[    // Check that tracing works...    // Spawn a /bin/dd that hangs on a read from a pipe connected to    // this process, so that it will die of SIGPIPE if we die.    Stdio.File input_fd = Stdio.File();