Fix unmatched temporary buffer allocations
[yaffs2.git] / direct / test-framework / 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-2018 Aleph One Ltd.
5  *
6  * Created by Timothy Manning <timothy@yaffs.net>
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU Lesser General Public License version 2.1 as
10  * published by the Free Software Foundation.
11  *
12  * Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL.
13  */
14
15 #ifndef __mirror_tests_h__
16 #define __mirror_tests_h__
17
18 #include <stdio.h>
19 #include <dirent.h>
20 #include <unistd.h>     //used for getting the current directory. 
21 #include <string.h>
22 #include <errno.h>
23 #include "yaffsfs.h"
24 #include "lib.h"
25 #include <time.h>
26 #include <getopt.h>
27 #include <sys/stat.h>
28
29 #include "linux_test_open.h"
30 #include "yaffs_test_open.h"
31 #include "linux_test_truncate.h"
32 #include "yaffs_test_truncate.h"
33 #include "linux_test_unlink.h"
34 #include "yaffs_test_unlink.h"
35 #include "linux_test_write.h"
36 #include "yaffs_test_write.h"
37
38 #define LINUX 1
39 #define YAFFS 2
40
41
42
43
44
45 void init(int argc, char *argv[]);
46 int run_random_test(int num_of_random_tests);
47 int compare_linux_and_yaffs(arg_temp *args_struct);
48
49 int select_test_id(int test_len);
50 void generate_random_numbers(arg_temp *args_struct);
51 void run_yaffs_test(int id,arg_temp *args_struct);
52 void run_linux_test(int id,arg_temp *args_struct);
53 void clean_dir(void);
54 int select_test_id(int test_len);
55 int check_mode(arg_temp *args_struct);
56 int check_mode_file(char *path);
57 //void generate_array_of_objects_in_yaffs(void); 
58 //void generate_array_of_objects_in_linux(void);
59
60 #endif