Merge branch 'master' of ssh://www.aleph1.co.uk/home/aleph1/git/yaffs2
[yaffs2.git] / direct / timothy_tests / yaffs_and_linux_mirror_tests / mirror_tests.h
1 /*
2  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
3  *
4  * Copyright (C) 2002-2011 Aleph One Ltd.
5  *   for Toby Churchill Ltd and Brightstar Engineering
6  *
7  * Created by Timothy Manning <timothy@yaffs.net>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU Lesser General Public License version 2.1 as
11  * published by the Free Software Foundation.
12  *
13  * Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL.
14  */
15
16 #ifndef __mirror_tests_h__
17 #define __mirror_tests_h__
18
19 #include <stdio.h>
20 #include <dirent.h>
21 #include <unistd.h>     //used for getting the current directory. 
22 #include <string.h>
23 #include <errno.h>
24 #include "yaffsfs.h"
25 #include "lib.h"
26 #include <time.h>
27 #include <getopt.h>
28 #include <sys/stat.h>
29
30 #include "linux_test_open.h"
31 #include "yaffs_test_open.h"
32 #include "linux_test_truncate.h"
33 #include "yaffs_test_truncate.h"
34 #include "linux_test_unlink.h"
35 #include "yaffs_test_unlink.h"
36 #include "linux_test_write.h"
37 #include "yaffs_test_write.h"
38
39 #define LINUX 1
40 #define YAFFS 2
41
42
43
44
45
46 void init(int argc, char *argv[]);
47 int run_random_test(int num_of_random_tests);
48 int compare_linux_and_yaffs(arg_temp *args_struct);
49
50 int select_test_id(int test_len);
51 void generate_random_numbers(arg_temp *args_struct);
52 void run_yaffs_test(int id,arg_temp *args_struct);
53 void run_linux_test(int id,arg_temp *args_struct);
54 void clean_dir(void);
55 int select_test_id(int test_len);
56 int check_mode(arg_temp *args_struct);
57 int check_mode_file(char *path);
58 //void generate_array_of_objects_in_yaffs(void); 
59 //void generate_array_of_objects_in_linux(void);
60
61 #endif