Changeset 303406a


Ignore:
Timestamp:
Aug 15, 2017, 10:11:04 AM (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, resolv-new, with_gc
Children:
f710aca
Parents:
6a36975
Message:

Fixed randomness in internal scheduling tests

Location:
src/tests
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/tests/preempt_longrun/stack.c

    r6a36975 r303406a  
    1515
    1616void main(worker_t * this) {
    17         volatile long p = 5_021_609ul;
    18         volatile long a = 326_417ul;
    19         volatile long n = 1l;
    20         for (volatile long i = 0; i < p; i++) {
     17        volatile long long p = 5_021_609ul;
     18        volatile long long a = 326_417ul;
     19        volatile long long n = 1l;
     20        for (volatile long long i = 0; i < p; i++) {
    2121                n *= a;
    2222                n %= p;
  • src/tests/sched-int-disjoint.c

    r6a36975 r303406a  
    33#include <monitor>
    44#include <thread>
     5
     6#include <time.h>
    57
    68static const unsigned long N = 10_000ul;
     
    107109// Main loop
    108110int main(int argc, char* argv[]) {
     111        rand48seed( time( NULL ) );
    109112        all_done = false;
    110113        processor p;
  • src/tests/sched-int-wait.c

    r6a36975 r303406a  
    55#include <thread>
    66
    7 static const unsigned long N = 10_000ul;
     7#include <time.h>
     8
     9static const unsigned long N = 2_500ul;
    810
    911#ifndef PREEMPTION_RATE
     
    119121// Main
    120122int main(int argc, char* argv[]) {
     123        rand48seed( time( NULL ) );
    121124        waiter_left = 4;
    122125        processor p[2];
Note: See TracChangeset for help on using the changeset viewer.