- Timestamp:
- Jan 31, 2018, 5:50:34 PM (8 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:
- 295e5071
- Parents:
- bc6f918 (diff), 281806b6 (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:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tests/Makefile.am
rbc6f918 re2e7330 65 65 66 66 concurrency : 67 @+python test.py --debug=${debug} ${concurrent} ${concurrent_test}67 @+python test.py --debug=${debug} -Iconcurrent 68 68 69 69 .dummy : .dummy.c @CFA_BINDIR@/@CFA_NAME@ -
src/tests/Makefile.in
rbc6f918 re2e7330 743 743 744 744 concurrency : 745 @+python test.py --debug=${debug} ${concurrent} ${concurrent_test}745 @+python test.py --debug=${debug} -Iconcurrent 746 746 747 747 .dummy : .dummy.c @CFA_BINDIR@/@CFA_NAME@ -
src/tests/concurrent/examples/quickSort.c
rbc6f918 re2e7330 9 9 // Created On : Wed Dec 6 12:15:52 2017 10 10 // Last Modified By : Peter A. Buhr 11 // Last Modified On : Mon Jan 29 08:41:37201812 // Update Count : 1 5511 // Last Modified On : Tue Jan 30 15:58:58 2018 12 // Update Count : 162 13 13 // 14 14 … … 100 100 if ( argc != 1 ) { // do not use defaults 101 101 if ( argc < 2 || argc > 4 ) usage( argv ); // wrong number of options 102 // if ( strcmp( argv[1], "-t" ) == 0 ) { // timing ? 103 if ( argv[1][0] == '-' && argv[1][1] == 't' ) { // timing ? 102 if ( strcmp( argv[1], "-t" ) == 0 ) { // timing ? 104 103 &unsortedfile = (ifstream *)0; // no input 105 104 choose ( argc ) { -
src/tests/functions.c
rbc6f918 re2e7330 10 10 // Created On : Wed Aug 17 08:39:58 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Nov 27 18:08:54 201713 // Update Count : 1 112 // Last Modified On : Wed Jan 17 22:44:12 2018 13 // Update Count : 12 14 14 // 15 15 … … 25 25 void g(void) 26 26 ) { 27 (* g)();27 (* g)(); 28 28 g(); 29 29 g = h; … … 32 32 int f1() {} 33 33 int (f2()) {} 34 int (* f3())() {}35 int * ((f4())) {}36 int ((* f5()))() {}37 int * f6() {}38 int * (f7)() {}39 int ** f8() {}40 int * const * (f9)() {}41 int (* f10())[] {}42 int (* f11())[][3] {}43 int ((* f12())[])[3] {}34 int (* f3())() {} 35 int * ((f4())) {} 36 int ((* f5()))() {} 37 int * f6() {} 38 int * (f7)() {} 39 int ** f8() {} 40 int * const * (f9)() {} 41 int (* f10())[] {} 42 int (* f11())[][3] {} 43 int ((* f12())[])[3] {} 44 44 45 45 // "implicit int" otype specifier (not ANSI) … … 50 50 extern const fII4( int i ) {} 51 51 52 * fII5() {}53 const * fII6() {}54 const long * fII7() {}55 static const long * fII8() {}56 const static long * fII9() {}52 * fII5() {} 53 const * fII6() {} 54 const long * fII7() {} 55 static const long * fII8() {} 56 const static long * fII9() {} 57 57 58 58 // K&R function definitions … … 117 117 [int](int) 118 118 ) { 119 int (* (*pc)[][10])[][3];119 int (* (* pc)[][10])[][3]; 120 120 * [][10] * [][3] int p; 121 121 * [] * [int](int) p; 122 122 } 123 123 124 static const int * f1() {}124 static const int * f1() {} 125 125 static [ const int ] f2() {} 126 126 static inline [ const * int ] f3() {} … … 133 133 int (), 134 134 135 int * (),136 int ** (),137 int * const * (),135 int * (), 136 int ** (), 137 int * const * (), 138 138 int * const * const (), 139 139 … … 141 141 int ([10]), 142 142 143 int * ([]),144 int * ([10]),145 int ** ([]),146 int ** ([10]),147 int * const * ([]),148 int * const * ([10]),143 int * ([]), 144 int * ([10]), 145 int ** ([]), 146 int ** ([10]), 147 int * const * ([]), 148 int * const * ([10]), 149 149 int * const * const ([]), 150 150 int * const * const ([10]) … … 154 154 int (), 155 155 156 int * (),157 int ** (),158 int * const * (),156 int * (), 157 int ** (), 158 int * const * (), 159 159 int * const * const (), 160 160 … … 162 162 int ([10]), 163 163 164 int * ([]),165 int * ([10]),166 int ** ([]),167 int ** ([10]),168 int * const * ([]),169 int * const * ([10]),164 int * ([]), 165 int * ([10]), 166 int ** ([]), 167 int ** ([10]), 168 int * const * ([]), 169 int * const * ([10]), 170 170 int * const * const ([]), 171 171 int * const * const ([10]) … … 175 175 typedef int T; 176 176 177 int f( T (* f), T t ) {177 int f( T (* f), T t ) { 178 178 T (T); 179 179 } … … 184 184 //int (f[])() {} 185 185 //int f[]() {} 186 //int ((* f15())())[] {}186 //int ((* f15())())[] {} 187 187 188 188 // Local Variables: // -
src/tests/identFuncDeclarator.c
rbc6f918 re2e7330 10 10 // Created On : Wed Aug 17 08:36:34 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Aug 17 08:37:06 201613 // Update Count : 112 // Last Modified On : Wed Jan 17 22:39:13 2018 13 // Update Count : 2 14 14 // 15 15 … … 18 18 int (f2); 19 19 20 int * f3;21 int ** f4;22 int * const * f5;20 int * f3; 21 int ** f4; 22 int * const * f5; 23 23 int * const * const f6; 24 24 25 int * (f7);26 int ** (f8);27 int * const * (f9);25 int * (f7); 26 int ** (f8); 27 int * const * (f9); 28 28 int * const * const (f10); 29 29 30 int (* f11);31 int (** f12);32 int (* const * f13);30 int (* f11); 31 int (** f12); 32 int (* const * f13); 33 33 int (* const * const f14); 34 34 … … 38 38 int (f18[10]); 39 39 40 int * f19[2];41 int * f20[10];42 int ** f21[2];43 int ** f22[10];44 int * const * f23[2];45 int * const * f24[10];40 int * f19[2]; 41 int * f20[10]; 42 int ** f21[2]; 43 int ** f22[10]; 44 int * const * f23[2]; 45 int * const * f24[10]; 46 46 int * const * const f25[2]; 47 47 int * const * const f26[10]; 48 48 49 int * (f27[2]);50 int * (f28[10]);51 int ** (f29[2]);52 int ** (f30[10]);53 int * const * (f31[2]);54 int * const * (f32[10]);49 int * (f27[2]); 50 int * (f28[10]); 51 int ** (f29[2]); 52 int ** (f30[10]); 53 int * const * (f31[2]); 54 int * const * (f32[10]); 55 55 int * const * const (f33[2]); 56 56 int * const * const (f34[10]); 57 57 58 int (* f35[2]);59 int (* f36[10]);60 int (** f37[2]);61 int (** f38[10]);62 int (* const * f39[2]);63 int (* const * f40[10]);58 int (* f35[2]); 59 int (* f36[10]); 60 int (** f37[2]); 61 int (** f38[10]); 62 int (* const * f39[2]); 63 int (* const * f40[10]); 64 64 int (* const * const f41[2]); 65 65 int (* const * const f42[10]); … … 72 72 int ((f48[3]))[3]; 73 73 74 int * f49[2][3];75 int * f50[3][3];76 int ** f51[2][3];77 int ** f52[3][3];78 int * const * f53[2][3];79 int * const * f54[3][3];74 int * f49[2][3]; 75 int * f50[3][3]; 76 int ** f51[2][3]; 77 int ** f52[3][3]; 78 int * const * f53[2][3]; 79 int * const * f54[3][3]; 80 80 int * const * const f55[2][3]; 81 81 int * const * const f56[3][3]; 82 82 83 int (* f57[2][3]);84 int (* f58[3][3]);85 int (** f59[2][3]);86 int (** f60[3][3]);87 int (* const * f61[2][3]);88 int (* const * f62[3][3]);83 int (* f57[2][3]); 84 int (* f58[3][3]); 85 int (** f59[2][3]); 86 int (** f60[3][3]); 87 int (* const * f61[2][3]); 88 int (* const * f62[3][3]); 89 89 int (* const * const f63[2][3]); 90 90 int (* const * const f64[3][3]); … … 93 93 int (f66)(int); 94 94 95 int * f67(int);96 int ** f68(int);97 int * const * f69(int);95 int * f67(int); 96 int ** f68(int); 97 int * const * f69(int); 98 98 int * const * const f70(int); 99 99 100 int * (f71)(int);101 int ** (f72)(int);102 int * const * (f73)(int);100 int * (f71)(int); 101 int ** (f72)(int); 102 int * const * (f73)(int); 103 103 int * const * const (f74)(int); 104 104 105 int (* f75)(int);106 int (** f76)(int);107 int (* const * f77)(int);105 int (* f75)(int); 106 int (** f76)(int); 107 int (* const * f77)(int); 108 108 int (* const * const f78)(int); 109 109 110 int (* (*f79)(int))();111 int (* (* const f80)(int))();110 int (* (* f79)(int))(); 111 int (* (* const f80)(int))(); 112 112 int (* const(* const f81)(int))(); 113 113 } -
src/tests/identParamDeclarator.c
rbc6f918 re2e7330 10 10 // Created On : Wed Aug 17 08:37:56 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Aug 17 08:38:42 201613 // Update Count : 112 // Last Modified On : Wed Jan 17 22:36:11 2018 13 // Update Count : 2 14 14 // 15 15 16 int fred (16 int fred ( 17 17 int f1, 18 18 int (f2), … … 157 157 ); 158 158 159 //Dummy main 160 int main(int argc, char const *argv[]) 161 { 159 int main( int argc, char const *argv[] ) { // dummy main 162 160 return 0; 163 161 } -
src/tests/preempt_longrun/Makefile.am
rbc6f918 re2e7330 19 19 preempt=1_000ul 20 20 21 REPEAT = ${abs_top_srcdir}/tools/repeat -s 21 REPEAT = ${abs_top_srcdir}/tools/repeat 22 TIME = /usr/bin/time -f "%E" 22 23 23 24 BUILD_FLAGS = -g -Wall -Wno-unused-function -quiet @CFA_FLAGS@ -debug -O2 -DPREEMPTION_RATE=${preempt} … … 37 38 ${AM_V_GEN}${CC} ${CFLAGS} ${<} -o ${@} 38 39 39 %.run : % 40 @ time ${REPEAT} $(repeats) timeout ${max_time} ./${<}40 %.run : % ${REPEAT} 41 @ time ${REPEAT} -r out.log -i -s $(repeats) timeout ${max_time} ./${<} 41 42 @ rm ${<} 42 43 @ echo -e "${<}: SUCCESS\n" 44 45 %.time : % ${REPEAT} 46 @ ${REPEAT} -i -s -- $(repeats) $(TIME) -a -o times.log ./${<} 47 @ rm ${<} 48 @ echo -e "${<}: SUCCESS\n" 49 50 ${REPEAT}: 51 @+make -C ${abs_top_srcdir}/tools/ -
src/tests/preempt_longrun/Makefile.in
rbc6f918 re2e7330 451 451 max_time = 600 452 452 preempt = 1_000ul 453 REPEAT = ${abs_top_srcdir}/tools/repeat -s 453 REPEAT = ${abs_top_srcdir}/tools/repeat 454 TIME = /usr/bin/time -f "%E" 454 455 BUILD_FLAGS = -g -Wall -Wno-unused-function -quiet @CFA_FLAGS@ -debug -O2 -DPREEMPTION_RATE=${preempt} 455 456 TESTS = block create disjoint enter enter3 processor stack wait yield … … 874 875 ${AM_V_GEN}${CC} ${CFLAGS} ${<} -o ${@} 875 876 876 %.run : % 877 @ time ${REPEAT} $(repeats) timeout ${max_time} ./${<}877 %.run : % ${REPEAT} 878 @ time ${REPEAT} -r out.log -i -s $(repeats) timeout ${max_time} ./${<} 878 879 @ rm ${<} 879 880 @ echo -e "${<}: SUCCESS\n" 881 882 %.time : % ${REPEAT} 883 @ ${REPEAT} -i -s -- $(repeats) $(TIME) -a -o times.log ./${<} 884 @ rm ${<} 885 @ echo -e "${<}: SUCCESS\n" 886 887 ${REPEAT}: 888 @+make -C ${abs_top_srcdir}/tools/ 880 889 881 890 # Tell versions [3.59,3.63) of GNU make to not export all variables. -
src/tests/preempt_longrun/block.c
rbc6f918 re2e7330 1 ../ sched-int-block.c1 ../concurrent/signal/block.c -
src/tests/preempt_longrun/create.c
rbc6f918 re2e7330 14 14 thread worker_t {}; 15 15 16 void main(worker_t *this) {}16 void main(worker_t & this) {} 17 17 18 18 int main(int argc, char* argv[]) { -
src/tests/preempt_longrun/disjoint.c
rbc6f918 re2e7330 1 ../ sched-int-disjoint.c1 ../concurrent/signal/disjoint.c -
src/tests/preempt_longrun/enter.c
rbc6f918 re2e7330 17 17 mon_t mon; 18 18 19 void foo( mon_t *mutex this ) {}19 void foo( mon_t & mutex this ) {} 20 20 21 21 thread worker_t {}; 22 22 23 void main( worker_t *this ) {23 void main( worker_t & this ) { 24 24 for( unsigned long i = 0; i < N; i++ ) { 25 foo( &mon );25 foo( mon ); 26 26 } 27 27 } -
src/tests/preempt_longrun/enter3.c
rbc6f918 re2e7330 17 17 mon_t mon1, mon2, mon3; 18 18 19 void foo( mon_t * mutex a, mon_t * mutex b, mon_t *mutex c ) {}19 void foo( mon_t & mutex a, mon_t & mutex b, mon_t & mutex c ) {} 20 20 21 21 thread worker_t {}; 22 22 23 void main( worker_t *this ) {23 void main( worker_t & this ) { 24 24 for( unsigned long i = 0; i < N; i++ ) { 25 foo( &mon1, &mon2, &mon3 );25 foo( mon1, mon2, mon3 ); 26 26 } 27 27 } -
src/tests/preempt_longrun/processor.c
rbc6f918 re2e7330 14 14 thread worker_t {}; 15 15 16 void main(worker_t *this) {}16 void main(worker_t & this) {} 17 17 18 18 int main(int argc, char* argv[]) { -
src/tests/preempt_longrun/stack.c
rbc6f918 re2e7330 14 14 thread worker_t {}; 15 15 16 void main(worker_t *this) {16 void main(worker_t & this) { 17 17 volatile long long p = 5_021_609ul; 18 18 volatile long long a = 326_417ul; -
src/tests/preempt_longrun/wait.c
rbc6f918 re2e7330 1 ../ sched-int-wait.c1 ../concurrent/signal/wait.c -
src/tests/preempt_longrun/yield.c
rbc6f918 re2e7330 14 14 thread worker_t {}; 15 15 16 void main(worker_t *this) {16 void main(worker_t & this) { 17 17 for(int i = 0; i < N; i++) { 18 18 yield();
Note:
See TracChangeset
for help on using the changeset viewer.