1. 16 8月, 2018 3 次提交
  2. 15 8月, 2018 15 次提交
  3. 03 8月, 2018 2 次提交
  4. 31 7月, 2018 1 次提交
  5. 30 7月, 2018 4 次提交
  6. 28 7月, 2018 1 次提交
  7. 25 7月, 2018 5 次提交
    • D
      tests: fix TLS handshake failure with TLS 1.3 · db0a8c70
      Daniel P. Berrangé 提交于
      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: NEric Blake <eblake@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      db0a8c70
    • D
      tests: use error_abort in places expecting errors · 68db1318
      Daniel P. Berrangé 提交于
      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: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Tested-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      68db1318
    • D
      tests: don't silence error reporting for all tests · 977a7204
      Daniel P. Berrangé 提交于
      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 28017e01
        Author: Paolo Bonzini <pbonzini@redhat.com>
        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: NPaolo Bonzini <pbonzini@redhat.com>
          Message-Id: <1477326663-67817-3-git-send-email-pbonzini@redhat.com>
      
      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: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Tested-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      977a7204
    • D
      tests: call qcrypto_init instead of gnutls_global_init · dbddad70
      Daniel P. Berrangé 提交于
      Calling qcrypto_init ensures that all relevant initialization is
      done. In particular this honours the debugging settings and thread
      settings.
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Tested-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      dbddad70
    • P
      tests: only update last_byte when at the edge · 829db8b4
      Peter Xu 提交于
      The only possible change of last_byte is when it reaches the edge.
      Setting it every time might let last_byte contain an invalid data when
      memory corruption is detected, then the check of the next byte will be
      incorrect.  For example, a single page corruption at address 0x14ad000
      will also lead to a "fake" corruption at 0x14ae000:
      
        Memory content inconsistency at 14ad000 first_byte = 44 last_byte = 44 current = ef hit_edge = 0
        Memory content inconsistency at 14ae000 first_byte = 44 last_byte = ef current = 44 hit_edge = 0
      
      After the patch, it'll only report the corrputed page:
      
        Memory content inconsistency at 14ad000 first_byte = 44 last_byte = 44 current = ef hit_edge = 0
      Signed-off-by: NPeter Xu <peterx@redhat.com>
      Message-Id: <20180723123305.24792-4-peterx@redhat.com>
      Reviewed-by: NJuan Quintela <quintela@redhat.com>
      Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      829db8b4
  8. 24 7月, 2018 9 次提交