Changeset c8410ec9 in mainline
- Timestamp:
- 2006-12-19T11:04:39Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6536a4a9
- Parents:
- 95155b0c
- Location:
- kernel
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/console/cmd.c
r95155b0c rc8410ec9 1034 1034 if (strcmp(test->name, argv->buffer) == 0) { 1035 1035 fnd = true; 1036 run_bench(test, cnt); 1036 1037 if (test->safe) 1038 run_bench(test, cnt); 1039 else 1040 printf("Unsafe test\n"); 1041 1037 1042 break; 1038 1043 } -
kernel/test/debug/mips1.c
r95155b0c rc8410ec9 41 41 char * test_mips1(bool quiet) 42 42 { 43 printf("You should enter kconsole debug mode now.\n"); 43 if (!quiet) 44 printf("You should enter kconsole debug mode now.\n"); 44 45 45 46 asm volatile ( -
kernel/test/fpu/fpu1.c
r95155b0c rc8410ec9 104 104 static atomic_t threads_fault; 105 105 static waitq_t can_start; 106 static bool sh_quiet; 106 107 107 108 static void e(void *data) 108 109 { 109 110 int i; 110 double e, d,le,f;111 double e, d, le, f; 111 112 112 113 thread_detach(THREAD); … … 125 126 126 127 if ((int) (100000000 * e) != E_10e8) { 127 printf("tid%d: e*10e8=%zd should be %zd\n", THREAD->tid, (unative_t) (100000000 * e), (unative_t) E_10e8); 128 if (!sh_quiet) 129 printf("tid%d: e*10e8=%zd should be %zd\n", THREAD->tid, (unative_t) (100000000 * e), (unative_t) E_10e8); 128 130 atomic_inc(&threads_fault); 129 131 break; … … 159 161 #ifdef KERN_ia64_ARCH_H_ 160 162 if ((int) (1000000 * pi) != PI_10e8) { 161 printf("tid%d: pi*10e8=%zd should be %zd\n", THREAD->tid, (unative_t) (1000000 * pi), (unative_t) (PI_10e8 / 100)); 163 if (!sh_quiet) 164 printf("tid%d: pi*10e8=%zd should be %zd\n", THREAD->tid, (unative_t) (1000000 * pi), (unative_t) (PI_10e8 / 100)); 162 165 atomic_inc(&threads_fault); 163 166 break; … … 165 168 #else 166 169 if ((int) (100000000 * pi) != PI_10e8) { 167 printf("tid%d: pi*10e8=%zd should be %zd\n", THREAD->tid, (unative_t) (100000000 * pi), (unative_t) PI_10e8); 170 if (!sh_quiet) 171 printf("tid%d: pi*10e8=%zd should be %zd\n", THREAD->tid, (unative_t) (100000000 * pi), (unative_t) PI_10e8); 168 172 atomic_inc(&threads_fault); 169 173 break; … … 177 181 { 178 182 unsigned int i, total = 0; 183 sh_quiet = quiet; 179 184 180 185 waitq_initialize(&can_start); 181 186 atomic_set(&threads_ok, 0); 182 187 atomic_set(&threads_fault, 0); 183 printf("Creating %d threads... ", 2 * THREADS); 188 189 if (!quiet) 190 printf("Creating %d threads... ", 2 * THREADS); 184 191 185 192 for (i = 0; i < THREADS; i++) { … … 187 194 188 195 if (!(t = thread_create(e, NULL, TASK, 0, "e", false))) { 189 printf("could not create thread %d\n", 2 * i); 196 if (!quiet) 197 printf("could not create thread %d\n", 2 * i); 190 198 break; 191 199 } … … 194 202 195 203 if (!(t = thread_create(pi, NULL, TASK, 0, "pi", false))) { 196 printf("could not create thread %d\n", 2 * i + 1); 204 if (!quiet) 205 printf("could not create thread %d\n", 2 * i + 1); 197 206 break; 198 207 } … … 200 209 total++; 201 210 } 202 printf("ok\n"); 211 212 if (!quiet) 213 printf("ok\n"); 203 214 204 215 thread_sleep(1); … … 206 217 207 218 while (atomic_get(&threads_ok) != total) { 208 printf("Threads left: %d\n", total - atomic_get(&threads_ok)); 219 if (!quiet) 220 printf("Threads left: %d\n", total - atomic_get(&threads_ok)); 209 221 thread_sleep(1); 210 222 } -
kernel/test/fpu/sse1.c
r95155b0c rc8410ec9 46 46 static atomic_t threads_fault; 47 47 static waitq_t can_start; 48 static bool sh_quiet; 49 48 50 49 51 static void testit1(void *data) … … 70 72 71 73 if (arg != after_arg) { 72 printf("tid%d: arg(%d) != %d\n", THREAD->tid, arg, after_arg); 74 if (!sh_quiet) 75 printf("tid%d: arg(%d) != %d\n", THREAD->tid, arg, after_arg); 73 76 atomic_inc(&threads_fault); 74 77 break; … … 101 104 102 105 if (arg != after_arg) { 103 printf("tid%d: arg(%d) != %d\n", THREAD->tid, arg, after_arg); 106 if (!sh_quiet) 107 printf("tid%d: arg(%d) != %d\n", THREAD->tid, arg, after_arg); 104 108 atomic_inc(&threads_fault); 105 109 break; … … 113 117 { 114 118 unsigned int i, total = 0; 115 119 sh_quiet = quiet; 120 116 121 waitq_initialize(&can_start); 117 122 atomic_set(&threads_ok, 0); 118 123 atomic_set(&threads_fault, 0); 119 printf("Creating %d threads... ", 2 * THREADS); 124 125 if (!quiet) 126 printf("Creating %d threads... ", 2 * THREADS); 120 127 121 128 for (i = 0; i < THREADS; i++) { … … 123 130 124 131 if (!(t = thread_create(testit1, (void *) ((unative_t) 2 * i), TASK, 0, "testit1", false))) { 125 printf("could not create thread %d\n", 2 * i); 132 if (!quiet) 133 printf("could not create thread %d\n", 2 * i); 126 134 break; 127 135 } … … 130 138 131 139 if (!(t = thread_create(testit2, (void *) ((unative_t) 2 * i + 1), TASK, 0, "testit2", false))) { 132 printf("could not create thread %d\n", 2 * i + 1); 140 if (!quiet) 141 printf("could not create thread %d\n", 2 * i + 1); 133 142 break; 134 143 } … … 136 145 total++; 137 146 } 138 printf("ok\n"); 147 148 if (!quiet) 149 printf("ok\n"); 139 150 140 151 thread_sleep(1); … … 142 153 143 154 while (atomic_get(&threads_ok) != total) { 144 printf("Threads left: %d\n", total - atomic_get(&threads_ok)); 155 if (!quiet) 156 printf("Threads left: %d\n", total - atomic_get(&threads_ok)); 145 157 thread_sleep(1); 146 158 }
Note:
See TracChangeset
for help on using the changeset viewer.