Changeset 70969f8


Ignore:
Timestamp:
Mar 8, 2018, 12:56:02 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
9d6f011, b2fe1c9
Parents:
e61de5b
Message:

Updated longrun tests have a more consistent duration

Location:
src/tests
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • src/tests/concurrent/coroutineYield.c

    re61de5b r70969f8  
    33#include <stdlib>
    44#include <thread>
     5
     6#ifdef LONG_TEST
     7static const unsigned long N = 600_000ul;
     8#else
     9static const unsigned long N = 1_000ul;
     10#endif
    511
    612coroutine Coroutine {};
     
    1824int main(int argc, char* argv[]) {
    1925        Coroutine c;
    20         for(int i = 0; i < 1_000; i++) {
     26        for(int i = 0; i < N; i++) {
    2127                sout | "Thread 1" | endl;
    2228                resume(c);
  • src/tests/concurrent/signal/block.c

    re61de5b r70969f8  
    1515#include <time.h>
    1616
     17#ifdef LONG_TEST
     18static const unsigned long N = 150_000ul;
     19#else
    1720static const unsigned long N = 5_000ul;
     21#endif
    1822
    1923#ifndef PREEMPTION_RATE
  • src/tests/concurrent/signal/disjoint.c

    re61de5b r70969f8  
    66#include <time.h>
    77
     8#ifdef LONG_TEST
     9static const unsigned long N = 300_000ul;
     10#else
    811static const unsigned long N = 10_000ul;
     12#endif
    913
    1014#ifndef PREEMPTION_RATE
  • src/tests/concurrent/signal/wait.c

    re61de5b r70969f8  
    1313#include <time.h>
    1414
     15#ifdef LONG_TEST
     16static const unsigned long N = 375_000ul;
     17#else
    1518static const unsigned long N = 2_500ul;
     19#endif
    1620
    1721#ifndef PREEMPTION_RATE
  • src/tests/preempt_longrun/Makefile.am

    re61de5b r70969f8  
    2323TIME = /usr/bin/time -f "%E"
    2424
    25 BUILD_FLAGS = -g -Wall -Wno-unused-function -quiet @CFA_FLAGS@ -O2 -DPREEMPTION_RATE=${preempt}
     25BUILD_FLAGS = -g -Wall -Wno-unused-function -quiet @CFA_FLAGS@ -O2 -DPREEMPTION_RATE=${preempt} -DLONG_TEST
    2626CFLAGS = ${BUILD_FLAGS}
    2727CC = @CFA_BINDIR@/@CFA_NAME@
  • src/tests/preempt_longrun/Makefile.in

    re61de5b r70969f8  
    454454REPEAT = ${abs_top_srcdir}/tools/repeat
    455455TIME = /usr/bin/time -f "%E"
    456 BUILD_FLAGS = -g -Wall -Wno-unused-function -quiet @CFA_FLAGS@ -O2 -DPREEMPTION_RATE=${preempt}
     456BUILD_FLAGS = -g -Wall -Wno-unused-function -quiet @CFA_FLAGS@ -O2 -DPREEMPTION_RATE=${preempt} -DLONG_TEST
    457457TESTS = block coroutine create disjoint enter enter3 processor stack wait yield
    458458all: all-am
  • src/tests/preempt_longrun/processor.c

    re61de5b r70969f8  
    1919        for ( int i = 0; i < N; i++) {
    2020                int pi = i % 15;
    21                 //for ( volatile int j = 0; j < 10000; j++ );
    2221                delete( p[pi] );
    2322                p[pi] = new();
  • src/tests/preempt_longrun/yield.c

    re61de5b r70969f8  
    22#include <thread>
    33
     4#ifdef LONG_TEST
     5static const unsigned long N = 9_750_000ul;
     6#else
    47static const unsigned long N = 325_000ul;
     8#endif
    59
    610#ifndef PREEMPTION_RATE
Note: See TracChangeset for help on using the changeset viewer.