test.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. /*
  2. * Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009
  3. * The President and Fellows of Harvard College.
  4. *
  5. * Redistribution and use in source and binary forms, with or without
  6. * modification, are permitted provided that the following conditions
  7. * are met:
  8. * 1. Redistributions of source code must retain the above copyright
  9. * notice, this list of conditions and the following disclaimer.
  10. * 2. Redistributions in binary form must reproduce the above copyright
  11. * notice, this list of conditions and the following disclaimer in the
  12. * documentation and/or other materials provided with the distribution.
  13. * 3. Neither the name of the University nor the names of its contributors
  14. * may be used to endorse or promote products derived from this software
  15. * without specific prior written permission.
  16. *
  17. * THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
  18. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  19. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  20. * ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
  21. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  22. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  23. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  24. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  25. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  26. * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  27. * SUCH DAMAGE.
  28. */
  29. #define TESTFILE "badcallfile"
  30. #define TESTDIR "badcalldir"
  31. #define TESTLINK "badcalllink"
  32. /* driver.c */
  33. void report_survival(int rv, int error, const char *desc);
  34. void report_test(int rv, int error, int right_error, const char *desc);
  35. void report_test2(int rv, int error, int okerr1, int okerr2, const char *desc);
  36. int open_testfile(const char *str);
  37. int create_testfile(void);
  38. int create_testdir(void);
  39. int create_testlink(void);
  40. /* common_buf.c */
  41. void test_read_buf(void);
  42. void test_write_buf(void);
  43. void test_getdirentry_buf(void);
  44. void test_getcwd_buf(void);
  45. void test_readlink_buf(void);
  46. /* common_fds.c */
  47. void test_read_fd(void);
  48. void test_write_fd(void);
  49. void test_close_fd(void);
  50. void test_ioctl_fd(void);
  51. void test_lseek_fd(void);
  52. void test_fsync_fd(void);
  53. void test_ftruncate_fd(void);
  54. void test_fstat_fd(void);
  55. void test_getdirentry_fd(void);
  56. void test_dup2_fd(void);
  57. /* common_path.c */
  58. void test_open_path(void);
  59. void test_remove_path(void);
  60. void test_rename_paths(void);
  61. void test_link_paths(void);
  62. void test_mkdir_path(void);
  63. void test_rmdir_path(void);
  64. void test_chdir_path(void);
  65. void test_symlink_paths(void);
  66. void test_readlink_path(void);
  67. void test_stat_path(void);
  68. void test_lstat_path(void);
  69. /* bad_*.c */
  70. void test_execv(void);
  71. void test_waitpid(void);
  72. void test_open(void);
  73. void test_read(void);
  74. void test_write(void);
  75. void test_close(void);
  76. void test_reboot(void);
  77. void test_sbrk(void);
  78. void test_ioctl(void);
  79. void test_lseek(void);
  80. void test_fsync(void);
  81. void test_ftruncate(void);
  82. void test_fstat(void); /* in bad_stat.c */
  83. void test_remove(void);
  84. void test_rename(void);
  85. void test_link(void);
  86. void test_mkdir(void);
  87. void test_rmdir(void);
  88. void test_chdir(void);
  89. void test_getdirentry(void);
  90. void test_symlink(void);
  91. void test_readlink(void);
  92. void test_dup2(void);
  93. void test_pipe(void);
  94. void test_time(void);
  95. void test_getcwd(void);
  96. void test_stat(void);
  97. void test_lstat(void); /* in bad_stat.c */