6d6218976d
This update consists of: -- TAP13 framework API and converting tests to TAP13 continues. A few more tests are converted and kselftest common RUN_TESTS in lib.mk is enhanced to print TAP13 to cover test shell scripts that won't be able to use kselftest API. -- Several fixes to existing tests to not fail in unsupported cases. This has been an ongoing work based on the feedback from stable release kselftest users. -- A new watchdog test and much needed cleanups to the existing tests from Eugeniu Rosca. -- Changes to kselftest common lib.mk framework to make RUN_TESTS a function to be called from individual test make files to run stress and destructive sub-tests. -----BEGIN PGP SIGNATURE----- iQIcBAABCAAGBQJZssCNAAoJEAsCRMQNDUMcYKIQAI0z63hsXAXuBO5ZPBEEwjzn +sLudsF6PLB4DjbRsGO/S8EXiYW+BZf7Ny3qYO838aUsZFia3w5AhRq91tTf0WzW e41qj5AA/y2YaJDL/Q3oebyj4JzhhhkfjNLEap0vfwNDzVlr9mEXO3sfspFe7pWz hAWGPXS8W4O6ZmIFHUwkYdoJhYp9s6vysyO5ZXh9TEbSUnytlYJ35Y2vaDEfHWyR DbBj8FOgZhmud4aVbAQ5kOH/rB+rRCYgptF3VUmlyOOHJA7QbQofChDkA0G2WcSZ 4zoGSah/Kx9C3+H3o7u/FyoMXCiJYr49z1Mzgpf3193gIdH694DbDT9mqZtBgDbt 0irjg2BNmv/8SdX0fudSj7hbt9uTjGYshl48jlKYU+/d/0jtepV1NUMF7zoYYdNN PhT2lUR799M09+0+O6kJ7ESkiVLriVkkY0ORW9qGuD2FxLRk0XJzrAacrD5DsEgk 6Hq/mA1v4HsvoeSZz+2AIMrrQcAsCVWXuseWsN88EU+HPMaKVclcZQ10fXI3zHB+ BtCiYz9xI+E1sI4MLeSqg2nxZhLhM1Jx+RZA6W38fZIxeaUsItt3OxTFMOFDMky+ Ahqb+CCCxS8ai7hy9XNBIh1BRjXPbZJCILTdjy82S+xNSRU8qbO7qF3+eoRGP1dB UWdB0+1ftkyf8CbqqC60 =RVb5 -----END PGP SIGNATURE----- Merge tag 'linux-kselftest-4.14-rc1-update' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull kselftest updates from Shuah Khan: - TAP13 framework API and converting tests to TAP13 continues. A few more tests are converted and kselftest common RUN_TESTS in lib.mk is enhanced to print TAP13 to cover test shell scripts that won't be able to use kselftest API. - Several fixes to existing tests to not fail in unsupported cases. This has been an ongoing work based on the feedback from stable release kselftest users. - A new watchdog test and much needed cleanups to the existing tests from Eugeniu Rosca. - Changes to kselftest common lib.mk framework to make RUN_TESTS a function to be called from individual test make files to run stress and destructive sub-tests. * tag 'linux-kselftest-4.14-rc1-update' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (41 commits) selftests: Enhance kselftest_harness.h to print which assert failed selftests: lib.mk: change RUN_TESTS to print messages in TAP13 format selftests: change lib.mk RUN_TESTS to take test list as an argument selftests: lib.mk: suppress "cd" output from run_tests target selftests: kselftest framework: change skip exit code to 0 selftests/timers: make loop consistent with array size selftests: timers: remove rtctest_setdate from run_destructive_tests selftests: timers: Fix run_destructive_tests target to handle skipped tests kselftests: timers: leap-a-day: Change default arguments to help test runs selftests: timers: drop support for !KTEST case rtc: rtctest: Improve support detection selftests/cpu-hotplug: Skip test when there is only one online cpu selftests/cpu-hotplug: exit with failure when test occured unexpected behaviors selftests: futex: convert test to use ksft TAP13 framework selftests: capabilities: convert error output to TAP13 ksft framework selftests: memfd: Align STACK_SIZE for ARM AArch64 system selftests: warn if failure is due to lack of executable bit selftests: kselftest framework: add error counter selftests: capabilities: convert the test to use TAP13 ksft framework selftests: capabilities: fix to run Non-root +ia, sgidroot => i test ... |
||
---|---|---|
.. | ||
functional | ||
include | ||
Makefile | ||
README | ||
run.sh |
README
Futex Test ========== Futex Test is intended to thoroughly test the Linux kernel futex system call API. Functional tests shall test the documented behavior of the futex operation code under test. This includes checking for proper behavior under normal use, odd corner cases, regression tests, and abject abuse and misuse. Futextest will also provide example implementation of mutual exclusion primitives. These can be used as is in user applications or can serve as examples for system libraries. These will likely be added to either a new lib/ directory or purely as header files under include/, I'm leaning toward the latter. Quick Start ----------- # make # ./run.sh Design and Implementation Goals ------------------------------- o Tests should be as self contained as is practical so as to facilitate sharing the individual tests on mailing list discussions and bug reports. o The build system shall remain as simple as possible, avoiding any archive or shared object building and linking. o Where possible, any helper functions or other package-wide code shall be implemented in header files, avoiding the need to compile intermediate object files. o External dependencies shall remain as minimal as possible. Currently gcc and glibc are the only dependencies. o Tests return 0 for success and < 0 for failure. Output Formatting ----------------- Test output shall be easily parsable by both human and machine. Title and results are printed to stdout, while intermediate ERROR or FAIL messages are sent to stderr. Tests shall support the -c option to print PASS, FAIL, and ERROR strings in color for easy visual parsing. Output shall conform to the following format: test_name: Description of the test Arguments: arg1=val1 #units specified for clarity where appropriate ERROR: Description of unexpected error FAIL: Reason for test failure # FIXME: Perhaps an " INFO: informational message" option would be # useful here. Using -v to toggle it them on and off, as with -c. # there may be multiple ERROR or FAIL messages Result: (PASS|FAIL|ERROR) Naming ------ o FIXME: decide on a sane test naming scheme. Currently the tests are named based on the primary futex operation they test. Eventually this will become a problem as we intend to write multiple tests which collide in this namespace. Perhaps something like "wait-wake-1" "wait-wake-2" is adequate, leaving the detailed description in the test source and the output. Coding Style ------------ o The Futex Test project adheres to the coding standards set forth by Linux kernel as defined in the Linux source Documentation/process/coding-style.rst.