1. 07 9月, 2018 10 次提交
  2. 06 9月, 2018 14 次提交
  3. 05 9月, 2018 12 次提交
  4. 04 9月, 2018 4 次提交
    • D
      tests: rewrite socket to do something sensible and reliable · 39015a6f
      Daniel P. Berrangé 提交于
      The current socket test is rather crazy in that it sets up a server
      listening for sockets and then runs a client connect call, relying on
      the fact that the kernel will accept this despite the application
      not having called accept() yet. It then closes the client socket and
      calls accept() on the server. On Linux accept() will always see that
      the client has gone and so skip the rest of the code. On FreeBSD,
      however, the accept sometimes succeeds, causing us to then go into
      code that attempts to read and write to the client which will fail
      aborting the test. The accept() never succeeds on FreeBSD guests
      with a single CPU, but as you add more CPUs, accept() becomes more and
      more likely to succeed, giving a 100% failure rate for the test when
      using 8 CPUs.
      
      This completely rewrites the test so that it is avoids this designed in
      race condition. We simply spawn a background thread to act as the
      client, which will read a byte from the server and write it back again.
      The main thread can now properly listen and accept the client in a
      synchronous manner avoiding any races.
      Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      39015a6f
    • D
      tests: merge code for UNIX and TCP socket testing · 9e2fad87
      Daniel P. Berrangé 提交于
      The test code for UNIX and TCP sockets will need to be rewritten and
      extended later, and will benefit from code sharing.
      Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      9e2fad87
    • D
      tests: skip qemublocktest if building without YAJL · dfd282f6
      Daniel P. Berrangé 提交于
      If no JSON parser is available qemublocktest fails, so skip its execution.
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      dfd282f6
    • D
      tests: skip some unicode tests if expected output won't match · 7469aa0b
      Daniel P. Berrangé 提交于
      The expected output strings from the vshtabletest.c are created on a
      modern Linux host where unicode printing support is very good. On older
      Linux platforms, or non-Linux platforms, some unicode characters will
      not be considered printable. While the vsh table alignment code will
      stil do the right thing with escaping & aligning in this case, the
      result will not match the test's expected output.
      
      Since we know the code is working correctly, do a check with iswprint()
      to validate the platform's quality and skip the test if it fails. This
      fixes the test on FreeBSD platforms.
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      7469aa0b