test.h 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. #ifndef _TEST_H_
  30. #define _TEST_H_
  31. /*
  32. * Declarations for test code and other miscellaneous high-level
  33. * functions.
  34. */
  35. /* This is only actually available if OPT_SYNCHPROBS is set. */
  36. int whalemating(int, char **);
  37. #ifdef UW
  38. int catmouse(int, char **);
  39. int traffic_simulation(int, char **);
  40. #endif
  41. /*
  42. * Test code.
  43. */
  44. /* lib tests */
  45. int arraytest(int, char **);
  46. int bitmaptest(int, char **);
  47. int queuetest(int, char **);
  48. /* thread tests */
  49. int threadtest(int, char **);
  50. int threadtest2(int, char **);
  51. int threadtest3(int, char **);
  52. int semtest(int, char **);
  53. int locktest(int, char **);
  54. int cvtest(int, char **);
  55. #ifdef UW
  56. /* Another thread and synchronization test */
  57. int uwlocktest1(int, char **);
  58. /* Used to test uw-vmstats */
  59. int uwvmstatstest(int, char **);
  60. #endif
  61. /* filesystem tests */
  62. int fstest(int, char **);
  63. int readstress(int, char **);
  64. int writestress(int, char **);
  65. int writestress2(int, char **);
  66. int createstress(int, char **);
  67. int printfile(int, char **);
  68. /* other tests */
  69. int malloctest(int, char **);
  70. int mallocstress(int, char **);
  71. int nettest(int, char **);
  72. /* Routine for running a user-level program. */
  73. int runprogram(char * progname, int argc, char ** argv);
  74. /* Kernel menu system. */
  75. void menu(char *argstr);
  76. /* The main function, called from start.S. */
  77. void kmain(char *bootstring);
  78. #endif /* _TEST_H_ */