Fix copyright
[yaffs2.git] / direct / test-framework / timothy_tests / quick_tests / lib.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 _lib_h__
16 #define _lib_h__
17
18 #include <stdio.h>
19 #include <string.h>
20 #include "yaffsfs.h"
21
22
23 #define YAFFS_MOUNT_POINT "/yflash2/"
24 #define FILE_NAME "test_dir/foo"
25 #define FILE_SIZE 10
26
27 #define YAFFS_TEST_LONG_VALUE (100000000000000000LL)
28
29 #define FILE_MODE (S_IREAD | S_IWRITE)
30 #define FILE_SIZE_TRUNCATED 100
31 #define FILE_TEXT "file foo "   /* keep space at end of string */
32 #define FILE_TEXT_NBYTES 10
33 #define TEST_DIR "/yflash2/test_dir"
34 #define DIR_PATH "/yflash2/test_dir/new_directory"
35 #define DIR_PATH2 "/yflash2/test_dir/new_directory2"
36 #define DIR_PATH2_FILE "/yflash2/test_dir/new_directory2/foo"
37 #define SYMLINK_PATH "/yflash2/test_dir/sym_foo"
38
39 #define HARD_LINK_PATH "/yflash2/test_dir/hard_link"
40
41 #define NODE_PATH "/yflash2/test_dir/node"
42
43 #define RENAME_PATH "/yflash2/test_dir/foo2"
44
45 #define RENAME_DIR_PATH "/yflash2/test_dir/dir2"
46
47 #define ELOOP_PATH "/yflash2/test_dir/ELOOP"
48 #define ELOOP2_PATH "/yflash2/test_dir/ELOOP2"
49
50 #define RMDIR_PATH "/yflash2/test_dir/RM_DIR"
51
52 /* warning do not define anything as FILE because there seems to be a conflict with stdio.h */ 
53 #define FILE_PATH "/yflash2/test_dir/foo"
54 #define FILE_PATH2 "/yflash2/test_dir/foo2"
55
56 void join_paths(char *path1,char *path2,char *new_path );
57 void print_message(char *message,char print_level);
58 void set_print_level(int new_level);
59 void set_exit_on_error(int num);
60 int get_exit_on_error(void);
61 int set_up_ELOOP(void);
62 int EROFS_setup(void);
63 int EROFS_clean(void);
64 int delete_dir(char *dir_name);
65 void get_error(void);
66 #endif