1. 03 6月, 2014 1 次提交
    • P
      qemu: monitor: Fix type of holdtime argument in qemuMonitorJSONSendKey · ce2107a9
      Peter Krempa 提交于
      qemuMonitorJSONSendKey declares the "holdtime" argument as unsigned int
      while the command was constructed in qemuMonitorJSONMakeCommand using
      the "P" modifier which took a unsigned long from the variable
      arguments which then made it possible to access uninitialized memory.
      
      This broke the qemumonitorjsontest on 32bit fedora 20:
      64) qemuMonitorJSONSendKey
      ... libvirt: QEMU Driver error : internal error: unsupported data type 'W' for arg 'WVSƒì ‹D$0è‘wÿÿÃAå' FAILED
      
      Uncovered by upstream commit f744b831.
      
      Additionally add test for the hold-time option.
      ce2107a9
  2. 07 4月, 2014 1 次提交
    • E
      hash: add common utility functions · 09567144
      Eric Blake 提交于
      I almost wrote a hash value free function that just called
      VIR_FREE, then realized I couldn't be the first person to
      do that.  Sure enough, it was worth factoring into a common
      helper routine.
      
      * src/util/virhash.h (virHashValueFree): New function.
      * src/util/virhash.c (virHashValueFree): Implement it.
      * src/util/virobject.h (virObjectFreeHashData): New function.
      * src/libvirt_private.syms (virhash.h, virobject.h): Export them.
      * src/nwfilter/nwfilter_learnipaddr.c (virNWFilterLearnInit): Use
      common function.
      * src/qemu/qemu_capabilities.c (virQEMUCapsCacheNew): Likewise.
      * src/qemu/qemu_command.c (qemuDomainCCWAddressSetCreate):
      Likewise.
      * src/qemu/qemu_monitor.c (qemuMonitorGetBlockInfo): Likewise.
      * src/qemu/qemu_process.c (qemuProcessWaitForMonitor): Likewise.
      * src/util/virclosecallbacks.c (virCloseCallbacksNew): Likewise.
      * src/util/virkeyfile.c (virKeyFileParseGroup): Likewise.
      * tests/qemumonitorjsontest.c
      (testQemuMonitorJSONqemuMonitorJSONGetBlockInfo): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      09567144
  3. 25 3月, 2014 3 次提交
  4. 20 1月, 2014 1 次提交
  5. 19 11月, 2013 1 次提交
  6. 13 11月, 2013 2 次提交
  7. 08 11月, 2013 1 次提交
  8. 15 10月, 2013 1 次提交
    • E
      maint: avoid 'const fooPtr' in tests · b8984770
      Eric Blake 提交于
      'const fooPtr' is the same as 'foo * const' (the pointer won't
      change, but it's contents can).  But in general, if an interface
      is trying to be const-correct, it should be using 'const foo *'
      (the pointer is to data that can't be changed).
      
      Fix up offenders in the testsuite.
      
      * tests/cputest.c (cpuTestCompareXML): Use intended type.
      * tests/qemucapabilitiestest.c (testQemuCaps): Likewise.
      * tests/qemumonitorjsontest.c: Drop const.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      b8984770
  9. 11 10月, 2013 4 次提交
  10. 08 10月, 2013 1 次提交
  11. 05 10月, 2013 1 次提交
    • E
      build: fix build on 32-bit platforms · 815e3098
      Eric Blake 提交于
      qemumonitorjsontest.c: In function 'testQemuMonitorJSONqemuMonitorJSONGetBalloonInfo':
      qemumonitorjsontest.c:1134: warning: integer constant is too large for 'long' type
      
      * tests/qemumonitorjsontest.c
      (testQemuMonitorJSONqemuMonitorJSONGetBalloonInfo)
      (testQemuMonitorJSONqemuMonitorJSONGetBlockStatsInfo): Use correct
      type.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      815e3098
  12. 03 10月, 2013 11 次提交
  13. 20 9月, 2013 1 次提交
  14. 19 9月, 2013 2 次提交
  15. 26 8月, 2013 1 次提交
  16. 22 7月, 2013 1 次提交
  17. 20 7月, 2013 1 次提交
  18. 16 7月, 2013 3 次提交
    • J
      Add qemuMonitorJSONSetObjectProperty() method for QMP qom-set command · 50336d87
      John Ferlan 提交于
      Add a new qemuMonitorJSONSetObjectProperty() method to support invocation
      of the 'qom-set' JSON monitor command with a provided path, property, and
      expected data type to set.
      
      NOTE: The set API was added only for the purpose of the qemumonitorjsontest
      
      The test code uses the same "/machine/i440fx" property as the get test and
      attempts to set the "realized" property to "true" (which it should be set
      at anyway).
      50336d87
    • J
      Add qemuMonitorJSONGetObjectProperty() method for QMP qom-get command · bdce2789
      John Ferlan 提交于
      Add a new qemuMonitorJSONGetObjectProperty() method to support invocation
      of the 'qom-get' JSON monitor command with a provided path, property, and
      expected data type return. The qemuMonitorJSONObjectProperty is similar to
      virTypedParameter; however, a future patch will extend it a bit to include
      a void pointer to balloon driver statistic data.
      
      NOTE: The ObjectProperty structures and API are added only for the
            purpose of the qemumonitorjsontest
      
      The provided test will execute a qom-get on "/machine/i440fx" which will
      return a property "realized".
      bdce2789
    • J
      Add qemuMonitorJSONGetObjectListPaths() method for QMP qom-list command · d76a8978
      John Ferlan 提交于
      Add a new qemuMonitorJSONGetObjectListPaths() method to support invocation
      of the 'qom-list' JSON monitor command with a provided path.
      
      NOTE: The ListPath structures and API's are added only for the
            purpose of the qemumonitorjsontest
      
      The returned list of paired data fields of "name" and "type" that can
      be used to peruse QOM configuration data and eventually utilize for the
      balloon statistics.
      
      The test does a "{"execute":"qom-list", "arguments": { "path": "/"}}" which
      returns "{"return": [{"name": "machine", "type": "child<container>"},
      {"name": "type", "type": "string"}]}" resulting in a return of an array
      of 2 elements with [0].name="machine", [0].type="child<container>".  The [1]
      entry appears to be a header that could be used some day via a command such
      as "virsh qemuobject --list" to format output.
      d76a8978
  19. 12 7月, 2013 2 次提交
  20. 11 7月, 2013 1 次提交