[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [qemu/qemu] dbddad: tests: call qcrypto_init instead of g
From: |
GitHub |
Subject: |
[Qemu-commits] [qemu/qemu] dbddad: tests: call qcrypto_init instead of gnutls_global_... |
Date: |
Tue, 24 Jul 2018 12:16:04 -0700 |
Branch: refs/heads/master
Home: https://github.com/qemu/qemu
Commit: dbddad702630bc2d8dd20f6d0d8076ccb8831a7f
https://github.com/qemu/qemu/commit/dbddad702630bc2d8dd20f6d0d8076ccb8831a7f
Author: Daniel P. Berrangé <address@hidden>
Date: 2018-07-24 (Tue, 24 Jul 2018)
Changed paths:
M include/crypto/init.h
M tests/crypto-tls-x509-helpers.c
Log Message:
-----------
tests: call qcrypto_init instead of gnutls_global_init
Calling qcrypto_init ensures that all relevant initialization is
done. In particular this honours the debugging settings and thread
settings.
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Tested-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Daniel P. Berrangé <address@hidden>
Commit: 977a7204ab69a3591c4c6ed698abb8a6ee673679
https://github.com/qemu/qemu/commit/977a7204ab69a3591c4c6ed698abb8a6ee673679
Author: Daniel P. Berrangé <address@hidden>
Date: 2018-07-24 (Tue, 24 Jul 2018)
Changed paths:
M stubs/error-printf.c
M tests/test-vmstate.c
Log Message:
-----------
tests: don't silence error reporting for all tests
The test-vmstate test is a bit chatty because it triggers various
expected failure scenarios and the code in question uses error_report
instead of accepting 'Error **errp' parameters. To silence this test the
stubs for error_vprintf() were changed to send errors via
g_test_message() instead of stderr:
commit 28017e010ddf6849cfa830e898da3e44e6610952
Author: Paolo Bonzini <address@hidden>
Date: Mon Oct 24 18:31:03 2016 +0200
tests: send error_report to test log
Implement error_vprintf to send the output of error_report to
the test log. This silences test-vmstate.
Signed-off-by: Paolo Bonzini <address@hidden>
Message-Id: <address@hidden>
Unfortunately this change has global impact across the entire test suite
and means that when tests fail for unexpected reasons, the message is
not displayed on stderr. eg when using &error_abort in a call the test
merely prints
Unexpected error in qcrypto_tls_session_check_certificate() at
crypto/tlssession.c:280:
and the actual error message is hidden, making it impossible to diagnose
the failure. This is especially problematic in CI or build systems where
it isn't possible to easily pass the --debug-log flag to tests and
re-run with the test log visible.
This change makes the previous big hammer much more nuanced, providing a
flag in the stub error_vprintf() that can used on a per-test basis to
silence the errors. Only the test-vmstate silences errors initially.
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Tested-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Daniel P. Berrangé <address@hidden>
Commit: 68db13183f2d3193476f5d5457c47fa10ba0f9e3
https://github.com/qemu/qemu/commit/68db13183f2d3193476f5d5457c47fa10ba0f9e3
Author: Daniel P. Berrangé <address@hidden>
Date: 2018-07-24 (Tue, 24 Jul 2018)
Changed paths:
M tests/test-crypto-tlscredsx509.c
M tests/test-crypto-tlssession.c
M tests/test-io-channel-tls.c
Log Message:
-----------
tests: use error_abort in places expecting errors
Most of the TLS related tests are passing an in a "Error" object to
methods that are expected to fail, but then ignoring any error that is
set and instead asserting on a return value. This means that when an
error is unexpectedly raised, no information about it is printed out,
making failures hard to diagnose. Changing these tests to pass in
&error_abort will make unexpected failures print messages to stderr.
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Tested-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Daniel P. Berrangé <address@hidden>
Commit: db0a8c70f25fe497c4b786d8edac063daa744c0d
https://github.com/qemu/qemu/commit/db0a8c70f25fe497c4b786d8edac063daa744c0d
Author: Daniel P. Berrangé <address@hidden>
Date: 2018-07-24 (Tue, 24 Jul 2018)
Changed paths:
M tests/test-crypto-tlssession.c
Log Message:
-----------
tests: fix TLS handshake failure with TLS 1.3
When gnutls negotiates TLS 1.3 instead of 1.2, the order of messages
sent by the handshake changes. This exposed a logic bug in the test
suite which caused us to wait for the server to see handshake
completion, but not wait for the client to see completion. The result
was the client didn't receive the certificate for verification and the
test failed.
This is exposed in Fedora 29 rawhide which has just enabled TLS 1.3 in
its GNUTLS builds.
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Daniel P. Berrangé <address@hidden>
Commit: debe96fdeca911247d4b4862ce0a2a5bc27d6b35
https://github.com/qemu/qemu/commit/debe96fdeca911247d4b4862ce0a2a5bc27d6b35
Author: Peter Maydell <address@hidden>
Date: 2018-07-24 (Tue, 24 Jul 2018)
Changed paths:
M include/crypto/init.h
M stubs/error-printf.c
M tests/crypto-tls-x509-helpers.c
M tests/test-crypto-tlscredsx509.c
M tests/test-crypto-tlssession.c
M tests/test-io-channel-tls.c
M tests/test-vmstate.c
Log Message:
-----------
Merge remote-tracking branch
'remotes/berrange/tags/qcrypto-next-pull-request' into staging
Fix unit test compatibility with TLS 1.3
# gpg: Signature made Tue 24 Jul 2018 17:44:14 BST
# gpg: using RSA key BE86EBB415104FDF
# gpg: Good signature from "Daniel P. Berrange <address@hidden>"
# gpg: aka "Daniel P. Berrange <address@hidden>"
# Primary key fingerprint: DAF3 A6FD B26B 6291 2D0E 8E3F BE86 EBB4 1510 4FDF
* remotes/berrange/tags/qcrypto-next-pull-request:
tests: fix TLS handshake failure with TLS 1.3
tests: use error_abort in places expecting errors
tests: don't silence error reporting for all tests
tests: call qcrypto_init instead of gnutls_global_init
Signed-off-by: Peter Maydell <address@hidden>
Compare: https://github.com/qemu/qemu/compare/3bae150448db...debe96fdeca9
**NOTE:** This service been marked for deprecation:
https://developer.github.com/changes/2018-04-25-github-services-deprecation/
Functionality will be removed from GitHub.com on January 31st, 2019.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-commits] [qemu/qemu] dbddad: tests: call qcrypto_init instead of gnutls_global_...,
GitHub <=