Changeset 70b6de1 in mainline


Ignore:
Timestamp:
2006-12-11T19:33:19Z (17 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e54fb21
Parents:
f272cb8
Message:

integrate rest of the tests

Location:
kernel
Files:
6 edited
10 moved

Legend:

Unmodified
Added
Removed
  • kernel/Makefile

    rf272cb8 r70b6de1  
    231231                test/mm/slab1.c \
    232232                test/mm/slab2.c \
    233                 test/mm/purge1.c
     233                test/mm/purge1.c \
     234                test/synch/rwlock1.c \
     235                test/synch/rwlock2.c \
     236                test/synch/rwlock3.c \
     237                test/synch/rwlock4.c \
     238                test/synch/rwlock5.c \
     239                test/synch/semaphore1.c \
     240                test/synch/semaphore2.c \
     241                test/print/print1.c \
     242                test/thread/thread1.c \
     243                test/sysinfo/sysinfo1.c
    234244endif
    235245
  • kernel/test/btree/btree1.c

    rf272cb8 r70b6de1  
    3636#endif
    3737
    38 void *data = (void *) 0xdeadbeef;
     38static void *data = (void *) 0xdeadbeef;
    3939
    4040void test_btree1(void)
  • kernel/test/mm/slab1.c

    rf272cb8 r70b6de1  
    4141#define VAL_COUNT   1024
    4242
    43 void * data[VAL_COUNT];
     43static void * data[VAL_COUNT];
    4444
    4545static void testit(int size, int count)
  • kernel/test/mm/slab2.c

    rf272cb8 r70b6de1  
    120120}
    121121
    122 slab_cache_t *thr_cache;
    123 semaphore_t thr_sem;
    124 condvar_t thread_starter;
    125 mutex_t starter_mutex;
     122static slab_cache_t *thr_cache;
     123static semaphore_t thr_sem;
     124static condvar_t thread_starter;
     125static mutex_t starter_mutex;
    126126
    127127#define THREADS 8
  • kernel/test/print/print1.c

    rf272cb8 r70b6de1  
    3131#define BUFFER_SIZE 32
    3232
    33 void test(void)
     33void test_print1(void)
    3434{
    3535        int retval;
  • kernel/test/synch/rwlock1.c

    rf272cb8 r70b6de1  
    4141static rwlock_t rwlock;
    4242
    43 void test(void)
     43void test_rwlock1(void)
    4444{
    4545        printf("Read/write locks test #1\n");
  • kernel/test/synch/rwlock2.c

    rf272cb8 r70b6de1  
    4343static void failed(void);
    4444
    45 void writer(void *arg)
     45static void writer(void *arg)
    4646{
    4747
     
    5959}
    6060
    61 void failed()
     61static void failed()
    6262{
    6363        printf("Test failed prematurely.\n");
     
    6565}
    6666
    67 void test(void)
     67void test_rwlock2(void)
    6868{
    6969        thread_t *thrd;
  • kernel/test/synch/rwlock3.c

    rf272cb8 r70b6de1  
    4343static void failed(void);
    4444
    45 void reader(void *arg)
     45static void reader(void *arg)
    4646{
    4747        thread_detach(THREAD);
     
    6262}
    6363
    64 void failed(void)
     64static void failed(void)
    6565{
    6666        printf("Test failed prematurely.\n");
     
    6868}
    6969
    70 void test(void)
     70void test_rwlock3(void)
    7171{
    7272        int i;
  • kernel/test/synch/rwlock4.c

    rf272cb8 r70b6de1  
    4747static rwlock_t rwlock;
    4848
    49 SPINLOCK_INITIALIZE(lock);
     49static SPINLOCK_INITIALIZE(lock);
    5050
    5151static waitq_t can_start;
    5252
    53 uint32_t seed = 0xdeadbeef;
     53static uint32_t seed = 0xdeadbeef;
    5454
    5555static uint32_t random(uint32_t max);
     
    5959static void failed(void);
    6060
    61 uint32_t random(uint32_t max)
     61static uint32_t random(uint32_t max)
    6262{
    6363        uint32_t rc;
     
    7171
    7272
    73 void writer(void *arg)
     73static void writer(void *arg)
    7474{
    7575        int rc, to;
     
    9494}
    9595
    96 void reader(void *arg)
     96static void reader(void *arg)
    9797{
    9898        int rc, to;
     
    113113}
    114114
    115 void failed(void)
     115static void failed(void)
    116116{
    117117        printf("Test failed prematurely.\n");
     
    119119}
    120120
    121 void test(void)
     121void test_rwlock4(void)
    122122{
    123123        context_t ctx;
  • kernel/test/synch/rwlock5.c

    rf272cb8 r70b6de1  
    7777}
    7878
    79 void test(void)
     79void test_rwlock5(void)
    8080{
    8181        int i, j, k;
  • kernel/test/synch/semaphore1.c

    rf272cb8 r70b6de1  
    5050static void failed(void);
    5151
    52 void producer(void *arg)
     52static void producer(void *arg)
    5353{
    5454        thread_detach(THREAD); 
     
    6262}
    6363
    64 void consumer(void *arg)
     64static void consumer(void *arg)
    6565{
    6666        thread_detach(THREAD); 
     
    7474}
    7575
    76 void failed(void)
     76static void failed(void)
    7777{
    7878        printf("Test failed prematurely.\n");
     
    8080}
    8181
    82 void test(void)
     82void test_semaphore1(void)
    8383{
    8484        int i, j, k;
  • kernel/test/synch/semaphore2.c

    rf272cb8 r70b6de1  
    4242static semaphore_t sem;
    4343
    44 SPINLOCK_INITIALIZE(lock);
     44static SPINLOCK_INITIALIZE(lock);
    4545
    4646static waitq_t can_start;
    4747
    48 uint32_t seed = 0xdeadbeef;
     48static uint32_t seed = 0xdeadbeef;
    4949
    5050static uint32_t random(uint32_t max);
     
    5353static void failed(void);
    5454
    55 uint32_t random(uint32_t max)
     55static uint32_t random(uint32_t max)
    5656{
    5757        uint32_t rc;
     
    6565
    6666
    67 void consumer(void *arg)
     67static void consumer(void *arg)
    6868{
    6969        int rc, to;
     
    8888}
    8989
    90 void failed(void)
     90static void failed(void)
    9191{
    9292        printf("Test failed prematurely.\n");
     
    9494}
    9595
    96 void test(void)
     96void test_semaphore2(void)
    9797{
    9898        uint32_t i, k;
  • kernel/test/sysinfo/sysinfo1.c

    rf272cb8 r70b6de1  
    4040}*/
    4141
    42 void test(void)
     42void test_sysinfo1(void)
    4343{
    4444/*      sysinfo_set_item_val("Ahoj.lidi.uaaaa",NULL,9);
     
    5252        sysinfo_dump(NULL,0);*/
    5353        sysinfo_dump(NULL,0);
    54        
    5554}
  • kernel/test/test.c

    rf272cb8 r70b6de1  
    114114                true
    115115        },
     116        {
     117                "rwlock1",
     118                "RW-lock test 1",
     119                &test_rwlock1,
     120                true
     121        },
     122        {
     123                "rwlock2",
     124                "RW-lock test 2",
     125                &test_rwlock2,
     126                true
     127        },
     128        {
     129                "rwlock3",
     130                "RW-lock test 3",
     131                &test_rwlock3,
     132                true
     133        },
     134        {
     135                "rwlock4",
     136                "RW-lock test 4",
     137                &test_rwlock4,
     138                true
     139        },
     140        {
     141                "rwlock5",
     142                "RW-lock test 5",
     143                &test_rwlock5,
     144                true
     145        },
     146        {
     147                "semaphore1",
     148                "Semaphore test 1",
     149                &test_semaphore1,
     150                true
     151        },
     152        {
     153                "semaphore2",
     154                "Semaphore test 2",
     155                &test_semaphore2,
     156                true
     157        },
     158        {
     159                "print1",
     160                "Printf test",
     161                &test_print1,
     162                true
     163        },
     164        {
     165                "thread1",
     166                "Thread test",
     167                &test_thread1,
     168                true
     169        },
     170        {
     171                "sysinfo1",
     172                "Sysinfo test",
     173                &test_sysinfo1,
     174                true
     175        },
    116176        {NULL, NULL, NULL}
    117177};
  • kernel/test/test.h

    rf272cb8 r70b6de1  
    5959extern void test_slab1(void);
    6060extern void test_slab2(void);
     61extern void test_rwlock1(void);
     62extern void test_rwlock2(void);
     63extern void test_rwlock3(void);
     64extern void test_rwlock4(void);
     65extern void test_rwlock5(void);
     66extern void test_semaphore1(void);
     67extern void test_semaphore2(void);
     68extern void test_print1(void);
     69extern void test_thread1(void);
     70extern void test_sysinfo1(void);
    6171
    6272extern test_t tests[];
  • kernel/test/thread/thread1.c

    rf272cb8 r70b6de1  
    4949}
    5050
    51 void test(void)
     51void test_thread1(void)
    5252{
    5353        thread_t *t;
Note: See TracChangeset for help on using the changeset viewer.