1. 16 8月, 2018 2 次提交
    • M
      tests: Clean up string interpolation into QMP input (simple cases) · 015715f5
      Markus Armbruster 提交于
      When you build QMP input manually like this
      
          cmd = g_strdup_printf("{ 'execute': 'migrate',"
                                "'arguments': { 'uri': '%s' } }",
                                uri);
          rsp = qmp(cmd);
          g_free(cmd);
      
      you're responsible for escaping the interpolated values for JSON.  Not
      done here, and therefore works only for sufficiently nice @uri.  For
      instance, if @uri contained a single "'", qobject_from_vjsonf_nofail()
      would abort.  A sufficiently nasty @uri could even inject unwanted
      members into the arguments object.
      
      Leaving interpolation into JSON to qmp() is more robust:
      
          rsp = qmp("{ 'execute': 'migrate', 'arguments': { 'uri': %s } }", uri);
      
      It's also more concise.
      
      Clean up the simple cases where we interpolate exactly a JSON value.
      
      Bonus: gets rid of non-literal format strings.  A step towards
      compile-time format string checking without triggering
      -Wformat-nonliteral.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-Id: <20180806065344.7103-13-armbru@redhat.com>
      015715f5
    • M
      libqtest: Remove qtest_qmp_discard_response() & friends · 055a1efc
      Markus Armbruster 提交于
      qtest_qmp_discard_response(...) is shorthand for
      qobject_unref(qtest_qmp(...), except it's not actually shorter.
      Moreover, the presence of these functions encourage sloppy testing.
      Remove them from libqtest.  Add them as macros to the tests that use
      them, with a TODO comment asking for cleanup.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-Id: <20180806065344.7103-5-armbru@redhat.com>
      Reviewed-by: NThomas Huth <thuth@redhat.com>
      055a1efc
  2. 25 7月, 2018 1 次提交
    • 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
  3. 10 7月, 2018 6 次提交
  4. 06 7月, 2018 1 次提交
  5. 16 5月, 2018 2 次提交
  6. 04 5月, 2018 1 次提交
  7. 26 4月, 2018 1 次提交
  8. 10 3月, 2018 1 次提交
  9. 14 2月, 2018 2 次提交
  10. 09 2月, 2018 1 次提交
  11. 06 2月, 2018 6 次提交
  12. 23 1月, 2018 1 次提交
  13. 16 1月, 2018 1 次提交
  14. 15 1月, 2018 2 次提交
  15. 29 10月, 2017 5 次提交
  16. 02 6月, 2017 1 次提交
  17. 10 5月, 2017 1 次提交
  18. 01 3月, 2017 1 次提交
  19. 23 11月, 2016 1 次提交
  20. 28 10月, 2016 1 次提交
  21. 08 9月, 2016 2 次提交