Changeset b9da9585 for src


Ignore:
Timestamp:
May 23, 2018, 12:02:26 PM (7 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, with_gc
Children:
03bd407, dd226e3
Parents:
59c034c6
Message:

Fixed long run tests

Location:
src/tests
Files:
12 edited

Legend:

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

    r59c034c6 rb9da9585  
    33#include <stdlib>
    44#include <thread>
     5#include <time>
     6
     7#ifndef PREEMPTION_RATE
     8#define PREEMPTION_RATE 10`ms
     9#endif
     10
     11Duration default_preemption() {
     12        return PREEMPTION_RATE;
     13}
    514
    615#ifdef LONG_TEST
  • src/tests/concurrent/signal/block.c

    r59c034c6 rb9da9585  
    1414#include <time>
    1515
    16 #ifdef LONG_TEST
    17 static const unsigned long N = 150_000ul;
    18 #else
    19 static const unsigned long N = 5_000ul;
    20 #endif
    21 
    2216#ifndef PREEMPTION_RATE
    2317#define PREEMPTION_RATE 10`ms
     
    2721        return PREEMPTION_RATE;
    2822}
     23
     24#ifdef LONG_TEST
     25static const unsigned long N = 150_000ul;
     26#else
     27static const unsigned long N = 5_000ul;
     28#endif
    2929
    3030enum state_t { WAITED, SIGNAL, BARGE };
  • src/tests/concurrent/signal/disjoint.c

    r59c034c6 rb9da9585  
    44#include <thread>
    55#include <time>
    6 
    7 #ifdef LONG_TEST
    8 static const unsigned long N = 300_000ul;
    9 #else
    10 static const unsigned long N = 10_000ul;
    11 #endif
    126
    137#ifndef PREEMPTION_RATE
     
    1812        return PREEMPTION_RATE;
    1913}
     14
     15#ifdef LONG_TEST
     16static const unsigned long N = 300_000ul;
     17#else
     18static const unsigned long N = 10_000ul;
     19#endif
    2020
    2121enum state_t { WAIT, SIGNAL, BARGE };
  • src/tests/concurrent/signal/wait.c

    r59c034c6 rb9da9585  
    1212#include <time>
    1313
    14 #ifdef LONG_TEST
    15 static const unsigned long N = 375_000ul;
    16 #else
    17 static const unsigned long N = 2_500ul;
    18 #endif
    19 
    2014#ifndef PREEMPTION_RATE
    2115#define PREEMPTION_RATE 10`ms
     
    2519        return PREEMPTION_RATE;
    2620}
     21
     22#ifdef LONG_TEST
     23static const unsigned long N = 375_000ul;
     24#else
     25static const unsigned long N = 2_500ul;
     26#endif
    2727
    2828monitor global_t {};
  • src/tests/preempt_longrun/Makefile.am

    r59c034c6 rb9da9585  
    1717repeats=10
    1818max_time=600
    19 preempt=1_000ul
     19preempt=10ul\`ms
    2020debug=-debug
    2121
  • src/tests/preempt_longrun/Makefile.in

    r59c034c6 rb9da9585  
    450450repeats = 10
    451451max_time = 600
    452 preempt = 1_000ul
     452preempt = 10ul\`ms
    453453debug = -debug
    454454REPEAT = ${abs_top_srcdir}/tools/repeat
  • src/tests/preempt_longrun/create.c

    r59c034c6 rb9da9585  
    11#include <kernel>
    22#include <thread>
    3 
    4 static const unsigned long N = 60_000ul;
     3#include <time>
    54
    65#ifndef PREEMPTION_RATE
    7 #define PREEMPTION_RATE 10`ms
     6#error PREEMPTION_RATE not defined in makefile
    87#endif
    98
     
    1110        return PREEMPTION_RATE;
    1211}
     12
     13static const unsigned long N = 60_000ul;
    1314
    1415thread worker_t {};
  • src/tests/preempt_longrun/enter.c

    r59c034c6 rb9da9585  
    22#include <monitor>
    33#include <thread>
    4 
    5 static const unsigned long N  = 2_100_000ul;
     4#include <time>
    65
    76#ifndef PREEMPTION_RATE
    8 #define PREEMPTION_RATE 10`ms
     7#error PREEMPTION_RATE not defined in makefile
    98#endif
    109
     
    1211        return PREEMPTION_RATE;
    1312}
     13
     14static const unsigned long N  = 2_100_000ul;
    1415
    1516monitor mon_t {};
  • src/tests/preempt_longrun/enter3.c

    r59c034c6 rb9da9585  
    22#include <monitor>
    33#include <thread>
    4 
    5 static const unsigned long N  = 500_000ul;
     4#include <time>
    65
    76#ifndef PREEMPTION_RATE
    8 #define PREEMPTION_RATE 10`ms
     7#error PREEMPTION_RATE not defined in makefile
    98#endif
    109
     
    1211        return PREEMPTION_RATE;
    1312}
     13
     14static const unsigned long N  = 500_000ul;
    1415
    1516monitor mon_t {};
  • src/tests/preempt_longrun/processor.c

    r59c034c6 rb9da9585  
    11#include <kernel>
    22#include <thread>
    3 
    4 static const unsigned long N = 5_000ul;
     3#include <time>
    54
    65#ifndef PREEMPTION_RATE
    7 #define PREEMPTION_RATE 10`ms
     6#error PREEMPTION_RATE not defined in makefile
    87#endif
    98
     
    1110        return PREEMPTION_RATE;
    1211}
     12
     13static const unsigned long N = 5_000ul;
    1314
    1415int main(int argc, char* argv[]) {
  • src/tests/preempt_longrun/stack.c

    r59c034c6 rb9da9585  
    11#include <kernel>
     2#include <math>
    23#include <thread>
    3 
    4 #include <math>
     4#include <time>
    55
    66#ifndef PREEMPTION_RATE
    7 #define PREEMPTION_RATE 10`ms
     7#error PREEMPTION_RATE not defined in makefile
    88#endif
    99
  • src/tests/preempt_longrun/yield.c

    r59c034c6 rb9da9585  
    11#include <kernel>
    22#include <thread>
     3#include <time>
     4
     5#ifndef PREEMPTION_RATE
     6#error PREEMPTION_RATE not defined in makefile
     7#endif
     8
     9Duration default_preemption() {
     10        return PREEMPTION_RATE;
     11}
    312
    413#ifdef LONG_TEST
     
    716static const unsigned long N = 325_000ul;
    817#endif
    9 
    10 #ifndef PREEMPTION_RATE
    11 #define PREEMPTION_RATE 10`ms
    12 #endif
    13 
    14 Duration default_preemption() {
    15         return PREEMPTION_RATE;
    16 }
    1718
    1819thread worker_t {};
Note: See TracChangeset for help on using the changeset viewer.