]>
git.saurik.com Git - apple/xnu.git/blob - tools/tests/xnu_quick_test/tests.h
4 #ifndef CONFORMANCE_TESTS_IN_XNU
5 #define CONFORMANCE_TESTS_IN_XNU 0
7 #ifndef TEST_SYSTEM_CALLS
8 #define TEST_SYSTEM_CALLS 0
13 #include <signal.h> /* Install signal handlers*/
19 #include <stdarg.h> /* Used to support printf() in misc.c */
20 #include <mach/machine.h> /* Used to determine host properties */
21 #include <mach/vm_inherit.h>
25 #include <sys/dirent.h>
28 #include <sys/kauth.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>
39 #include <sys/syscall.h>
40 #include <sys/sysctl.h> /* Used to determine host properties */
41 #include <sys/syslimits.h>
43 #include <sys/ttycom.h>
44 #include <sys/types.h>
45 #include <sys/ucred.h>
46 #include <sys/vnode.h>
48 #include <TargetConditionals.h> /* for TARGET_OS_EMBEDDED */
50 #define MY_BUFFER_SIZE (1024 * 10)
51 #define ARM 100 /* I am not sure if the value really matters? */
52 #define POWERPC 238947
53 #define INTEL 38947 /*
54 * Random values used by execve tests to
55 * determine architecture of machine.
58 typedef int (*test_rtn_t
)(void *);
60 int access_chmod_fchmod_test( void * the_argp
);
61 int acct_test( void * the_argp
);
62 int aio_tests( void * the_argp
);
63 int bsd_shm_tests( void * the_argp
);
64 int chdir_fchdir_test( void * the_argp
);
65 int chflags_fchflags_test( void * the_argp
);
66 int chroot_test( void * the_argp
);
67 int chown_fchown_lchown_lstat_symlink_test( void * the_argp
);
68 int create_file_with_name( char *the_pathp
, char *the_namep
, int remove_existing
);
69 int create_random_name( char *the_pathp
, int do_open
);
70 int directory_tests( void * the_argp
);
71 int do_execve_test(char * path
, char * argv
[], void * envpi
, int killwait
);
72 int dup_test( void * the_argp
);
73 int exchangedata_test( void * the_argp
);
74 int execve_kill_vfork_test( void * the_argp
);
75 int fcntl_test( void * the_argp
);
76 int fork_wait4_exit_test( void * the_argp
);
77 int fs_stat_tests( void * the_argp
);
78 int get_architecture(void); /* Intel or PPC */
79 int get_bits(void); /* 64 or 32 */
80 int getlogin_setlogin_test( void * the_argp
);
81 int getpid_getppid_pipe_test( void * the_argp
);
82 int getpriority_setpriority_test( void * the_argp
);
83 int getrusage_test( void * the_argp
);
84 int groups_test( void * the_argp
);
85 int ioctl_test( void * the_argp
);
86 int kqueue_tests( void * the_argp
);
87 int limit_tests( void * the_argp
);
88 int link_stat_unlink_test( void * the_argp
);
89 int locking_test( void * the_argp
);
90 int memory_tests( void * the_argp
);
91 int message_queue_tests( void * the_argp
);
92 int mkdir_rmdir_umask_test( void * the_argp
);
93 int mkfifo_test( void * the_argp
);
94 int mknod_sync_test( void * the_argp
);
95 int open_close_test( void * the_argp
);
96 int process_group_test( void * the_argp
);
97 int quotactl_test( void * the_argp
);
98 int read_write_test( void * the_argp
);
99 int rename_test( void * the_argp
);
100 int searchfs_test( void * the_argp
);
101 int sema_tests( void * the_argp
);
102 int sema2_tests( void * the_argp
);
103 int shm_tests( void * the_argp
);
104 int signals_test( void * the_argp
);
105 int socket_tests( void * the_argp
);
106 int socket2_tests( void * the_argp
);
107 int syscall_test( void * the_argp
);
108 int time_tests( void * the_argp
);
109 int uid_tests( void * the_argp
);
110 int xattr_tests( void * the_argp
);
111 int data_exec_tests( void * the_argp
);
112 int machvm_tests( void * the_argp
);
113 int getdirentries_test( void * the_argp
);
114 int statfs_32bit_inode_tests( void * the_argp
);
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 */
123 typedef struct test_entry
* test_entryp
;
125 /* Special replacement printf with date/time stamp */
126 int my_printf(const char * __restrict fmt
, ...);
127 #define printf my_printf
129 #endif /* !_TESTS_H_ */