yaffs Commiting yaffs_tester.c and coresponding files
[yaffs2.git] / direct / timothy_tests / yaffs_tester.h
1 /*yaffs_tester.h */
2 #ifndef __YAFFS_TESTER_H__
3         #define __YAFFS_TESTER_H__
4
5         #include <stdio.h>
6         
7         #include "yaffsfs.h"    /* it is in "yaffs2/direct/" link it in the Makefile */
8         
9
10         #define MAX_FILE_NAME_SIZE 51
11         #define BUFFER_MESSAGE_LENGTH 50                /*number of char in message*/
12         #define BUFFER_SIZE 50                  /*number of messages in buffer*/
13         typedef struct buffer_template
14         {
15                 char buffer[BUFFER_SIZE][BUFFER_MESSAGE_LENGTH];
16                 char head;
17                 char tail;
18         }buffer; 
19
20         void init(char yaffs_test_dir[],char yaffs_mount_dir[]);        /*sets up yaffs and mounts yaffs */
21         void test(char yaffs_test_dir[]);                               /*contains the test code*/
22         void generate_random_string(char *ptr);                         /*generates a random string of letters to be used for a name*/
23         void add_to_buffer(buffer *p_Buffer, char message[]);           /*code for buffer*/
24         void print_buffer(buffer *p_Buffer);                            /*print all of the messages in the buffer*/ 
25 #endif