X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=direct%2Ftimothy_tests%2Fyaffs_tester.h;fp=direct%2Ftimothy_tests%2Fyaffs_tester.h;h=4c551106806d248db5752ac65f440a138dc38773;hp=0000000000000000000000000000000000000000;hb=9b8bd9ed64c89da47898036632e54632833a51d1;hpb=ec113a5a0f4fb6569777ef91df708f81e71b949f;ds=sidebyside diff --git a/direct/timothy_tests/yaffs_tester.h b/direct/timothy_tests/yaffs_tester.h new file mode 100644 index 0000000..4c55110 --- /dev/null +++ b/direct/timothy_tests/yaffs_tester.h @@ -0,0 +1,25 @@ +/*yaffs_tester.h */ +#ifndef __YAFFS_TESTER_H__ + #define __YAFFS_TESTER_H__ + + #include + + #include "yaffsfs.h" /* it is in "yaffs2/direct/" link it in the Makefile */ + + + #define MAX_FILE_NAME_SIZE 51 + #define BUFFER_MESSAGE_LENGTH 50 /*number of char in message*/ + #define BUFFER_SIZE 50 /*number of messages in buffer*/ + typedef struct buffer_template + { + char buffer[BUFFER_SIZE][BUFFER_MESSAGE_LENGTH]; + char head; + char tail; + }buffer; + + void init(char yaffs_test_dir[],char yaffs_mount_dir[]); /*sets up yaffs and mounts yaffs */ + void test(char yaffs_test_dir[]); /*contains the test code*/ + void generate_random_string(char *ptr); /*generates a random string of letters to be used for a name*/ + void add_to_buffer(buffer *p_Buffer, char message[]); /*code for buffer*/ + void print_buffer(buffer *p_Buffer); /*print all of the messages in the buffer*/ +#endif