X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/2d21ac55c334faf3a56e5634905ed6987fc787d4..fe8ab488e9161c46dd9885d58fc52996dc0249ff:/tools/tests/xnu_quick_test/README diff --git a/tools/tests/xnu_quick_test/README b/tools/tests/xnu_quick_test/README index 06f204bc7..861df134d 100644 --- a/tools/tests/xnu_quick_test/README +++ b/tools/tests/xnu_quick_test/README @@ -3,7 +3,7 @@ honest most) system calls we support in xnu. WARNING - this is not meant to be a full regression test of all the system calls. The intent is to have a quick test of each system call that -can be run very easily and quickly when a new kerenl is built. +can be run very easily and quickly when a new kernel is built. This tool is meant to grow as we find xnu problems that could have be caught before we submit to a build train. So please add more tests and @@ -15,7 +15,7 @@ will stop running it. LP64 testing tip - when adding or modifying tests, keep in mind the variants in the LP64 world. If xnu gets passed a structure the varies in size between 32 and 64-bit processes, try to test that a field in the -sructure contains valid data. For example if we know foo structure +structure contains valid data. For example, if we know foo structure looks like: struct foo { int an_int; @@ -28,22 +28,42 @@ is 32 or 64 bits. NOTE - we have several workarounds and test exceptions for some outstanding bugs in xnu. All the workarounds are marked with "todo" and -some comments noting the radar number of the offending bug. Do a seach +some comments noting the radar number of the offending bug. Do a search for "todo" in the source files for this project to locate which tests have known failures. And please tag any new exceptions you find with "todo" in the comment and the radar number of the bug. -To build a fat binary, export ARCH="ppc ppc64 i386 x86_64". This will work -for any architectures that Apple gcc recognizes. +Building: +xnu_quick_test is built automatically by BNI for both Mac (10.9 and later), and +iOS (7 and later) trains, and is delivered on AppleInternal builds in +/AppleInternal/CoreOS/xnu_quick_test. It is built as part of the xnu_quick_test +build alias, so you can also find a copy on ~rc at: +~rc/Software/$RELEASE/Updates/$RELEASEVERSION/Roots/xnu_quick_test/AppleInternal/CoreOS/xnu_quick_test. -Added three defines which you can use at the compile line to build variants. +Alternatively you can build it yourself using make like so: +SDKROOT=/path/to/sdk make + +For example: +# build for Mac, current OS +SDKROOT=/ make +# build for iOS +SDKROOT=`xcodebuild -sdk iphoneos.internal -version Path` make + +By default xnu builds all-way fat, but you can restrict this by explicitly +specifying architectures like so: +# build for only armv7 and armv7s +SDKROOT=`xcodebuild -sdk iphoneos.internal -version Path` make ARCH="armv7 armv7s" + +There are four defines which you can use at the compile line to build variants. DEBUG turn on additional printfs CONFORMANCE_TESTS_IN_XNU when conformance tests are in xnu, set this to 1 TEST_SYSTEM_CALLS test system calls (doesn't compile; a different bug) -by default, all three are set to 0, i.e. disabled. To build, export +RUN_UNDER_TESTBOTS + when running under testbots, set this to 1 +by default, all four are set to 0, i.e. disabled. To build, export MORECFLAGS with the values you want set, e.g. export MORECFLAGS="-D DEBUG=1 -D CONFORMANCE_TESTS_IN_XNU=1" @@ -59,7 +79,8 @@ USAGE: xnu_quick_test -target TARGET_PATH -l[ist] # list all the tests this tool performs -r[un] 1, 3, 10 - 19 # run specific tests. enter individual test numbers and/or range of numbers. use -list to list tests. -s[kip] # skip setuid tests - -t[arget] TARGET_PATH # path to directory where tool will create test files. defaults to "/tmp/" + -t[arget] TARGET_PATH # path to directory where tool will create test files. defaults to "/tmp/" + -testbot # output results in CoreOS TestBot compatible format examples: --- Place all test files and directories at the root of volume "test_vol" --- @@ -82,11 +103,11 @@ List of all tests this tool performs... 8 chown, fchown, lchown, lstat, readlink, symlink 9 fstatfs, getattrlist, getfsstat, statfs 10 getpid, getppid, pipe - 11 getauid, gettid, getuid, geteuid, issetugid, setauid, seteuid, settid, settid_with_pid, setuid + 11 getauid, gettid, getuid, geteuid, issetugid, setaudit_addr, seteuid, settid, settid_with_pid, setuid 12 mkdir, rmdir, umask 13 mknod, sync 14 fsync, getsockopt, poll, select, setsockopt, socketpair - 15 accept, bind, connect, getpeername, getsockname, listen, socket, recvmsg, sendmsg, sendto + 15 accept, bind, connect, getpeername, getsockname, listen, socket, recvmsg, sendmsg, sendto, sendfile 16 chflags, fchflags 17 kill, vfork, execve 18 getegid, getgid, getgroups, setegid, setgid, setgroups