tree: 00adb747e2c624aafa8464fcaa88315577fe3a26 [path history] [tgz]
  1. bad-syscall/
  2. bti/
  3. c11-condvar/
  4. c11-mutex/
  5. c11-thread/
  6. channel/
  7. channel-call-etc/
  8. channel-iovec/
  9. channel-write-etc/
  10. clock/
  11. debuglog/
  12. default-exception-handler/
  13. elf-tls/
  14. event-pair/
  15. fifo/
  16. fpu/
  17. futex/
  18. handle-close/
  19. handle-dup/
  20. handle-info/
  21. handle-transfer/
  22. handle-wait/
  23. interrupt/
  24. job/
  25. kernel-unittests/
  26. memory-mapping/
  27. object-child/
  28. object-info/
  29. object-wait/
  30. page-size/
  31. pager/
  32. port/
  33. process/
  34. profile/
  35. pthread/
  36. pthread-barrier/
  37. pthread-tls/
  38. resource/
  39. socket/
  40. stack/
  41. stream/
  42. sync-completion/
  43. sync-condition/
  44. sync-mutex/
  45. system-event/
  46. threads/
  47. time/
  48. version/
  49. vmar/
  50. vmo/
  52. libc-and-io-stubs.c
  53. OWNERS
  55. test-main-with-filter.c


The “core” tests exist for one main purpose: To test basic functionality when things like devmgr aren't working.

If the kernel is told to run core-tests instead of devmgr, these tests will run without any userspace device manager, device drivers, io plumbing, etc.

Example usage

fx set core.x64   # any of {bringup,core}.{x64,arm64} are fine too.
fx build
fx core-tests [--gtest_filter=FILTER] [--gtest_repeat=REPEAT]

The helper fx command runs AEMU providing the specially-built core-tests.zbi as a -z argument.

Only a subset of tests can be specified by gtest_filter, e.g. --gtest_filter="FutexTest.*"

Tests can be rerun with gtest_repeat, e.g. --gtest_repeat=100 to run all tests 100 times or --gtest_repeat=-1 to run all tests until a test fails.


The tests here are for “core” functionality (channels, etc.), but not all “core” functionality can go here. For example, you can‘t start a process in your test with launchpad because core tests are for when that functionality isn’t working. Core tests can't use fdio and launchpad uses fdio.

Since these tests can't use fdio core/libc-and-io-stubs.c stubs out the needed functions from fdio.