os161-1.99
 All Data Structures
test.h
00001 /*
00002  * Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009
00003  *      The President and Fellows of Harvard College.
00004  *
00005  * Redistribution and use in source and binary forms, with or without
00006  * modification, are permitted provided that the following conditions
00007  * are met:
00008  * 1. Redistributions of source code must retain the above copyright
00009  *    notice, this list of conditions and the following disclaimer.
00010  * 2. Redistributions in binary form must reproduce the above copyright
00011  *    notice, this list of conditions and the following disclaimer in the
00012  *    documentation and/or other materials provided with the distribution.
00013  * 3. Neither the name of the University nor the names of its contributors
00014  *    may be used to endorse or promote products derived from this software
00015  *    without specific prior written permission.
00016  *
00017  * THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00027  * SUCH DAMAGE.
00028  */
00029 
00030 #define TESTFILE "badcallfile"
00031 #define TESTDIR  "badcalldir"
00032 #define TESTLINK "badcalllink"
00033 
00034 /* driver.c */
00035 void report_survival(int rv, int error, const char *desc);
00036 void report_test(int rv, int error, int right_error, const char *desc);
00037 void report_test2(int rv, int error, int okerr1, int okerr2, const char *desc);
00038 int open_testfile(const char *str);
00039 int create_testfile(void);
00040 int create_testdir(void);
00041 int create_testlink(void);
00042 
00043 /* common_buf.c */
00044 void test_read_buf(void);
00045 void test_write_buf(void);
00046 void test_getdirentry_buf(void);
00047 void test_getcwd_buf(void);
00048 void test_readlink_buf(void);
00049 
00050 /* common_fds.c */
00051 void test_read_fd(void);
00052 void test_write_fd(void);
00053 void test_close_fd(void);
00054 void test_ioctl_fd(void);
00055 void test_lseek_fd(void);
00056 void test_fsync_fd(void);
00057 void test_ftruncate_fd(void);
00058 void test_fstat_fd(void);
00059 void test_getdirentry_fd(void);
00060 void test_dup2_fd(void);
00061 
00062 /* common_path.c */
00063 void test_open_path(void);
00064 void test_remove_path(void);
00065 void test_rename_paths(void);
00066 void test_link_paths(void);
00067 void test_mkdir_path(void);
00068 void test_rmdir_path(void);
00069 void test_chdir_path(void);
00070 void test_symlink_paths(void);
00071 void test_readlink_path(void);
00072 void test_stat_path(void);
00073 void test_lstat_path(void);
00074 
00075 /* bad_*.c */
00076 void test_execv(void);
00077 void test_waitpid(void);
00078 void test_open(void);
00079 void test_read(void);
00080 void test_write(void);
00081 void test_close(void);
00082 void test_reboot(void);
00083 void test_sbrk(void);
00084 void test_ioctl(void);
00085 void test_lseek(void);
00086 void test_fsync(void);
00087 void test_ftruncate(void);
00088 void test_fstat(void);          /* in bad_stat.c */
00089 void test_remove(void);
00090 void test_rename(void);
00091 void test_link(void);
00092 void test_mkdir(void);
00093 void test_rmdir(void);
00094 void test_chdir(void);
00095 void test_getdirentry(void);
00096 void test_symlink(void);
00097 void test_readlink(void);
00098 void test_dup2(void);
00099 void test_pipe(void);
00100 void test_time(void);
00101 void test_getcwd(void);
00102 void test_stat(void);
00103 void test_lstat(void);          /* in bad_stat.c */
 All Data Structures