Changeset 7e752b2 in mainline for kernel/test
- Timestamp:
- 2010-11-26T01:33:20Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- bf61d3a
- Parents:
- 202f57b
- Location:
- kernel/test
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/test/avltree/avltree1.c
r202f57b r7e752b2 202 202 avltree_create(tree); 203 203 204 TPRINTF("Inserting % " PRIs "nodes...", node_count);204 TPRINTF("Inserting %zu nodes...", node_count); 205 205 206 206 for (i = 0; i < node_count; i++) { -
kernel/test/fpu/fpu1_ia64.c
r202f57b r7e752b2 161 161 162 162 while (atomic_get(&threads_ok) != total) { 163 TPRINTF("Threads left: %d\n", total - atomic_get(&threads_ok)); 163 TPRINTF("Threads left: %" PRIua "\n", 164 total - atomic_get(&threads_ok)); 164 165 thread_sleep(1); 165 166 } -
kernel/test/fpu/fpu1_x86.c
r202f57b r7e752b2 82 82 83 83 if ((int) (100000000 * e) != E_10e8) { 84 TPRINTF("tid%" PRIu64 ": e*10e8=%zd should be %" PRIun "\n", THREAD->tid, (unative_t) (100000000 * e), (unative_t) E_10e8); 84 TPRINTF("tid%" PRIu64 ": e*10e8=%" PRIun " should be %" PRIun "\n", 85 THREAD->tid, (unative_t) (100000000 * e), (unative_t) E_10e8); 85 86 atomic_inc(&threads_fault); 86 87 break; … … 115 116 116 117 if ((int) (100000000 * pi) != PI_10e8) { 117 TPRINTF("tid%" PRIu64 ": pi*10e8=%zd should be %" PRIun "\n", THREAD->tid, (unative_t) (100000000 * pi), (unative_t) PI_10e8); 118 TPRINTF("tid%" PRIu64 ": pi*10e8=%" PRIun " should be %" PRIun "\n", 119 THREAD->tid, (unative_t) (100000000 * pi), (unative_t) PI_10e8); 118 120 atomic_inc(&threads_fault); 119 121 break; … … 158 160 159 161 while (atomic_get(&threads_ok) != total) { 160 TPRINTF("Threads left: % d\n", total - atomic_get(&threads_ok));162 TPRINTF("Threads left: %" PRIua "\n", total - atomic_get(&threads_ok)); 161 163 thread_sleep(1); 162 164 } -
kernel/test/fpu/sse1.c
r202f57b r7e752b2 142 142 143 143 while (atomic_get(&threads_ok) != total) { 144 TPRINTF("Threads left: % d\n", total - atomic_get(&threads_ok));144 TPRINTF("Threads left: %" PRIua "\n", total - atomic_get(&threads_ok)); 145 145 thread_sleep(1); 146 146 } -
kernel/test/mm/falloc1.c
r202f57b r7e752b2 64 64 65 65 if (ALIGN_UP(frames[allocated], FRAME_SIZE << order) != frames[allocated]) { 66 TPRINTF("Block at address %p (size %dK) is not aligned\n", frames[allocated], (FRAME_SIZE << order) >> 10); 66 TPRINTF("Block at address %p (size %dK) is not aligned\n", 67 (void *) frames[allocated], (FRAME_SIZE << order) >> 10); 67 68 return "Test failed"; 68 69 } -
kernel/test/mm/falloc2.c
r202f57b r7e752b2 85 85 for (k = 0; k <= (((size_t) FRAME_SIZE << order) - 1); k++) { 86 86 if (((uint8_t *) frames[i])[k] != val) { 87 TPRINTF("Thread #%" PRIu64 " (cpu%u): Unexpected data (%c) in block %p offset %#" PRIs "\n", THREAD->tid, CPU->id, ((char *) frames[i])[k], frames[i], k); 87 TPRINTF("Thread #%" PRIu64 " (cpu%u): Unexpected data (%c) in block %p offset %zu\n", 88 THREAD->tid, CPU->id, ((char *) frames[i])[k], frames[i], k); 88 89 atomic_inc(&thread_fail); 89 90 goto cleanup; … … 121 122 122 123 while (atomic_get(&thread_count) > 0) { 123 TPRINTF("Threads left: % ld\n", atomic_get(&thread_count));124 TPRINTF("Threads left: %" PRIua "\n", atomic_get(&thread_count)); 124 125 thread_sleep(1); 125 126 } -
kernel/test/mm/mapping1.c
r202f57b r7e752b2 39 39 #define PAGE1 (PAGE0 + PAGE_SIZE) 40 40 41 #define VALUE0 0x0123456742 #define VALUE1 0x89abcdef41 #define VALUE0 UINT32_C(0x01234567) 42 #define VALUE1 UINT32_C(0x89abcdef) 43 43 44 44 const char *test_mapping1(void) … … 50 50 frame1 = (uintptr_t) frame_alloc(ONE_FRAME, FRAME_KA); 51 51 52 TPRINTF("Writing %#x to physical address %p.\n", VALUE0, KA2PA(frame0)); 52 TPRINTF("Writing %#" PRIx32 " to physical address %p.\n", 53 (uint32_t) VALUE0, (void *) KA2PA(frame0)); 53 54 *((uint32_t *) frame0) = VALUE0; 54 55 55 TPRINTF("Writing %#x to physical address %p.\n", VALUE1, KA2PA(frame1)); 56 TPRINTF("Writing %#" PRIx32 " to physical address %p.\n", 57 (uint32_t) VALUE1, (void *) KA2PA(frame1)); 56 58 *((uint32_t *) frame1) = VALUE1; 57 59 58 TPRINTF("Mapping virtual address %p to physical address %p.\n", PAGE0, KA2PA(frame0)); 60 TPRINTF("Mapping virtual address %p to physical address %p.\n", 61 (void *) PAGE0, (void *) KA2PA(frame0)); 59 62 page_mapping_insert(AS_KERNEL, PAGE0, KA2PA(frame0), PAGE_PRESENT | PAGE_WRITE); 60 63 61 TPRINTF("Mapping virtual address %p to physical address %p.\n", PAGE1, KA2PA(frame1)); 64 TPRINTF("Mapping virtual address %p to physical address %p.\n", 65 (void *) PAGE1, (void *) KA2PA(frame1)); 62 66 page_mapping_insert(AS_KERNEL, PAGE1, KA2PA(frame1), PAGE_PRESENT | PAGE_WRITE); 63 67 64 68 v0 = *((uint32_t *) PAGE0); 65 69 v1 = *((uint32_t *) PAGE1); 66 TPRINTF("Value at virtual address %p is %#x.\n", PAGE0, v0); 67 TPRINTF("Value at virtual address %p is %#x.\n", PAGE1, v1); 70 TPRINTF("Value at virtual address %p is %#" PRIx32 ".\n", 71 (void *) PAGE0, v0); 72 TPRINTF("Value at virtual address %p is %#" PRIx32 ".\n", 73 (void *) PAGE1, v1); 68 74 69 75 if (v0 != VALUE0) … … 72 78 return "Value at v1 not equal to VALUE1"; 73 79 74 TPRINTF("Writing %#x to virtual address %p.\n", 0, PAGE0); 80 TPRINTF("Writing %#" PRIx32 " to virtual address %p.\n", 81 (uint32_t) 0, (void *) PAGE0); 75 82 *((uint32_t *) PAGE0) = 0; 76 83 77 TPRINTF("Writing %#x to virtual address %p.\n", 0, PAGE1); 84 TPRINTF("Writing %#" PRIx32 " to virtual address %p.\n", 85 (uint32_t) 0, (void *) PAGE1); 78 86 *((uint32_t *) PAGE1) = 0; 79 87 … … 81 89 v1 = *((uint32_t *) PAGE1); 82 90 83 TPRINTF("Value at virtual address %p is %#x.\n", PAGE0, *((uint32_t *) PAGE0)); 84 TPRINTF("Value at virtual address %p is %#x.\n", PAGE1, *((uint32_t *) PAGE1)); 91 TPRINTF("Value at virtual address %p is %#" PRIx32 ".\n", 92 (void *) PAGE0, *((uint32_t *) PAGE0)); 93 TPRINTF("Value at virtual address %p is %#" PRIx32 ".\n", 94 (void *) PAGE1, *((uint32_t *) PAGE1)); 85 95 86 96 if (v0 != 0) -
kernel/test/synch/semaphore1.c
r202f57b r7e752b2 88 88 producers = (4 - i) * PRODUCERS; 89 89 90 TPRINTF("Creating %d consumers and %d producers...", consumers, producers); 90 TPRINTF("Creating %" PRIua " consumers and %" PRIua " producers...", 91 consumers, producers); 91 92 92 93 for (j = 0; j < (CONSUMERS + PRODUCERS) / 2; j++) { … … 113 114 114 115 while ((items_consumed.count != consumers) || (items_produced.count != producers)) { 115 TPRINTF("%d consumers remaining, %d producers remaining\n", consumers - items_consumed.count, producers - items_produced.count); 116 TPRINTF("%" PRIua " consumers remaining, %" PRIua " producers remaining\n", 117 consumers - items_consumed.count, producers - items_produced.count); 116 118 thread_sleep(1); 117 119 } -
kernel/test/thread/thread1.c
r202f57b r7e752b2 76 76 atomic_set(&finish, 0); 77 77 while (atomic_get(&threads_finished) < total) { 78 TPRINTF("Threads left: % d\n", total - atomic_get(&threads_finished));78 TPRINTF("Threads left: %" PRIua "\n", total - atomic_get(&threads_finished)); 79 79 thread_sleep(1); 80 80 }
Note:
See TracChangeset
for help on using the changeset viewer.