- Timestamp:
- 2006-04-16T13:16:44Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 50de918
- Parents:
- c624b96
- Location:
- test
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
test/fpu/fpu1/test.c
rc624b96 r280a27e 94 94 95 95 if((int)(100000000*e)!=E_10e8) 96 panic("tid%d: e*10e8=% d should be %d\n", THREAD->tid, (__native) (100000000*e),(__native) E_10e8);96 panic("tid%d: e*10e8=%zd should be %zd\n", THREAD->tid, (__native) (100000000*e),(__native) E_10e8); 97 97 } 98 98 99 printf("tid%d: e*10e8=% d should be %d\n", THREAD->tid, (__native) (100000000*e),(__native) E_10e8);99 printf("tid%d: e*10e8=%zd should be %zd\n", THREAD->tid, (__native) (100000000*e),(__native) E_10e8); 100 100 atomic_inc(&threads_ok); 101 101 } … … 132 132 #ifdef __ia64_ARCH_H__ 133 133 if((int)(1000000*pi)!=PI_10e8) 134 panic("tid%d: pi*10e8=% d should be %d\n", THREAD->tid, (__native) (1000000*pi),(__native) (PI_10e8/100));134 panic("tid%d: pi*10e8=%zd should be %zd\n", THREAD->tid, (__native) (1000000*pi),(__native) (PI_10e8/100)); 135 135 #else 136 136 if((int)(100000000*pi)!=PI_10e8) 137 panic("tid%d: pi*10e8=% d should be %d\n", THREAD->tid, (__native) (100000000*pi),(__native) PI_10e8);137 panic("tid%d: pi*10e8=%zd should be %zd\n", THREAD->tid, (__native) (100000000*pi),(__native) PI_10e8); 138 138 #endif 139 139 140 140 } 141 141 142 printf("tid%d: pi*10e8=% d should be %d\n", THREAD->tid, (__native) (100000000*pi),(__native) PI_10e8);142 printf("tid%d: pi*10e8=%zd should be %zd\n", THREAD->tid, (__native) (100000000*pi),(__native) PI_10e8); 143 143 atomic_inc(&threads_ok); 144 144 } -
test/mm/falloc1/test.c
rc624b96 r280a27e 60 60 61 61 if (ALIGN_UP(frames[allocated], FRAME_SIZE << order) != frames[allocated]) { 62 panic("Test failed. Block at address % X(size %dK) is not aligned\n", frames[allocated], (FRAME_SIZE << order) >> 10);62 panic("Test failed. Block at address %P (size %dK) is not aligned\n", frames[allocated], (FRAME_SIZE << order) >> 10); 63 63 } 64 64 -
test/mm/falloc2/test.c
rc624b96 r280a27e 78 78 for (k = 0; k <= ((FRAME_SIZE << order) - 1); k++) { 79 79 if (((__u8 *) frames[i])[k] != val) { 80 printf("Thread #%d (cpu%d): Unexpected data (%d) in block %P offset % X\n", THREAD->tid, CPU->id, ((char *) frames[i])[k], frames[i], k);80 printf("Thread #%d (cpu%d): Unexpected data (%d) in block %P offset %#zX\n", THREAD->tid, CPU->id, ((char *) frames[i])[k], frames[i], k); 81 81 failed(); 82 82 } -
test/mm/mapping1/test.c
rc624b96 r280a27e 51 51 frame1 = PA2KA(PFN2ADDR(frame_alloc(ONE_FRAME, FRAME_KA))); 52 52 53 printf("Writing % Lto physical address %P.\n", VALUE0, KA2PA(frame0));53 printf("Writing %#X to physical address %P.\n", VALUE0, KA2PA(frame0)); 54 54 *((__u32 *) frame0) = VALUE0; 55 printf("Writing % Lto physical address %P.\n", VALUE1, KA2PA(frame1));55 printf("Writing %#X to physical address %P.\n", VALUE1, KA2PA(frame1)); 56 56 *((__u32 *) frame1) = VALUE1; 57 57 … … 61 61 page_mapping_insert(AS_KERNEL, PAGE1, KA2PA(frame1), PAGE_PRESENT | PAGE_WRITE); 62 62 63 printf("Value at virtual address %P is % L.\n", PAGE0, v0 = *((__u32 *) PAGE0));64 printf("Value at virtual address %P is % L.\n", PAGE1, v1 = *((__u32 *) PAGE1));63 printf("Value at virtual address %P is %#X.\n", PAGE0, v0 = *((__u32 *) PAGE0)); 64 printf("Value at virtual address %P is %#X.\n", PAGE1, v1 = *((__u32 *) PAGE1)); 65 65 66 66 ASSERT(v0 == VALUE0); 67 67 ASSERT(v1 == VALUE1); 68 68 69 printf("Writing % X to virtual address %P.\n", 0, PAGE0);69 printf("Writing %#X to virtual address %P.\n", 0, PAGE0); 70 70 *((__u32 *) PAGE0) = 0; 71 printf("Writing % X to virtual address %P.\n", 0, PAGE1);71 printf("Writing %#X to virtual address %P.\n", 0, PAGE1); 72 72 *((__u32 *) PAGE1) = 0; 73 73 … … 75 75 v1 = *((__u32 *) PAGE1); 76 76 77 printf("Value at virtual address %P is % X.\n", PAGE0, *((__u32 *) PAGE0));78 printf("Value at virtual address %P is % X.\n", PAGE1, *((__u32 *) PAGE1));77 printf("Value at virtual address %P is %#X.\n", PAGE0, *((__u32 *) PAGE0)); 78 printf("Value at virtual address %P is %#X.\n", PAGE1, *((__u32 *) PAGE1)); 79 79 80 80 ASSERT(v0 == 0); -
test/print/print1/test.c
rc624b96 r280a27e 31 31 void test(void) 32 32 { 33 __native nat = 0x12345678u; 33 34 printf(" Printf test \n"); 34 printf(" Q %Q %q \n",0x1111111111111111ull, 0x2222222222222222ull); 35 printf(" Q,l %Q %l \n", 0x3333333333333333ull, 0x01234567); 36 printf(" l,Q %l %Q \n", 0x01234567, 0x4444444444444444ull); 37 printf(" L %L %l \n",0x01234567 ,0x01234567); 38 printf(" W %W %w \n",0x0123 ,0x0123); 39 printf(" B %B %b \n",0x01 ,0x01); 35 36 printf(" text 10.8s %*.*s \n", 5, 3, "text"); 37 printf(" very long text 10.8s %10.8s \n", "very long text"); 38 printf(" text 8.10s %8.10s \n", "text"); 39 printf(" very long text 8.10s %8.10s \n", "very long text"); 40 41 printf(" char: c '%c', 3.2c '%3.2c', -3.2c '%-3.2c', 2.3c '%2.3c', -2.3c '%-2.3c' \n",'a', 'b', 'c', 'd', 'e' ); 42 printf(" int: d '%d', 3.2d '%3.2d', -3.2d '%-3.2d', 2.3d '%2.3d', -2.3d '%-2.3d' \n",1, 1, 1, 1, 1 ); 43 printf(" -int: d '%d', 3.2d '%3.2d', -3.2d '%-3.2d', 2.3d '%2.3d', -2.3d '%-2.3d' \n",-1, -1, -1, -1, -1 ); 44 printf(" 0xint: x '%#x', 5.3x '%#5.3x', -5.3x '%#-5.3x', 3.5x '%#3.5x', -3.5x '%#-3.5x' \n",17, 17, 17, 17, 17 ); 45 46 printf("'%#llx' 64bit, '%#x' 32bit, '%#hhx' 8bit, '%#hx' 16bit, __native '%#zX'. '%#llX' 64bit and '%s' string.\n", 0x1234567887654321ll, 0x12345678, 0x12, 0x1234, nat, 0x1234567887654321ull, "Lovely string" ); 47 40 48 printf(" Print to NULL '%s'\n",NULL); 41 49 return; -
test/synch/rwlock4/test.c
rc624b96 r280a27e 133 133 134 134 context_save(&ctx); 135 printf("sp=% X, readers_in=%d\n", ctx.sp, rwlock.readers_in);135 printf("sp=%#X, readers_in=%d\n", ctx.sp, rwlock.readers_in); 136 136 137 137 k = random(7) + 1; -
test/synch/rwlock5/test.c
rc624b96 r280a27e 92 92 writers = (4-i)*WRITERS; 93 93 94 printf("Creating % d readers and %d writers...", readers, writers);94 printf("Creating %ld readers and %ld writers...", readers, writers); 95 95 96 96 for (j=0; j<(READERS+WRITERS)/2; j++) { … … 117 117 118 118 while (items_read.count != readers || items_written.count != writers) { 119 printf("% d readers remaining, %d writers remaining, readers_in=%d\n", readers - items_read.count, writers - items_written.count, rwlock.readers_in);119 printf("%zd readers remaining, %zd writers remaining, readers_in=%zd\n", readers - items_read.count, writers - items_written.count, rwlock.readers_in); 120 120 thread_usleep(100000); 121 121 }
Note:
See TracChangeset
for help on using the changeset viewer.