- Timestamp:
- Jul 20, 2017, 2:05:44 PM (7 years ago)
- 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:
- c72f9fd
- Parents:
- d49bfa8 (diff), 8b28a52 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- src/tests
- Files:
-
- 2 deleted
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tests/preempt_longrun/Makefile.am
rd49bfa8 r957453d 25 25 CC = @CFA_BINDIR@/@CFA_NAME@ 26 26 27 TESTS = b arge block create disjoint enter enter3 processor stack wait yield27 TESTS = block create disjoint enter enter3 processor stack wait yield 28 28 29 29 .INTERMEDIATE: ${TESTS} -
src/tests/preempt_longrun/Makefile.in
rd49bfa8 r957453d 453 453 REPEAT = ${abs_top_srcdir}/tools/repeat -s 454 454 BUILD_FLAGS = -g -Wall -Wno-unused-function -quiet @CFA_FLAGS@ -debug -O2 -DPREEMPTION_RATE=${preempt} 455 TESTS = b arge block create disjoint enter enter3 processor stack wait yield455 TESTS = block create disjoint enter enter3 processor stack wait yield 456 456 all: all-am 457 457 … … 635 635 TEST_LOGS="$$log_list"; \ 636 636 exit $$? 637 barge.log: barge638 @p='barge'; \639 b='barge'; \640 $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \641 --log-file $$b.log --trs-file $$b.trs \642 $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \643 "$$tst" $(AM_TESTS_FD_REDIRECT)644 637 block.log: block 645 638 @p='block'; \ -
src/tests/preempt_longrun/create.c
rd49bfa8 r957453d 1 1 #include <kernel> 2 2 #include <thread> 3 4 static const unsigned long N = 2_000ul; 3 5 4 6 #ifndef PREEMPTION_RATE … … 16 18 int main(int argc, char* argv[]) { 17 19 processor p; 18 for(int i = 0; i < 10_000ul; i++) {20 for(int i = 0; i < N; i++) { 19 21 worker_t w[7]; 20 22 } -
src/tests/preempt_longrun/enter.c
rd49bfa8 r957453d 3 3 #include <thread> 4 4 5 #undef N6 5 static const unsigned long N = 70_000ul; 7 6 -
src/tests/preempt_longrun/enter3.c
rd49bfa8 r957453d 3 3 #include <thread> 4 4 5 #undef N6 5 static const unsigned long N = 50_000ul; 7 6 -
src/tests/preempt_longrun/processor.c
rd49bfa8 r957453d 1 1 #include <kernel> 2 2 #include <thread> 3 4 static const unsigned long N = 5_000ul; 3 5 4 6 #ifndef PREEMPTION_RATE … … 15 17 16 18 int main(int argc, char* argv[]) { 17 for(int i = 0; i < 10_000ul; i++) {19 for(int i = 0; i < N; i++) { 18 20 processor p; 19 21 } -
src/tests/preempt_longrun/yield.c
rd49bfa8 r957453d 1 1 #include <kernel> 2 2 #include <thread> 3 4 static const unsigned long N = 325_000ul; 3 5 4 6 #ifndef PREEMPTION_RATE … … 13 15 14 16 void main(worker_t * this) { 15 for(int i = 0; i < 325_000ul; i++) {17 for(int i = 0; i < N; i++) { 16 18 yield(); 17 19 } -
src/tests/sched-int-barge.c
rd49bfa8 r957453d 5 5 #include <thread> 6 6 7 #ifndef N 8 #define N 100_000 7 static const unsigned long N = 50_000ul; 8 9 #ifndef PREEMPTION_RATE 10 #define PREEMPTION_RATE 10_000ul 9 11 #endif 10 12 13 unsigned int default_preemption() { 14 return 0; 15 } 11 16 enum state_t { WAIT, SIGNAL, BARGE }; 12 17 … … 14 19 15 20 monitor global_data_t { 16 bool done;21 volatile bool done; 17 22 int counter; 18 23 state_t state; … … 55 60 c->do_wait2 = ((unsigned)rand48()) % (c->do_signal); 56 61 57 //if(c->do_wait1 == c->do_wait2) sout | "Same" | endl;62 if(c->do_wait1 == c->do_wait2) sout | "Same" | endl; 58 63 } 59 64 … … 93 98 } 94 99 100 static thread_desc * volatile the_threads; 101 95 102 int main(int argc, char* argv[]) { 96 rand48seed(0); 97 processor p; 98 { 99 Threads t[17]; 100 } 103 rand48seed(0); 104 processor p; 105 { 106 Threads t[17]; 107 the_threads = (thread_desc*)t; 108 } 101 109 } -
src/tests/sched-int-block.c
rd49bfa8 r957453d 5 5 #include <thread> 6 6 7 #ifndef N 8 #define N 10_000 7 #include <time.h> 8 9 static const unsigned long N = 5_000ul; 10 11 #ifndef PREEMPTION_RATE 12 #define PREEMPTION_RATE 10_000ul 9 13 #endif 14 15 unsigned int default_preemption() { 16 return PREEMPTION_RATE; 17 } 10 18 11 19 enum state_t { WAITED, SIGNAL, BARGE }; … … 101 109 102 110 int main(int argc, char* argv[]) { 103 rand48seed( 0);111 rand48seed( time( NULL ) ); 104 112 done = false; 105 113 processor p; -
src/tests/sched-int-disjoint.c
rd49bfa8 r957453d 4 4 #include <thread> 5 5 6 #ifndef N 7 #define N 10_000 6 static const unsigned long N = 10_000ul; 7 8 #ifndef PREEMPTION_RATE 9 #define PREEMPTION_RATE 10_000ul 8 10 #endif 11 12 unsigned int default_preemption() { 13 return PREEMPTION_RATE; 14 } 9 15 10 16 enum state_t { WAIT, SIGNAL, BARGE }; -
src/tests/sched-int-wait.c
rd49bfa8 r957453d 5 5 #include <thread> 6 6 7 #ifndef N 8 #define N 10_000 7 static const unsigned long N = 10_000ul; 8 9 #ifndef PREEMPTION_RATE 10 #define PREEMPTION_RATE 10_000ul 9 11 #endif 12 13 unsigned int default_preemption() { 14 return PREEMPTION_RATE; 15 } 10 16 11 17 monitor global_t {}; … … 114 120 int main(int argc, char* argv[]) { 115 121 waiter_left = 4; 116 processor p ;122 processor p[2]; 117 123 sout | "Starting" | endl; 118 124 { -
src/tests/test.py
rd49bfa8 r957453d 221 221 if retcode == TestResult.SUCCESS: result_txt = "Done" 222 222 elif retcode == TestResult.TIMEOUT: result_txt = "TIMEOUT" 223 else : result_txt = "ERROR "223 else : result_txt = "ERROR code %d" % retcode 224 224 else : 225 225 if retcode == TestResult.SUCCESS: result_txt = "PASSED" 226 226 elif retcode == TestResult.TIMEOUT: result_txt = "TIMEOUT" 227 else : result_txt = "FAILED "227 else : result_txt = "FAILED with code %d" % retcode 228 228 229 229 #print result with error if needed
Note: See TracChangeset
for help on using the changeset viewer.