Whamcloud - gitweb
land b1_5 onto HEAD
[fs/lustre-release.git] / lustre / liblustre / tests / test_common.h
1 #ifndef __TEST_COMMON__H
2 #define __TEST_COMMON__H
3
4 #define ENV_LUSTRE_MNTPNT               "LIBLUSTRE_MOUNT_POINT"
5 #define ENV_LUSTRE_MNTTGT               "LIBLUSTRE_MOUNT_TARGET"
6 #define ENV_LUSTRE_TIMEOUT              "LIBLUSTRE_TIMEOUT"
7 #define ENV_LUSTRE_DUMPFILE             "LIBLUSTRE_DUMPFILE"
8
9 extern int exit_on_err;
10
11 #include <utime.h> /* for utimbuf */
12
13 void t_touch(const char *path);
14 void t_create(const char *path);
15 void t_link(const char *src, const char *dst);
16 void t_unlink(const char *path);
17 void t_mkdir(const char *path);
18 void t_rmdir(const char *path);
19 void t_symlink(const char *src, const char *new);
20 void t_mknod(const char *path, mode_t mode, int major, int minor);
21 void t_chmod_raw(const char *path, mode_t mode);
22 void t_chmod(const char *path, const char *format, ...);
23 void t_rename(const char *oldpath, const char *newpath);
24 int t_open_readonly(const char *path);
25 int t_open(const char *path);
26 int t_chdir(const char *path);
27 int t_utime(const char *path, const struct utimbuf *buf);
28 int t_opendir(const char *path);
29 void t_close(int fd);
30 int t_check_stat(const char *name, struct stat *buf);
31 int t_check_stat_fail(const char *name);
32 void t_echo_create(const char *path, const char *str);
33 void t_grep(const char *path, char *str);
34 void t_grep_v(const char *path, char *str);
35 void t_ls(int fd, char *buf, int size);
36 int t_fcntl(int fd, int cmd, ...);
37
38 char *safe_strncpy(char *dst, char *src, int max_size);
39
40 #endif