Changeset deada67 in mainline for kernel/test/fpu/mips2.c


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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/test/fpu/mips2.c

    r6536a4a9 rdeada67  
    4646static atomic_t threads_fault;
    4747static waitq_t can_start;
     48static bool sh_quiet;
    4849
    4950static void testit1(void *data)
     
    7172               
    7273                if (arg != after_arg) {
    73                         printf("General reg tid%d: arg(%d) != %d\n", THREAD->tid, arg, after_arg);
     74                        if (!sh_quiet)
     75                                printf("General reg tid%d: arg(%d) != %d\n", THREAD->tid, arg, after_arg);
    7476                        atomic_inc(&threads_fault);
    7577                        break;
     
    102104               
    103105                if (arg != after_arg) {
    104                         printf("General reg tid%d: arg(%d) != %d\n", THREAD->tid, arg, after_arg);
     106                        if (!sh_quiet)
     107                                printf("General reg tid%d: arg(%d) != %d\n", THREAD->tid, arg, after_arg);
    105108                        atomic_inc(&threads_fault);
    106109                        break;
     
    114117{
    115118        unsigned int i, total = 0;
     119        sh_quiet = quiet;
    116120       
    117121        waitq_initialize(&can_start);
    118122        atomic_set(&threads_ok, 0);
    119123        atomic_set(&threads_fault, 0);
    120         printf("Creating %d threads... ", 2 * THREADS);
     124       
     125        if (!quiet)
     126                printf("Creating %d threads... ", 2 * THREADS);
    121127
    122128        for (i = 0; i < THREADS; i++) {
     
    124130               
    125131                if (!(t = thread_create(testit1, (void *) ((unative_t) 2 * i), TASK, 0, "testit1", false))) {
    126                         printf("could not create thread %d\n", 2 * i);
     132                        if (!quiet)
     133                                printf("could not create thread %d\n", 2 * i);
    127134                        break;
    128135                }
     
    131138               
    132139                if (!(t = thread_create(testit2, (void *) ((unative_t) 2 * i + 1), TASK, 0, "testit2", false))) {
    133                         printf("could not create thread %d\n", 2 * i + 1);
     140                        if (!quiet)
     141                                printf("could not create thread %d\n", 2 * i + 1);
    134142                        break;
    135143                }
     
    137145                total++;
    138146        }
    139         printf("ok\n");
     147       
     148        if (!quiet)
     149                printf("ok\n");
    140150               
    141151        thread_sleep(1);
     
    143153       
    144154        while (atomic_get(&threads_ok) != total) {
    145                 printf("Threads left: %d\n", total - atomic_get(&threads_ok));
     155                if (!quiet)
     156                        printf("Threads left: %d\n", total - atomic_get(&threads_ok));
    146157                thread_sleep(1);
    147158        }
Note: See TracChangeset for help on using the changeset viewer.