Changeset 89c57b6 in mainline for kernel/test/print/print5.c


Ignore:
Timestamp:
2011-04-13T14:45:41Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
88634420
Parents:
cefb126 (diff), 17279ead (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • kernel/test/print/print5.c

    rcefb126 r89c57b6  
    11/*
    2  * Copyright (c) 2007 Jan Hudecek
    3  * Copyright (c) 2008 Martin Decky
     2 * Copyright (c) 2005 Josef Cejka
    43 * All rights reserved.
    54 *
     
    2827 */
    2928
    30 /** @addtogroup genericproc
    31  * @{
     29/*
     30 * This test tests several features of the HelenOS
     31 * printf() implementation which go beyond the POSIX
     32 * specification and GNU printf() behaviour.
     33 *
     34 * Therefore we disable printf() argument checking by
     35 * the GCC compiler in this source file to avoid false
     36 * positives.
     37 *
    3238 */
    33 /** @file tasklet.h
    34  * @brief Tasklets declarations
    35  */
     39#define NVERIFY_PRINTF
    3640
    37 #ifndef KERN_TASKLET_H_
    38 #define KERN_TASKLET_H_
     41#include <print.h>
     42#include <test.h>
    3943
    40 #include <adt/list.h>
    41 
    42 /** Tasklet callback type */
    43 typedef void (* tasklet_callback_t)(void *arg);
    44 
    45 /** Tasklet state */
    46 typedef enum {
    47         NotActive,
    48         Scheduled,
    49         InProgress,
    50         Disabled
    51 } tasklet_state_t;
    52 
    53 /** Structure describing a tasklet */
    54 typedef struct tasklet_descriptor {
    55         link_t link;
     44const char *test_print5(void)
     45{
     46        TPRINTF("Testing printf(\"%%s\", NULL):\n");
     47        TPRINTF("Expected output: \"(NULL)\"\n");
     48        TPRINTF("Real output:     \"%s\"\n\n", (char *) NULL);
    5649       
    57         /** Callback to call */
    58         tasklet_callback_t callback;
     50        TPRINTF("Testing printf(\"%%c %%3.2c %%-3.2c %%2.3c %%-2.3c\", 'a', 'b', 'c', 'd', 'e'):\n");
     51        TPRINTF("Expected output: [a] [  b] [c  ] [ d] [e ]\n");
     52        TPRINTF("Real output:     [%c] [%3.2c] [%-3.2c] [%2.3c] [%-2.3c]\n\n", 'a', 'b', 'c', 'd', 'e');
    5953       
    60         /** Argument passed to the callback */
    61         void *arg;
    62        
    63         /** State of the tasklet */
    64         tasklet_state_t state;
    65 } tasklet_descriptor_t;
    66 
    67 
    68 extern void tasklet_init(void);
    69 
    70 #endif
    71 
    72 /** @}
    73  */
     54        return NULL;
     55}
Note: See TracChangeset for help on using the changeset viewer.