README 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. Futex Test
  2. ==========
  3. Futex Test is intended to thoroughly test the Linux kernel futex system call
  4. API.
  5. Functional tests shall test the documented behavior of the futex operation
  6. code under test. This includes checking for proper behavior under normal use,
  7. odd corner cases, regression tests, and abject abuse and misuse.
  8. Futextest will also provide example implementation of mutual exclusion
  9. primitives. These can be used as is in user applications or can serve as
  10. examples for system libraries. These will likely be added to either a new lib/
  11. directory or purely as header files under include/, I'm leaning toward the
  12. latter.
  13. Quick Start
  14. -----------
  15. # make
  16. # ./run.sh
  17. Design and Implementation Goals
  18. -------------------------------
  19. o Tests should be as self contained as is practical so as to facilitate sharing
  20. the individual tests on mailing list discussions and bug reports.
  21. o The build system shall remain as simple as possible, avoiding any archive or
  22. shared object building and linking.
  23. o Where possible, any helper functions or other package-wide code shall be
  24. implemented in header files, avoiding the need to compile intermediate object
  25. files.
  26. o External dependencies shall remain as minimal as possible. Currently gcc
  27. and glibc are the only dependencies.
  28. o Tests return 0 for success and < 0 for failure.
  29. Output Formatting
  30. -----------------
  31. Test output shall be easily parsable by both human and machine. Title and
  32. results are printed to stdout, while intermediate ERROR or FAIL messages are
  33. sent to stderr. Tests shall support the -c option to print PASS, FAIL, and
  34. ERROR strings in color for easy visual parsing. Output shall conform to the
  35. following format:
  36. test_name: Description of the test
  37. Arguments: arg1=val1 #units specified for clarity where appropriate
  38. ERROR: Description of unexpected error
  39. FAIL: Reason for test failure
  40. # FIXME: Perhaps an " INFO: informational message" option would be
  41. # useful here. Using -v to toggle it them on and off, as with -c.
  42. # there may be multiple ERROR or FAIL messages
  43. Result: (PASS|FAIL|ERROR)
  44. Naming
  45. ------
  46. o FIXME: decide on a sane test naming scheme. Currently the tests are named
  47. based on the primary futex operation they test. Eventually this will become a
  48. problem as we intend to write multiple tests which collide in this namespace.
  49. Perhaps something like "wait-wake-1" "wait-wake-2" is adequate, leaving the
  50. detailed description in the test source and the output.
  51. Coding Style
  52. ------------
  53. o The Futex Test project adheres to the coding standards set forth by Linux
  54. kernel as defined in the Linux source Documentation/process/coding-style.rst.