Changeset 1433ecda in mainline for kernel/test


Ignore:
Timestamp:
2018-04-04T15:42:37Z (7 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2c4e1cc
Parents:
47b2d7e3
Message:

Fix cstyle: make ccheck-fix and commit only files where all the changes are good.

Location:
kernel/test
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • kernel/test/avltree/avltree1.c

    r47b2d7e3 r1433ecda  
    5050static avltree_node_t *test_tree_parents(avltree_node_t *node);
    5151static void print_tree_structure_flat (avltree_node_t *node, int level)
    52     __attribute__ ((used));
     52    __attribute__((used));
    5353static avltree_node_t *alloc_avltree_node(void);
    5454
     
    7272                        TPRINTF("Bad parent pointer key: %" PRIu64
    7373                            ", address: %p\n",
    74                             tmp->key,node->rgt);
     74                            tmp->key, node->rgt);
    7575                }
    7676        }
  • kernel/test/debug/mips1.c

    r47b2d7e3 r1433ecda  
    4242
    4343        asm volatile (
    44                 "break\n"
     44            "break\n"
    4545        );
    4646
  • kernel/test/mm/slab1.c

    r47b2d7e3 r1433ecda  
    132132        for (j = 0; j < 10; j++) {
    133133                for (i = 0; i < THR_MEM_COUNT; i++)
    134                         thr_data[offs][i] = slab_alloc(thr_cache,0);
     134                        thr_data[offs][i] = slab_alloc(thr_cache, 0);
    135135                for (i = 0; i < THR_MEM_COUNT / 2; i++)
    136136                        slab_free(thr_cache, thr_data[offs][i]);
  • kernel/test/mm/slab2.c

    r47b2d7e3 r1433ecda  
    141141
    142142        mutex_lock(&starter_mutex);
    143         condvar_wait(&thread_starter,&starter_mutex);
     143        condvar_wait(&thread_starter, &starter_mutex);
    144144        mutex_unlock(&starter_mutex);
    145145
     
    209209
    210210        thr_cache = slab_cache_create("thread_cache", size, 0, NULL, NULL, 0);
    211         semaphore_initialize(&thr_sem,0);
     211        semaphore_initialize(&thr_sem, 0);
    212212        for (i = 0; i < THREADS; i++) {
    213213                if (!(t = thread_create(slabtest, NULL, TASK, THREAD_FLAG_NONE, "slabtest"))) {
  • kernel/test/smpcall/smpcall1.c

    r47b2d7e3 r1433ecda  
    5353        assert(interrupts_disabled());
    5454
    55         size_t *pcall_cnt = (size_t*)p;
     55        size_t *pcall_cnt = (size_t *)p;
    5656        /*
    5757         * No synchronization. Tests if smp_calls makes changes
     
    6464static void test_thread(void *p)
    6565{
    66         size_t *pcall_cnt = (size_t*)p;
     66        size_t *pcall_cnt = (size_t *)p;
    6767        smp_call_t call_info[MAX_CPUS];
    6868
     
    8484                 * same counter would clobber it without additional synchronization.
    8585                 */
    86                 size_t local_cnt[MAX_CPUS] = {0};
     86                size_t local_cnt[MAX_CPUS] = { 0 };
    8787
    8888                /* Now start asynchronous calls. */
     
    110110{
    111111        /* Number of received calls that were sent by cpu[i]. */
    112         size_t call_cnt[MAX_CPUS] = {0};
     112        size_t call_cnt[MAX_CPUS] = { 0 };
    113113        thread_t *thread[MAX_CPUS] = { NULL };
    114114
     
    121121        for (unsigned int id = 0; id < cpu_count; ++id) {
    122122                thread[id] = thread_create(test_thread, &call_cnt[id], TASK,
    123                         THREAD_FLAG_NONE, "smp-call-test");
     123                    THREAD_FLAG_NONE, "smp-call-test");
    124124
    125125                if (thread[id]) {
     
    135135
    136136        TPRINTF("Running %zu wired threads. Expecting %zu calls. Be patient.\n",
    137                 running_thread_cnt, exp_calls_sum);
     137            running_thread_cnt, exp_calls_sum);
    138138
    139139        for (unsigned int i = 0; i < cpu_count; ++i) {
     
    161161                                ok = false;
    162162                                TPRINTF("Error: %zu instead of %zu cpu%zu's calls were"
    163                                         " acknowledged.\n", call_cnt[i], exp_calls, i);
     163                                    " acknowledged.\n", call_cnt[i], exp_calls, i);
    164164                        }
    165165                }
     
    170170        if (calls_sum != exp_calls_sum) {
    171171                TPRINTF("Error: total acknowledged sum: %zu instead of %zu.\n",
    172                         calls_sum, exp_calls_sum);
     172                    calls_sum, exp_calls_sum);
    173173
    174174                ok = false;
     
    177177        if (ok) {
    178178                TPRINTF("Success: number of received smp_calls is as expected (%zu).\n",
    179                         exp_calls_sum);
     179                    exp_calls_sum);
    180180                return NULL;
    181181        } else
  • kernel/test/synch/workqueue2.c

    r47b2d7e3 r1433ecda  
    112112{
    113113        TPRINTF("Stress testing a custom queue. Stops prematurely. "
    114                 "Errors are expected.\n");
     114            "Errors are expected.\n");
    115115        test_custom_workq_impl(true, "test-workq-stop");
    116116        /* Errors are expected. */
Note: See TracChangeset for help on using the changeset viewer.