On Thu, Aug 17, 2017 at 10:00 AM pengyixiang <yxpengi386@163.com> wrote:
hello, everyone!

I run
# ./run_tests.sh *.py
in
vdsm/tests/

This is not a good way to run the tests:
1. This tests installed vdsm instead of the source you may have modified
2. This tests only the test modules in tests/, but we have many other tests
    in test/ sub directories
3. This includes all python files (e.g. loopback.py) instead of the tests modules
    (e.g *_test.py) 
4. If you did not run make before this, you may be missing some generated
    files.

To run all tests you should use "make check"

To run specific test module, use "./run_tests_local.sh module_name_test.py

See tests/README for the details.

Nir


but there's some failures as follows, What may caused it ?


======================================================================
FAIL: test_close (better_asyncore_test.TestEvent)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/vdsm/tests/better_asyncore_test.py", line 38, in test_close
    self.assertFalse(event.closing)
AssertionError: True is not false

======================================================================
FAIL: test_close (better_asyncore_test.TestReactor)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/vdsm/tests/better_asyncore_test.py", line 68, in test_close
    self.assertFalse(reactor._wakeupEvent.closing)
AssertionError: True is not false
-------------------- >> begin captured logging << --------------------
2017-08-17 14:38:45,071 DEBUG   [root] (test ractor) START thread <Thread(test ractor, started daemon 140473908700928)> (func=<bound method Reactor.process_requests of <yajsonrpc.betterAsyncore.Reactor object at 0x7fc2a16e8190>>, args=(), kwargs={})
2017-08-17 14:38:45,072 DEBUG   [root] (test ractor) FINISH thread <Thread(test ractor, started daemon 140473908700928)>
--------------------- >> end captured logging << ---------------------

======================================================================
FAIL: Verify that the connection with a valid client certificate
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/vdsm/tests/ssl_test.py", line 247, in testConnectWithCertificateSucceeds
    self.assertEqual(rc, 0)
AssertionError: 1 != 0
-------------------- >> begin captured stdout << ---------------------
command=['openssl', 's_client', '-connect', '127.0.0.1:8443', '-cert', '/tmp/tmps23UUW', '-key', '/tmp/tmpvY6GzG']
rc=1
out=CONNECTED(00000003)
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 0 bytes and written 289 bytes
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
SSL-Session:
    Protocol  : TLSv1.2
    Cipher    : 0000
    Session-ID:
    Session-ID-ctx:
    Master-Key:
    Key-Arg   : None
    PSK identity: None
    PSK identity hint: None
    SRP username: None
    Start Time: 1502951954
    Timeout   : 300 (sec)
    Verify return code: 0 (ok)
---

err=write:errno=104


--------------------- >> end captured stdout << ----------------------

======================================================================
FAIL: Verify that SSL the session identifier is preserved when
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/vdsm/tests/ssl_test.py", line 269, in testSessionIsCached
    self.assertEqual(rc, 0)
AssertionError: 1 != 0
-------------------- >> begin captured stdout << ---------------------
command=['openssl', 's_client', '-connect', '127.0.0.1:8443', '-cert', '/tmp/tmpTmZHrO', '-key', '/tmp/tmpK49hsw', '-sess_out', '/tmp/tmpI9Oa_A']
rc=1
out=CONNECTED(00000003)
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 0 bytes and written 289 bytes
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
SSL-Session:
    Protocol  : TLSv1.2
    Cipher    : 0000
    Session-ID:
    Session-ID-ctx:
    Master-Key:
    Key-Arg   : None
    PSK identity: None
    PSK identity hint: None
    SRP username: None
    Start Time: 1502951958
    Timeout   : 300 (sec)
    Verify return code: 0 (ok)
---

err=write:errno=104


--------------------- >> end captured stdout << ----------------------

----------------------------------------------------------------------
Ran 2866 tests in 131.761s

FAILED (SKIP=164, failures=4)



 

_______________________________________________
Devel mailing list
Devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/devel