pike.git / lib / modules / testsuite.in

version» Context lines:

pike.git/lib/modules/testsuite.in:1: - dnl $Id: testsuite.in,v 1.26 2004/04/06 13:25:56 nilsson Exp $ + dnl $Id: testsuite.in,v 1.27 2004/04/21 19:27:53 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:795:   test_do([[    object proc = Process.create_process (({"/bin/sleep", "99999"}));    array threads = allocate (10, Thread.thread_create) (    lambda (object proc) {proc->wait();}, proc);    sleep (1);    proc->kill (9);    return threads->wait() - ({-1});   ]], ({}))   ]])    + cond([[all_constants()->thread_create]], + [[ +  test_any([[ +  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); +  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();    Process.TraceProcess proc =    Process.TraceProcess(RUNPIKE_ARRAY + ({ "-e", "Stdio.stdin.read(1)" }), ([