User space tester

Test devman service. More...

Files

file  common.h
file  devman1.c
file  devman2.c
file  serial1.c
file  tester.c
file  tester.h
file  virtchar1.c

Data Structures

struct  mem_area_t
struct  mem_block_t
struct  ph_alloc_size_t
struct  phase_t
struct  sp_action_prob_t
struct  sp_term_cond_t
struct  subphase_t
struct  test_t

Defines

#define AREA_GRANULARITY   16
#define AREA_SIZE   (4 * PAGE_SIZE)
#define BUFFER_SIZE   64
#define DEFAULT_COUNT   1024
#define DEFAULT_SLEEP   100000
#define DEVICE_CLASS   "test3"
#define DEVICE_CLASS   "virt-null"
#define DEVICE_CLASS_NAME   "1"
#define DEVICE_PATH_CLASSES   "/dev/class/virt-null\\1"
#define DEVICE_PATH_CLASSES   DEVICE_CLASS "/" DEVICE_CLASS_NAME
#define DEVICE_PATH_NORMAL   "/dev/devices/\\virt\\null\\a"
#define DEVICE_PATH_NORMAL   "/virt/null/a"
#define EOT   "####> End of transfer <####\n"
#define IPC_TEST_METHOD   2000
#define IPC_TEST_SERVICE   10240
#define MAX_ALLOC   (16 * 1024 * 1024)
#define RETURN_IF_ERROR
#define sizeof_array(array)   (sizeof(array) / sizeof((array)[0]))
 sizeof_array array to determine the size of
#define TPRINTF(format,)
#define TSTACKTRACE()

Typedefs

typedef const char *(*) test_entry_t (void)

Functions

mem_block_talloc_block (size_t)
void check_block (mem_block_t *)
 Check block.
void done_mem (void)
 Cleanup all allocated memory blocks and mapped areas.
void fill_area (mem_area_t *)
 Fill area.
void fill_block (mem_block_t *)
 Fill block.
void free_block (mem_block_t *)
 Free block.
mem_block_tget_random_block (void)
 Get random block.
void init_mem (void)
 Initializes the memory accounting structures.
static void list_tests (void)
int main (int argc, char *argv[])
 Main entry point.
mem_area_tmap_area (size_t)
static void run_safe_tests (void)
static bool run_test (test_t *test)
const char * test_console1 (void)
const char * test_devman1 (void)
const char * test_devman2 (void)
const char * test_fault1 (void)
const char * test_fault2 (void)
const char * test_fault3 (void)
const char * test_loop1 (void)
const char * test_malloc1 (void)
const char * test_malloc2 (void)
const char * test_malloc3 (void)
const char * test_mapping1 (void)
const char * test_ping_pong (void)
const char * test_print1 (void)
const char * test_print2 (void)
const char * test_print3 (void)
const char * test_print4 (void)
const char * test_print5 (void)
const char * test_serial1 (void)
const char * test_stdio1 (void)
const char * test_stdio2 (void)
const char * test_thread1 (void)
const char * test_vfs1 (void)
const char * test_virtchar1 (void)
static const char * test_virtchar1_internal (const char *path)
void unmap_area (mem_area_t *)
 Unmap area.

Variables

bool error_flag
size_t mem_allocated
size_t mem_blocks_count
int test_argc
int test_argc
char ** test_argv
char ** test_argv
bool test_quiet
bool test_quiet
test_t tests []
test_t tests []

Detailed Description

Test devman service.


Define Documentation

#define sizeof_array ( array   )     (sizeof(array) / sizeof((array)[0]))

sizeof_array array to determine the size of

Returns the size of in array elements.

Definition at line 55 of file tester.h.


Function Documentation

void check_block ( mem_block_t block  ) 

Check block.

Check whether the block contains the data it was filled with. Set global error_flag if an error occurs.

Parameters:
block Memory block control structure

Definition at line 288 of file common.c.

void done_mem ( void   ) 

Cleanup all allocated memory blocks and mapped areas.

Set the global error_flag if an error occurs.

Definition at line 71 of file common.c.

void fill_area ( mem_area_t area  ) 

Fill area.

Fill the memory area controlled by with data.

Parameters:
area Memory area control structure

Definition at line 410 of file common.c.

void fill_block ( mem_block_t block  ) 

Fill block.

Fill the memory block controlled by with data.

Parameters:
block Memory block control structure

Definition at line 271 of file common.c.

void free_block ( mem_block_t block  ) 

Free block.

Free the block of memory and the block control structure allocated by alloc_block. Set the global error_flag if an error occurs.

Parameters:
block Block control structure

Definition at line 236 of file common.c.

mem_block_t* get_random_block ( void   ) 

Get random block.

Select a random memory block from the list of allocated blocks.

Returns:
Block control structure or NULL if the list is empty.

Definition at line 308 of file common.c.

int main ( int  argc,
char *  argv[] 
)

Main entry point.

Returns:
Zero on success, non-zero on error.

Definition at line 292 of file tester.c.

void unmap_area ( mem_area_t area  ) 

Unmap area.

Unmap the memory area and free the block control structure. Set the global error_flag if an error occurs.

Parameters:
area Memory area control structure

Definition at line 375 of file common.c.


Generated on Thu Jun 2 07:45:57 2011 for HelenOS/USB by  doxygen 1.4.7