[ovirt-devel] [VDSM] Running make check on *your* development machine

Nir Soffer nsoffer at redhat.com
Tue Dec 29 16:29:45 UTC 2015


Hi all,

Recently we added a new test, breaking make check when run on a development
machine as non-privileged user.
https://gerrit.ovirt.org/50984

This test pass on the CI environment, because the tests are running as root.

Please verify that "make check" is successful on your development environment.
otherwise, you may break the tests for others using this practice.


Best practice for running the tests:

1. Run the tests for the module you change:

$ ./run_tests_local.sh rwlock_test.py
nose.config: INFO: Ignoring files matching ['^\\.', '^_', '^setup\\.py$']
rwlock_test.RWLockStressTests
    test_fairness(1, 2)                                         SKIP:
Stress tests are disabled
    test_fairness(2, 8)                                         SKIP:
Stress tests are disabled
    test_fairness(3, 32)                                        SKIP:
Stress tests are disabled
    test_fairness(4, 128)                                       SKIP:
Stress tests are disabled
rwlock_test.RWLockTests
    test_concurrent_readers                                     OK
    test_demotion_no_waiters                                    OK
    test_demotion_with_blocked_reader                           SKIP:
Slow tests are disabled
    test_demotion_with_blocked_writer                           SKIP:
Slow tests are disabled
    test_exclusive_context_blocks_reader                        SKIP:
Slow tests are disabled
    test_exclusive_context_blocks_writer                        SKIP:
Slow tests are disabled
    test_fifo                                                   SKIP:
Slow tests are disabled
    test_promotion_forbidden                                    OK
    test_recursive_read_lock                                    OK
    test_recursive_write_lock                                   OK
    test_release_other_thread_read_lock                         OK
    test_release_other_thread_write_lock                        OK
    test_shared_context_allows_reader                           OK
    test_shared_context_blocks_writer                           SKIP:
Slow tests are disabled
    test_wakeup_all_blocked_readers                             SKIP:
Slow tests are disabled
    test_wakeup_blocked_reader                                  SKIP:
Slow tests are disabled
    test_wakeup_blocked_writer                                  SKIP:
Slow tests are disabled

----------------------------------------------------------------------
Ran 21 tests in 0.005s

This should be very fast and should run after every change.

2. Check that slow and stress tests pass

Some modules have @slowtest and @stresstest, which are skipped by default.
When modifying such modules, enable also these tests:

$ ./run_tests_local.sh rwlock_test.py --enable-slow-tests --enable-stress-tests
nose.config: INFO: Ignoring files matching ['^\\.', '^_', '^setup\\.py$']
rwlock_test.RWLockStressTests
    test_fairness(1, 2)                                         OK
    test_fairness(2, 8)                                         OK
    test_fairness(3, 32)                                        OK
    test_fairness(4, 128)                                       OK
rwlock_test.RWLockTests
    test_concurrent_readers                                     OK
    test_demotion_no_waiters                                    OK
    test_demotion_with_blocked_reader                           SKIP:
Known issue in current code
    test_demotion_with_blocked_writer                           OK
    test_exclusive_context_blocks_reader                        OK
    test_exclusive_context_blocks_writer                        OK
    test_fifo                                                   OK
    test_promotion_forbidden                                    OK
    test_recursive_read_lock                                    OK
    test_recursive_write_lock                                   OK
    test_release_other_thread_read_lock                         OK
    test_release_other_thread_write_lock                        OK
    test_shared_context_allows_reader                           OK
    test_shared_context_blocks_writer                           OK
    test_wakeup_all_blocked_readers                             OK
    test_wakeup_blocked_reader                                  OK
    test_wakeup_blocked_writer                                  OK

----------------------------------------------------------------------
Ran 21 tests in 14.054s

This may take more time.

3. When the module tests pass, run "make check"

    make check

This takes about 90 seconds.

To run all tests, including slow and stress tests, use:

    make check-all

This may take couple of minutes, so it is not recommended.

Thanks,
Nir



More information about the Devel mailing list