pike.git / lib / modules / testsuite.in

version» Context lines:

pike.git/lib/modules/testsuite.in:1774:   test_any([[object o=Stdio.Fd(); object o2=o->pipe(Stdio.PROP_IPC); object p=Process.create_process(Process.split_quoted_string(RUNPIKE)+({"-e","exit(Stdio.stdin->read(1000)==\"hello\")"}),(["stdin":o])); o2->write("hello"); destruct(o2); return p->wait()]],1)   test_any([[object o=Stdio.Fd(); object o2=o->pipe(Stdio.PROP_IPC); object p=Process.create_process(Process.split_quoted_string(RUNPIKE)+({"-e","exit(Stdio.stdin->read(1000)==\"hello\")"}),(["stdin":o])); o2->write("hello"); o2=0; return p->wait()]],1)      test_any([[object o=Stdio.Fd(); object o2=o->pipe(); object p=Process.create_process(Process.split_quoted_string(RUNPIKE)+({"-e","exit(Stdio.stdin->read(5)==\"hello\")"}),(["stdin":o])); o2->write("hello"); destruct(o); destruct(o2); return p->wait()]],1)   test_any([[object o=Stdio.Fd(); object o2=o->pipe(); object p=Process.create_process(Process.split_quoted_string(RUNPIKE)+({"-e","exit(Stdio.stdin->read(1000)==\"hello\")"}),(["stdin":o])); o2->write("hello"); destruct(o); destruct(o2); return p->wait()]],1)   test_any([[object o=Stdio.Fd(); object o2=o->pipe(); object p=Process.create_process(Process.split_quoted_string(RUNPIKE)+({"-e","exit(Stdio.File(\"stdin\")->read(1000)==\"hello\")"}),(["stdin":o])); o2->write("hello"); destruct(o); destruct(o2); return p->wait()]],1)   test_any([[object o=Stdio.File(); object o2=o->pipe(); object p=Process.create_process(Process.split_quoted_string(RUNPIKE)+({"-e","exit(Stdio.File(\"stdin\")->read(1000)==\"hello\")"}),(["stdin":o])); o2->write("hello"); destruct(o); destruct(o2); return p->wait()]],1)   test_any([[object o=Stdio.File(); object o2=o->pipe(Stdio.PROP_IPC); object p=Process.create_process(Process.split_quoted_string(RUNPIKE)+({"-e","exit(Stdio.stdin->read(1000)==\"hello\")"}),(["stdin":o])); o2->write("hello"); destruct(o); destruct(o2); return p->wait()]],1)   test_any([[object o=Stdio.File(); object o2=o->pipe(Stdio.PROP_BIDIRECTIONAL); object p=Process.create_process(Process.split_quoted_string(RUNPIKE)+({"-e","exit(Stdio.stdin->read(1000)==\"hello\")"}),(["stdin":o2])); o->write("hello"); destruct(o); destruct(o2); return p->wait()]],1)    - cond([[ file_stat("/bin/cat") && file_stat("/dev/null") && (cpp("__NT__")/"\n")[1]=="__NT__" ]], + cond([[ file_stat("/bin/cat") && file_stat("/dev/null") && (cpp("__NT__")/"\n")[-1]=="__NT__" ]],   [[    test_false(Process.create_process(({"/bin/cat","/dev/null"}))->wait());    test_false(Process.create_process(({"/bin/cat","/dev/null"}))->wait());    test_false(Process.create_process(({"/bin/cat","/dev/null"}))->wait());       test_any([[    object o=Process.create_process(({"/bin/cat","/dev/null"}));    if(Process.create_process(({"/bin/cat","/dev/null"}))->wait()) return 99;    sleep(1);    return kill(o->pid(), 9);
pike.git/lib/modules/testsuite.in:1797:    dnl Some OSs have a delay before PIDs are reused.    dnl Be nice, and let them reuse some.    test_do([[ sleep(2); ]]);    test_any([[   #ifdef DISABLE_SLOW_TESTS    return -1;   #endif    for(int x=0;x<10;x++) { for(int e=0;e<100;e++) if(Process.create_process(({"/bin/cat","/dev/null"}))->wait()) return e; __signal_watchdog(); } return -1;]],-1)   ]])    - cond([[ file_stat("/bin/cat") && file_stat("/dev/null") && all_constants()->thread_create && (cpp("__NT__")/"\n")[1]=="__NT__" ]], + cond([[ file_stat("/bin/cat") && file_stat("/dev/null") && all_constants()->thread_create && (cpp("__NT__")/"\n")[-1]=="__NT__" ]],   [[    test_any([[   #ifdef DISABLE_SLOW_TESTS    return ({});   #endif    return allocate(10, thread_create) (    lambda() {    for (int x=0; x<10; x++) {    for (int e=0; e<50; e++)    if (Process.create_process(({"/bin/cat","/dev/null"}))->wait())    return e;    __signal_watchdog();    }    return -1;    }    )->wait() - ({-1})]],({}))   ]])    - cond([[ file_stat("/bin/cat") && file_stat("/dev/null") && all_constants()->thread_create && (cpp("__NT__")/"\n")[1]=="__NT__" ]], + cond([[ file_stat("/bin/cat") && file_stat("/dev/null") && all_constants()->thread_create && (cpp("__NT__")/"\n")[-1]=="__NT__" ]],   [[    test_do([[   #ifdef DISABLE_SLOW_TESTS    return 0;   #endif    for(int q=0;q<100;q++)    {    array fnord=({});    Thread.Fifo fifo=Thread.Fifo();   
pike.git/lib/modules/testsuite.in:1843:    });    }    // for(int e=0;e<50;e++) Stdio.Port()->bind(0);    for(int e=0;e<10;e++) fifo->write(1);    fnord->wait();    __signal_watchdog();    }    ]])   ]])    - cond([[ file_stat("/bin/sleep") && all_constants()->thread_create && (cpp("__NT__")/"\n")[1]=="__NT__" ]], + cond([[ file_stat("/bin/sleep") && all_constants()->thread_create && (cpp("__NT__")/"\n")[-1]=="__NT__" ]],   [[   test_any([[    class Fnord    {   int gnapp(int t)   {   #ifdef DISABLE_SLOW_TESTS    return -1;   #endif    int e;
pike.git/lib/modules/testsuite.in:1924:    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)   ]])      dnl - This test is disabled for now. - cond([[ 0 && __builtin->TraceProcess && (cpp("__NT__")/"\n")[1]=="__NT__" ]], + 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)" }), ([    "stdin":input_fd->pipe(Stdio.PROP_IPC|Stdio.PROP_REVERSE),    ]));