]> git.saurik.com Git - apple/xnu.git/blame - tools/tests/xnu_quick_test/tests.h
xnu-1456.1.26.tar.gz
[apple/xnu.git] / tools / tests / xnu_quick_test / tests.h
CommitLineData
2d21ac55
A
1#ifndef _TESTS_H_
2#define _TESTS_H_
3
2d21ac55
A
4#ifndef CONFORMANCE_TESTS_IN_XNU
5#define CONFORMANCE_TESTS_IN_XNU 0
6#endif
7#ifndef TEST_SYSTEM_CALLS
8#define TEST_SYSTEM_CALLS 0
9#endif
10
11#include <errno.h>
12#include <fcntl.h>
13#include <signal.h> /* Install signal handlers*/
14#include <spawn.h>
15#include <stdio.h>
16#include <stdlib.h>
17#include <string.h>
18#include <unistd.h>
b0d623f7 19#include <stdarg.h> /* Used to support printf() in misc.c */
2d21ac55
A
20#include <mach/machine.h> /* Used to determine host properties */
21#include <mach/vm_inherit.h>
22#include <sys/acct.h>
23#include <sys/aio.h>
24#include <sys/attr.h>
25#include <sys/dirent.h>
26#include <sys/disk.h>
27#include <sys/uio.h>
28#include <sys/kauth.h>
29#include <sys/mman.h>
30#include <sys/mount.h>
31#include <sys/param.h>
32#include <sys/ptrace.h>
33#include <sys/quota.h>
34#include <sys/resource.h>
35#include <sys/select.h>
36#include <sys/signal.h>
37#include <sys/socket.h>
38#include <sys/stat.h>
39#include <sys/syscall.h>
40#include <sys/sysctl.h> /* Used to determine host properties */
41#include <sys/syslimits.h>
42#include <sys/time.h>
43#include <sys/ttycom.h>
44#include <sys/types.h>
45#include <sys/ucred.h>
46#include <sys/vnode.h>
47#include <sys/wait.h>
cf7d32b8
A
48#include <TargetConditionals.h> /* for TARGET_OS_EMBEDDED */
49
2d21ac55 50#define MY_BUFFER_SIZE (1024 * 10)
cf7d32b8 51#define ARM 100 /* I am not sure if the value really matters? */
2d21ac55
A
52#define POWERPC 238947
53#define INTEL 38947 /*
54 * Random values used by execve tests to
55 * determine architecture of machine.
56 */
57
58typedef int (*test_rtn_t)(void *);
59
60int access_chmod_fchmod_test( void * the_argp );
61int acct_test( void * the_argp );
62int aio_tests( void * the_argp );
63int bsd_shm_tests( void * the_argp );
64int chdir_fchdir_test( void * the_argp );
65int chflags_fchflags_test( void * the_argp );
66int chroot_test( void * the_argp );
67int chown_fchown_lchown_lstat_symlink_test( void * the_argp );
68int create_file_with_name( char *the_pathp, char *the_namep, int remove_existing );
69int create_random_name( char *the_pathp, int do_open );
70int directory_tests( void * the_argp );
71int do_execve_test(char * path, char * argv[], void * envpi, int killwait);
72int dup_test( void * the_argp );
73int exchangedata_test( void * the_argp );
74int execve_kill_vfork_test( void * the_argp );
75int fcntl_test( void * the_argp );
76int fork_wait4_exit_test( void * the_argp );
77int fs_stat_tests( void * the_argp );
78int get_architecture(void); /* Intel or PPC */
79int get_bits(void); /* 64 or 32 */
80int getlogin_setlogin_test( void * the_argp );
81int getpid_getppid_pipe_test( void * the_argp );
82int getpriority_setpriority_test( void * the_argp );
b0d623f7 83int getrusage_test( void * the_argp );
2d21ac55
A
84int groups_test( void * the_argp );
85int ioctl_test( void * the_argp );
86int kqueue_tests( void * the_argp );
87int limit_tests( void * the_argp );
88int link_stat_unlink_test( void * the_argp );
89int locking_test( void * the_argp );
90int memory_tests( void * the_argp );
91int message_queue_tests( void * the_argp );
92int mkdir_rmdir_umask_test( void * the_argp );
93int mkfifo_test( void * the_argp );
94int mknod_sync_test( void * the_argp );
95int open_close_test( void * the_argp );
96int process_group_test( void * the_argp );
97int quotactl_test( void * the_argp );
98int read_write_test( void * the_argp );
99int rename_test( void * the_argp );
100int searchfs_test( void * the_argp );
101int sema_tests( void * the_argp );
102int sema2_tests( void * the_argp );
103int shm_tests( void * the_argp );
104int signals_test( void * the_argp );
105int socket_tests( void * the_argp );
106int socket2_tests( void * the_argp );
107int syscall_test( void * the_argp );
108int time_tests( void * the_argp );
109int uid_tests( void * the_argp );
110int xattr_tests( void * the_argp );
b0d623f7
A
111int data_exec_tests( void * the_argp );
112int machvm_tests( void * the_argp );
113int getdirentries_test( void * the_argp );
114int statfs_32bit_inode_tests( void * the_argp );
2d21ac55
A
115
116struct test_entry
117{
118 int test_run_it; /* 0 means do not run this test, else run it */
119 test_rtn_t test_routine; /* routine to call */
120 void * test_input; /* optional input to test_routine */
121 char * test_infop; /* information about what is tested */
122};
123typedef struct test_entry * test_entryp;
124
b0d623f7
A
125/* Special replacement printf with date/time stamp */
126int my_printf(const char * __restrict fmt, ...);
127#define printf my_printf
128
2d21ac55 129#endif /* !_TESTS_H_ */