Changeset deada67 in mainline for kernel/test/mm


Ignore:
Timestamp:
2006-12-19T17:54:50Z (19 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
730376d
Parents:
6536a4a9
Message:

quiet variants of tests

Location:
kernel/test/mm
Files:
5 edited

Legend:

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

    r6536a4a9 rdeada67  
    5656        for (run = 0; run < TEST_RUNS; run++) {
    5757                for (order = 0; order <= MAX_ORDER; order++) {
    58                         printf("Allocating %d frames blocks ... ", 1 << order);
     58                        if (!quiet)
     59                                printf("Allocating %d frames blocks ... ", 1 << order);
     60                       
    5961                        allocated = 0;
    6062                        for (i = 0; i < MAX_FRAMES >> order; i++) {
     
    6264                               
    6365                                if (ALIGN_UP(frames[allocated], FRAME_SIZE << order) != frames[allocated]) {
    64                                         printf("Block at address %p (size %dK) is not aligned\n", frames[allocated], (FRAME_SIZE << order) >> 10);
     66                                        if (!quiet)
     67                                                printf("Block at address %p (size %dK) is not aligned\n", frames[allocated], (FRAME_SIZE << order) >> 10);
    6568                                        return "Test failed";
    6669                                }
     
    6972                                        allocated++;
    7073                                else {
    71                                         printf("done. ");
     74                                        if (!quiet)
     75                                                printf("done. ");
    7276                                        break;
    7377                                }
    7478                        }
    7579                       
    76                         printf("%d blocks allocated.\n", allocated);
     80                        if (!quiet)
     81                                printf("%d blocks allocated.\n", allocated);
    7782               
    7883                        if (run) {
     
    8287                                results[order] = allocated;
    8388                       
    84                         printf("Deallocating ... ");
     89                        if (!quiet)
     90                                printf("Deallocating ... ");
     91                       
    8592                        for (i = 0; i < allocated; i++)
    8693                                frame_free(KA2PA(frames[i]));
    87                         printf("done.\n");
     94                       
     95                        if (!quiet)
     96                                printf("done.\n");
    8897                }
    8998        }
  • kernel/test/mm/falloc2.c

    r6536a4a9 rdeada67  
    4848static atomic_t thread_count;
    4949static atomic_t thread_fail;
     50static bool sh_quiet;
    5051
    5152static void falloc(void * arg)
     
    5758        uintptr_t * frames =  (uintptr_t *) malloc(MAX_FRAMES * sizeof(uintptr_t), FRAME_ATOMIC);
    5859        if (frames == NULL) {
    59                 printf("Thread #%d (cpu%d): Unable to allocate frames\n", THREAD->tid, CPU->id);
     60                if (!sh_quiet)
     61                        printf("Thread #%d (cpu%d): Unable to allocate frames\n", THREAD->tid, CPU->id);
    6062                atomic_inc(&thread_fail);
    6163                atomic_dec(&thread_count);
     
    6769        for (run = 0; run < THREAD_RUNS; run++) {
    6870                for (order = 0; order <= MAX_ORDER; order++) {
    69                         printf("Thread #%d (cpu%d): Allocating %d frames blocks ... \n", THREAD->tid, CPU->id, 1 << order);
     71                        if (!sh_quiet)
     72                                printf("Thread #%d (cpu%d): Allocating %d frames blocks ... \n", THREAD->tid, CPU->id, 1 << order);
     73                       
    7074                        allocated = 0;
    7175                        for (i = 0; i < (MAX_FRAMES >> order); i++) {
     
    7781                                        break;
    7882                        }
    79                         printf("Thread #%d (cpu%d): %d blocks allocated.\n", THREAD->tid, CPU->id, allocated);
    80 
    81                         printf("Thread #%d (cpu%d): Deallocating ... \n", THREAD->tid, CPU->id);
     83                       
     84                        if (!sh_quiet)
     85                                printf("Thread #%d (cpu%d): %d blocks allocated.\n", THREAD->tid, CPU->id, allocated);
     86                       
     87                        if (!sh_quiet)
     88                                printf("Thread #%d (cpu%d): Deallocating ... \n", THREAD->tid, CPU->id);
     89                       
    8290                        for (i = 0; i < allocated; i++) {
    8391                                for (k = 0; k <= ((FRAME_SIZE << order) - 1); k++) {
    8492                                        if (((uint8_t *) frames[i])[k] != val) {
    85                                                 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);
     93                                                if (!sh_quiet)
     94                                                        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);
    8695                                                atomic_inc(&thread_fail);
    8796                                                goto cleanup;
     
    9099                                frame_free(KA2PA(frames[i]));
    91100                        }
    92                         printf("Thread #%d (cpu%d): Finished run.\n", THREAD->tid, CPU->id);
     101                       
     102                        if (!sh_quiet)
     103                                printf("Thread #%d (cpu%d): Finished run.\n", THREAD->tid, CPU->id);
    93104                }
    94105        }
     
    96107cleanup:       
    97108        free(frames);
    98         printf("Thread #%d (cpu%d): Exiting\n", THREAD->tid, CPU->id);
     109       
     110        if (!sh_quiet)
     111                printf("Thread #%d (cpu%d): Exiting\n", THREAD->tid, CPU->id);
    99112        atomic_dec(&thread_count);
    100113}
     
    103116{
    104117        unsigned int i;
     118        sh_quiet = quiet;
    105119
    106120        atomic_set(&thread_count, THREADS);
     
    110124                thread_t * thrd = thread_create(falloc, NULL, TASK, 0, "falloc", false);
    111125                if (!thrd) {
    112                         printf("Could not create thread %d\n", i);
     126                        if (!quiet)
     127                                printf("Could not create thread %d\n", i);
    113128                        break;
    114129                }
     
    117132       
    118133        while (atomic_get(&thread_count) > 0) {
    119                 printf("Threads left: %d\n", atomic_get(&thread_count));
     134                if (!quiet)
     135                        printf("Threads left: %d\n", atomic_get(&thread_count));
    120136                thread_sleep(1);
    121137        }
  • kernel/test/mm/mapping1.c

    r6536a4a9 rdeada67  
    4949        frame0 = (uintptr_t) frame_alloc(ONE_FRAME, FRAME_KA);
    5050        frame1 = (uintptr_t) frame_alloc(ONE_FRAME, FRAME_KA);
    51 
    52         printf("Writing %#x to physical address %p.\n", VALUE0, KA2PA(frame0));
     51       
     52        if (!quiet)
     53                printf("Writing %#x to physical address %p.\n", VALUE0, KA2PA(frame0));
    5354        *((uint32_t *) frame0) = VALUE0;
    54         printf("Writing %#x to physical address %p.\n", VALUE1, KA2PA(frame1));
     55        if (!quiet)
     56                printf("Writing %#x to physical address %p.\n", VALUE1, KA2PA(frame1));
    5557        *((uint32_t *) frame1) = VALUE1;
    5658       
    57         printf("Mapping virtual address %p to physical address %p.\n", PAGE0, KA2PA(frame0));
     59        if (!quiet)
     60                printf("Mapping virtual address %p to physical address %p.\n", PAGE0, KA2PA(frame0));
    5861        page_mapping_insert(AS_KERNEL, PAGE0, KA2PA(frame0), PAGE_PRESENT | PAGE_WRITE);
    59         printf("Mapping virtual address %p to physical address %p.\n", PAGE1, KA2PA(frame1));   
     62        if (!quiet)
     63                printf("Mapping virtual address %p to physical address %p.\n", PAGE1, KA2PA(frame1));   
    6064        page_mapping_insert(AS_KERNEL, PAGE1, KA2PA(frame1), PAGE_PRESENT | PAGE_WRITE);
    6165       
    62         printf("Value at virtual address %p is %#x.\n", PAGE0, v0 = *((uint32_t *) PAGE0));
    63         printf("Value at virtual address %p is %#x.\n", PAGE1, v1 = *((uint32_t *) PAGE1));
     66        v0 = *((uint32_t *) PAGE0);
     67        v1 = *((uint32_t *) PAGE1);
     68        if (!quiet) {
     69                printf("Value at virtual address %p is %#x.\n", PAGE0, v0);
     70                printf("Value at virtual address %p is %#x.\n", PAGE1, v1);
     71        }
    6472       
    6573        if (v0 != VALUE0)
     
    6775        if (v1 != VALUE1)
    6876                return "Value at v1 not equal to VALUE1";
    69 
    70         printf("Writing %#x to virtual address %p.\n", 0, PAGE0);
     77       
     78        if (!quiet)
     79                printf("Writing %#x to virtual address %p.\n", 0, PAGE0);
    7180        *((uint32_t *) PAGE0) = 0;
    72         printf("Writing %#x to virtual address %p.\n", 0, PAGE1);
     81        if (!quiet)
     82                printf("Writing %#x to virtual address %p.\n", 0, PAGE1);
    7383        *((uint32_t *) PAGE1) = 0;     
    7484
     
    7686        v1 = *((uint32_t *) PAGE1);
    7787       
    78         printf("Value at virtual address %p is %#x.\n", PAGE0, *((uint32_t *) PAGE0)); 
    79         printf("Value at virtual address %p is %#x.\n", PAGE1, *((uint32_t *) PAGE1));
     88        if (!quiet) {
     89                printf("Value at virtual address %p is %#x.\n", PAGE0, *((uint32_t *) PAGE0)); 
     90                printf("Value at virtual address %p is %#x.\n", PAGE1, *((uint32_t *) PAGE1));
     91        }
    8092
    8193        if (v0 != 0)
  • kernel/test/mm/slab1.c

    r6536a4a9 rdeada67  
    3838static void * data[VAL_COUNT];
    3939
    40 static void testit(int size, int count)
     40static void testit(int size, int count, bool quiet)
    4141{
    4242        slab_cache_t *cache;
    4343        int i;
    4444       
    45         printf("Creating cache, object size: %d.\n", size);
    46         cache = slab_cache_create("test_cache", size, 0, NULL, NULL,
    47                                   SLAB_CACHE_NOMAGAZINE);       
    48         printf("Allocating %d items...", count);
     45        if (!quiet)
     46                printf("Creating cache, object size: %d.\n", size);
     47       
     48        cache = slab_cache_create("test_cache", size, 0, NULL, NULL,
     49                                SLAB_CACHE_NOMAGAZINE);
     50       
     51        if (!quiet)
     52                printf("Allocating %d items...", count);
     53       
    4954        for (i = 0; i < count; i++) {
    5055                data[i] = slab_alloc(cache, 0);
    5156                memsetb((uintptr_t) data[i], size, 0);
    5257        }
    53         printf("done.\n");
    54         printf("Freeing %d items...", count);
    55         for (i = 0; i < count; i++) {
     58       
     59        if (!quiet) {
     60                printf("done.\n");
     61                printf("Freeing %d items...", count);
     62        }
     63       
     64        for (i = 0; i < count; i++)
    5665                slab_free(cache, data[i]);
     66       
     67        if (!quiet) {
     68                printf("done.\n");
     69                printf("Allocating %d items...", count);
    5770        }
    58         printf("done.\n");
    59 
    60         printf("Allocating %d items...", count);
     71       
    6172        for (i = 0; i < count; i++) {
    6273                data[i] = slab_alloc(cache, 0);
    6374                memsetb((uintptr_t) data[i], size, 0);
    6475        }
    65         printf("done.\n");
    66 
    67         printf("Freeing %d items...", count / 2);
    68         for (i = count - 1; i >= count / 2; i--) {
     76       
     77        if (!quiet) {
     78                printf("done.\n");
     79                printf("Freeing %d items...", count / 2);
     80        }
     81       
     82        for (i = count - 1; i >= count / 2; i--)
    6983                slab_free(cache, data[i]);
     84       
     85        if (!quiet) {
     86                printf("done.\n");     
     87                printf("Allocating %d items...", count / 2);
    7088        }
    71         printf("done.\n");     
    72 
    73         printf("Allocating %d items...", count / 2);
     89       
    7490        for (i = count / 2; i < count; i++) {
    7591                data[i] = slab_alloc(cache, 0);
    7692                memsetb((uintptr_t) data[i], size, 0);
    7793        }
    78         printf("done.\n");
    79         printf("Freeing %d items...", count);
    80         for (i = 0; i < count; i++) {
     94       
     95        if (!quiet) {
     96                printf("done.\n");
     97                printf("Freeing %d items...", count);
     98        }
     99       
     100        for (i = 0; i < count; i++)
    81101                slab_free(cache, data[i]);
    82         }
    83         printf("done.\n");     
     102       
     103        if (!quiet)
     104                printf("done.\n");     
    84105        slab_cache_destroy(cache);
    85 
    86         printf("Test complete.\n");
     106       
     107        if (!quiet)
     108                printf("Test complete.\n");
    87109}
    88110
    89 static void testsimple(void)
     111static void testsimple(bool quiet)
    90112{
    91         testit(100, VAL_COUNT);
    92         testit(200, VAL_COUNT);
    93         testit(1024, VAL_COUNT);
    94         testit(2048, 512);
    95         testit(4000, 128);
    96         testit(8192, 128);
    97         testit(16384, 128);
    98         testit(16385, 128);
     113        testit(100, VAL_COUNT, quiet);
     114        testit(200, VAL_COUNT, quiet);
     115        testit(1024, VAL_COUNT, quiet);
     116        testit(2048, 512, quiet);
     117        testit(4000, 128, quiet);
     118        testit(8192, 128, quiet);
     119        testit(16384, 128, quiet);
     120        testit(16385, 128, quiet);
    99121}
    100122
     
    106128static slab_cache_t *thr_cache;
    107129static semaphore_t thr_sem;
     130static bool sh_quiet;
    108131
    109132static void slabtest(void *data)
     
    114137        thread_detach(THREAD);
    115138       
    116         printf("Starting thread #%d...\n",THREAD->tid);
     139        if (!sh_quiet)
     140                printf("Starting thread #%d...\n", THREAD->tid);
     141       
    117142        for (j = 0; j < 10; j++) {
    118143                for (i = 0; i < THR_MEM_COUNT; i++)
     
    125150                        slab_free(thr_cache, thr_data[offs][i]);
    126151        }
    127         printf("Thread #%d finished\n", THREAD->tid);
     152       
     153        if (!sh_quiet)
     154                printf("Thread #%d finished\n", THREAD->tid);
     155       
    128156        semaphore_up(&thr_sem);
    129157}
    130158
    131 static void testthreads(void)
     159static void testthreads(bool quiet)
    132160{
    133161        thread_t *t;
    134162        int i;
    135163
    136         thr_cache = slab_cache_create("thread_cache", THR_MEM_SIZE, 0,
    137                                       NULL, NULL,
    138                                       SLAB_CACHE_NOMAGAZINE);
     164        thr_cache = slab_cache_create("thread_cache", THR_MEM_SIZE, 0, NULL, NULL,
     165                                        SLAB_CACHE_NOMAGAZINE);
    139166        semaphore_initialize(&thr_sem, 0);
    140167        for (i = 0; i < THREADS; i++) { 
    141                 if (!(t = thread_create(slabtest, (void *) (unative_t) i, TASK, 0, "slabtest", false)))
    142                         printf("Could not create thread %d\n", i);
    143                 else
     168                if (!(t = thread_create(slabtest, (void *) (unative_t) i, TASK, 0, "slabtest", false))) {
     169                        if (!quiet)
     170                                printf("Could not create thread %d\n", i);
     171                } else
    144172                        thread_ready(t);
    145173        }
     
    149177       
    150178        slab_cache_destroy(thr_cache);
    151         printf("Test complete.\n");
    152179       
     180        if (!quiet)
     181                printf("Test complete.\n");
    153182}
    154183
    155184char * test_slab1(bool quiet)
    156185{
    157         testsimple();
    158         testthreads();
     186        sh_quiet = quiet;
     187       
     188        testsimple(quiet);
     189        testthreads(quiet);
    159190       
    160191        return NULL;
  • kernel/test/mm/slab2.c

    r6536a4a9 rdeada67  
    4343 *  now allocation should clean magazines and allow for full allocation.
    4444 */
    45 static void totalmemtest(void)
     45static void totalmemtest(bool quiet)
    4646{
    4747        slab_cache_t *cache1;
     
    5050
    5151        void *data1, *data2;
    52         void *olddata1=NULL, *olddata2=NULL;
     52        void *olddata1 = NULL, *olddata2 = NULL;
    5353       
    5454        cache1 = slab_cache_create("cache1_tst", ITEM_SIZE, 0, NULL, NULL, 0);
    5555        cache2 = slab_cache_create("cache2_tst", ITEM_SIZE, 0, NULL, NULL, 0);
    56 
    57         printf("Allocating...");
     56       
     57        if (!quiet)
     58                printf("Allocating...");
     59       
    5860        /* Use atomic alloc, so that we find end of memory */
    5961        do {
    6062                data1 = slab_alloc(cache1, FRAME_ATOMIC);
    6163                data2 = slab_alloc(cache2, FRAME_ATOMIC);
    62                 if (!data1 || !data2) {
     64                if ((!data1) || (!data2)) {
    6365                        if (data1)
    64                                 slab_free(cache1,data1);
     66                                slab_free(cache1, data1);
    6567                        if (data2)
    66                                 slab_free(cache2,data2);
     68                                slab_free(cache2, data2);
    6769                        break;
    6870                }
    69                 memsetb((uintptr_t)data1, ITEM_SIZE, 0);
    70                 memsetb((uintptr_t)data2, ITEM_SIZE, 0);
    71                 *((void **)data1) = olddata1;
    72                 *((void **)data2) = olddata2;
     71                memsetb((uintptr_t) data1, ITEM_SIZE, 0);
     72                memsetb((uintptr_t) data2, ITEM_SIZE, 0);
     73                *((void **) data1) = olddata1;
     74                *((void **) data2) = olddata2;
    7375                olddata1 = data1;
    7476                olddata2 = data2;
    75         } while(1);
    76         printf("done.\n");
     77        } while (1);
     78       
     79        if (!quiet) {
     80                printf("done.\n");
     81                printf("Deallocating cache2...");
     82        }
     83       
    7784        /* We do not have memory - now deallocate cache2 */
    78         printf("Deallocating cache2...");
    7985        while (olddata2) {
    80                 data2 = *((void **)olddata2);
     86                data2 = *((void **) olddata2);
    8187                slab_free(cache2, olddata2);
    8288                olddata2 = data2;
    8389        }
    84         printf("done.\n");
    85 
    86         printf("Allocating to cache1...\n");
    87         for (i=0; i<30; i++) {
     90       
     91        if (!quiet) {
     92                printf("done.\n");
     93                printf("Allocating to cache1...\n");
     94        }
     95       
     96        for (i = 0; i < 30; i++) {
    8897                data1 = slab_alloc(cache1, FRAME_ATOMIC);
    8998                if (!data1) {
    90                         printf("Incorrect memory size - use another test.");
     99                        if (!quiet)
     100                                printf("Incorrect memory size - use another test.");
    91101                        return;
    92102                }
    93                 memsetb((uintptr_t)data1, ITEM_SIZE, 0);
    94                 *((void **)data1) = olddata1;
     103                memsetb((uintptr_t) data1, ITEM_SIZE, 0);
     104                *((void **) data1) = olddata1;
    95105                olddata1 = data1;
    96106        }
    97107        while (1) {
    98108                data1 = slab_alloc(cache1, FRAME_ATOMIC);
    99                 if (!data1) {
    100                         break;
    101                 }
    102                 memsetb((uintptr_t)data1, ITEM_SIZE, 0);
    103                 *((void **)data1) = olddata1;
    104                 olddata1 = data1;
    105         }
    106         printf("Deallocating cache1...");
     109                if (!data1)
     110                        break;
     111                memsetb((uintptr_t) data1, ITEM_SIZE, 0);
     112                *((void **) data1) = olddata1;
     113                olddata1 = data1;
     114        }
     115       
     116        if (!quiet)
     117                printf("Deallocating cache1...");
     118       
    107119        while (olddata1) {
    108                 data1 = *((void **)olddata1);
     120                data1 = *((void **) olddata1);
    109121                slab_free(cache1, olddata1);
    110122                olddata1 = data1;
    111123        }
    112         printf("done.\n");
    113         slab_print_list();
     124       
     125        if (!quiet) {
     126                printf("done.\n");
     127                slab_print_list();
     128        }
     129       
    114130        slab_cache_destroy(cache1);
    115131        slab_cache_destroy(cache2);
     
    120136static condvar_t thread_starter;
    121137static mutex_t starter_mutex;
     138static bool sh_quiet;
    122139
    123140#define THREADS 8
     
    126143{
    127144        void *data = NULL, *new;
    128 
     145       
    129146        thread_detach(THREAD);
    130 
     147       
    131148        mutex_lock(&starter_mutex);
    132149        condvar_wait(&thread_starter,&starter_mutex);
    133150        mutex_unlock(&starter_mutex);
    134                
    135         printf("Starting thread #%d...\n",THREAD->tid);
     151       
     152        if (!sh_quiet)
     153                printf("Starting thread #%d...\n",THREAD->tid);
    136154
    137155        /* Alloc all */
    138         printf("Thread #%d allocating...\n", THREAD->tid);
     156        if (!sh_quiet)
     157                printf("Thread #%d allocating...\n", THREAD->tid);
     158       
    139159        while (1) {
    140160                /* Call with atomic to detect end of memory */
     
    142162                if (!new)
    143163                        break;
    144                 *((void **)new) = data;
    145                 data = new;
    146         }
    147         printf("Thread #%d releasing...\n", THREAD->tid);
     164                *((void **) new) = data;
     165                data = new;
     166        }
     167       
     168        if (!sh_quiet)
     169                printf("Thread #%d releasing...\n", THREAD->tid);
     170       
    148171        while (data) {
    149172                new = *((void **)data);
    150                 *((void **)data) = NULL;
     173                *((void **) data) = NULL;
    151174                slab_free(thr_cache, data);
    152175                data = new;
    153176        }
    154         printf("Thread #%d allocating...\n", THREAD->tid);
     177       
     178        if (!sh_quiet)
     179                printf("Thread #%d allocating...\n", THREAD->tid);
     180       
    155181        while (1) {
    156182                /* Call with atomic to detect end of memory */
     
    158184                if (!new)
    159185                        break;
    160                 *((void **)new) = data;
    161                 data = new;
    162         }
    163         printf("Thread #%d releasing...\n", THREAD->tid);
     186                *((void **) new) = data;
     187                data = new;
     188        }
     189       
     190        if (!sh_quiet)
     191                printf("Thread #%d releasing...\n", THREAD->tid);
     192       
    164193        while (data) {
    165194                new = *((void **)data);
    166                 *((void **)data) = NULL;
     195                *((void **) data) = NULL;
    167196                slab_free(thr_cache, data);
    168197                data = new;
    169198        }
    170 
    171         printf("Thread #%d finished\n", THREAD->tid);
     199       
     200        if (!sh_quiet)
     201                printf("Thread #%d finished\n", THREAD->tid);
     202       
    172203        slab_print_list();
    173204        semaphore_up(&thr_sem);
    174205}
    175206
    176 static void multitest(int size)
     207static void multitest(int size, bool quiet)
    177208{
    178209        /* Start 8 threads that just allocate as much as possible,
     
    181212        thread_t *t;
    182213        int i;
    183 
    184         printf("Running stress test with size %d\n", size);
     214       
     215        if (!quiet)
     216                printf("Running stress test with size %d\n", size);
     217       
    185218        condvar_initialize(&thread_starter);
    186219        mutex_initialize(&starter_mutex);
    187220
    188         thr_cache = slab_cache_create("thread_cache", size, 0,
    189                                       NULL, NULL,
    190                                       0);
     221        thr_cache = slab_cache_create("thread_cache", size, 0, NULL, NULL, 0);
    191222        semaphore_initialize(&thr_sem,0);
    192223        for (i = 0; i < THREADS; i++) { 
    193                 if (!(t = thread_create(slabtest, NULL, TASK, 0, "slabtest", false)))
    194                         printf("Could not create thread %d\n", i);
    195                 else
     224                if (!(t = thread_create(slabtest, NULL, TASK, 0, "slabtest", false))) {
     225                        if (!quiet)
     226                                printf("Could not create thread %d\n", i);
     227                } else
    196228                        thread_ready(t);
    197229        }
     
    203235       
    204236        slab_cache_destroy(thr_cache);
    205         printf("Stress test complete.\n");
     237        if (!quiet)
     238                printf("Stress test complete.\n");
    206239}
    207240
    208241char * test_slab2(bool quiet)
    209242{
    210         printf("Running reclaim single-thread test .. pass 1\n");
    211         totalmemtest();
    212         printf("Running reclaim single-thread test .. pass 2\n");
    213         totalmemtest();
    214         printf("Reclaim test OK.\n");
    215 
    216         multitest(128);
    217         multitest(2048);
    218         multitest(8192);
    219         printf("All done.\n");
     243        sh_quiet = quiet;
     244       
     245        if (!quiet)
     246                printf("Running reclaim single-thread test .. pass 1\n");
     247        totalmemtest(quiet);
     248        if (!quiet)
     249                printf("Running reclaim single-thread test .. pass 2\n");
     250        totalmemtest(quiet);
     251        if (!quiet)
     252                printf("Reclaim test OK.\n");
     253       
     254        multitest(128, quiet);
     255        multitest(2048, quiet);
     256        multitest(8192, quiet);
    220257       
    221258        return NULL;
Note: See TracChangeset for help on using the changeset viewer.