Changeset cf85e24c in mainline for test


Ignore:
Timestamp:
2006-04-22T23:00:26Z (19 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
12c7f27
Parents:
e692a27
Message:

printf-related and other code cleanup

Location:
test
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • test/mm/falloc1/test.c

    re692a27 rcf85e24c  
    4141
    4242void test(void) {
    43         __address * frames = (__address *) malloc(MAX_FRAMES*sizeof(__address),
    44                                                   0);
     43        __address * frames = (__address *) malloc(MAX_FRAMES*sizeof(__address), 0);
    4544        int results[MAX_ORDER+1];
    4645       
     
    6059                               
    6160                                if (ALIGN_UP(frames[allocated], FRAME_SIZE << order) != frames[allocated]) {
    62                                         panic("Test failed. Block at address %P (size %dK) is not aligned\n", frames[allocated], (FRAME_SIZE << order) >> 10);
     61                                        panic("Test failed. Block at address %p (size %dK) is not aligned\n", frames[allocated], (FRAME_SIZE << order) >> 10);
    6362                                }
    6463                               
  • test/mm/falloc2/test.c

    re692a27 rcf85e24c  
    7878                                for (k = 0; k <= ((FRAME_SIZE << order) - 1); k++) {
    7979                                        if (((__u8 *) frames[i])[k] != val) {
    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);
     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);
    8181                                                failed();
    8282                                        }
  • test/mm/mapping1/test.c

    re692a27 rcf85e24c  
    5151        frame1 = PA2KA(PFN2ADDR(frame_alloc(ONE_FRAME, FRAME_KA)));
    5252
    53         printf("Writing %#X to physical address %P.\n", VALUE0, KA2PA(frame0));
     53        printf("Writing %#x to physical address %p.\n", VALUE0, KA2PA(frame0));
    5454        *((__u32 *) frame0) = VALUE0;
    55         printf("Writing %#X to physical address %P.\n", VALUE1, KA2PA(frame1));
     55        printf("Writing %#x to physical address %p.\n", VALUE1, KA2PA(frame1));
    5656        *((__u32 *) frame1) = VALUE1;
    5757       
    58         printf("Mapping virtual address %P to physical address %P.\n", PAGE0, KA2PA(frame0));
     58        printf("Mapping virtual address %p to physical address %p.\n", PAGE0, KA2PA(frame0));
    5959        page_mapping_insert(AS_KERNEL, PAGE0, KA2PA(frame0), PAGE_PRESENT | PAGE_WRITE);
    60         printf("Mapping virtual address %P to physical address %P.\n", PAGE1, KA2PA(frame1));   
     60        printf("Mapping virtual address %p to physical address %p.\n", PAGE1, KA2PA(frame1));   
    6161        page_mapping_insert(AS_KERNEL, PAGE1, KA2PA(frame1), PAGE_PRESENT | PAGE_WRITE);
    6262       
    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));
     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));
    6565       
    6666        ASSERT(v0 == VALUE0);
    6767        ASSERT(v1 == VALUE1);
    6868
    69         printf("Writing %#X to virtual address %P.\n", 0, PAGE0);
     69        printf("Writing %#x to virtual address %p.\n", 0, PAGE0);
    7070        *((__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);
    7272        *((__u32 *) PAGE1) = 0;
    7373
     
    7575        v1 = *((__u32 *) PAGE1);
    7676       
    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));
    7979
    8080        ASSERT(v0 == 0);
  • test/synch/rwlock4/test.c

    re692a27 rcf85e24c  
    133133               
    134134                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);
    136136               
    137137                k = random(7) + 1;
Note: See TracChangeset for help on using the changeset viewer.