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

utest/core

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.

Notes

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.