1. 17 5月, 2019 3 次提交
    • A
      tests: Refresh capabilities for QEMU on ppc64 · 35e4c153
      Andrea Bolognani 提交于
      Now that we're probing machine type properties using the
      latest machine type rather than the "spapr-machine" parent,
      we can finally discover properties that are not available
      on all machine types.
      
      This commit refreshes replies for QEMU 4.0.0 as well as
      3.1.0 to show not only that we're actually discovering new
      machine type properties this way, but also that the number
      of available machine type properties increases with each
      subsequent QEMU release.
      
      If qom-list-properties had been available in QEMU 2.10.0,
      we could now drop the explicit version number checks for
      the QEMU_CAPS_MACHINE_PSERIES_MAX_CPU_COMPAT and
      QEMU_CAPS_MACHINE_PSERIES_RESIZE_HPT capabilities, but
      unfortunately it wasn't, so we have to keep them around
      still.
      Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
      Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
      35e4c153
    • A
      qemu: Probe canonicalized machine type · d22c6221
      Andrea Bolognani 提交于
      Now that we have the list of machine types available when
      probing machine type properties, we can list properties for
      the canonicalized version of the "pseries" machine type
      instead of having to go through "spapr-machine", which we
      know to be the parent type for all "pseries-*-machine"
      types. By doing this, we'll be able to find even properties
      that are only available from a certain versioned machine
      type forward, and can't thus be obtained when looking at
      the parent type only.
      Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
      Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
      d22c6221
    • A
      qemu: Move call to virQEMUCapsProbeQMPMachineProps() · 295a42e1
      Andrea Bolognani 提交于
      We're going to need information about available machine types
      when probing machine type properties soon, and that means we
      have to change the order we call QMP commands.
      Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
      Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
      295a42e1
  2. 15 5月, 2019 4 次提交
  3. 14 5月, 2019 1 次提交
  4. 09 5月, 2019 1 次提交
  5. 07 5月, 2019 3 次提交
    • M
      virtestmock: Initialize symbols from stat() and its friends · e1de5dd2
      Michal Privoznik 提交于
      Introduced by ff376c62.
      
      Previously, init_syms() was called from stat() mock and its
      friends. This is crucial because checkPath() might call
      printFile() which in turn calls real_fopen(). But if stat() or
      one of its friends is the first function called then because of
      lacking init_syms() call no real_* is initialized.
      
      The other thing is that we really want the recorded action to be
      "stat" instead of __FUNCTION__ because there's no good in
      recording that it was __xstat64 who touched some file.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      e1de5dd2
    • M
      virfilemock: Init symbols in canonicalize_file_name() · dd5ae5f2
      Michal Privoznik 提交于
      If a program that is using this mock calls canonicalize_file_name()
      as the very first function then it will face SIGSEGV because
      real_canonicalize_file_name is uninitialized.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      dd5ae5f2
    • E
      conf: Add parameter to virDomainDiskSourceFormat · 1ec3e397
      Eric Blake 提交于
      Commits 4bc42986 and 218c81ea removed virDomainStorageSourceFormat on
      the grounds that there were no external callers; however, the upcoming
      backup code wants to output a <target> (push mode) or <scratch> (pull
      mode) element that is in all other respects identical to a domain's
      <source> element, where the previous virDomainStorageSourceFormat fit
      the bill nicely. But rather than reverting the commits, it's easier to
      just add an additional parameter for the element name to use, and
      update all callers.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      1ec3e397
  6. 06 5月, 2019 13 次提交
  7. 05 5月, 2019 2 次提交
  8. 30 4月, 2019 1 次提交
  9. 25 4月, 2019 1 次提交
  10. 20 4月, 2019 1 次提交
    • M
      qemucaps2xmltest: Don't leak @binary · 8bf7cc5f
      Michal Privoznik 提交于
      There's no need to keep @binary around.
      virQEMUCapsInitGuestFromBinary() duplicates the string anyway.
      
       1,002 bytes in 36 blocks are definitely lost in loss record 54 of 59
          at 0x483579F: malloc (vg_replace_malloc.c:299)
          by 0x796B1C7: vasprintf (vasprintf.c:73)
          by 0x4C3F2C6: virVasprintfInternal (virstring.c:740)
          by 0x4C3F3DC: virAsprintfInternal (virstring.c:761)
          by 0x13AFC9: testGetCaps (qemucaps2xmltest.c:105)
          by 0x13B200: testQemuCapsXML (qemucaps2xmltest.c:157)
          by 0x13B642: virTestRun (testutils.c:174)
          by 0x13B366: doCapsTest (qemucaps2xmltest.c:191)
          by 0x13FF2B: testQemuCapsIterate (testutilsqemu.c:941)
          by 0x13B427: mymain (qemucaps2xmltest.c:215)
          by 0x13D706: virTestMain (testutils.c:1096)
          by 0x13B489: main (qemucaps2xmltest.c:221)
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      8bf7cc5f
  11. 18 4月, 2019 3 次提交
  12. 17 4月, 2019 7 次提交
    • A
      tests: Use TEST_QEMU_CAPS_PATH wherever possible · c64152b6
      Andrea Bolognani 提交于
      After the recent changes, there are only a few places left
      where we use the explicit path instead of taking advantage of
      the publicly available define; let's get rid of those too.
      Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
      Reviewed-by: NCole Robinson <crobinso@redhat.com>
      c64152b6
    • A
      tests: Drop dirname argument from testQemuCapsIterate() · 45dff4bb
      Andrea Bolognani 提交于
      As evidenced by all existing callers, the only directory it makes
      sense to use is TEST_QEMU_CAPS_PATH, so let's just bake that into
      the function.
      Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
      Reviewed-by: NCole Robinson <crobinso@redhat.com>
      45dff4bb
    • A
      tests: Drop dirname argument from testQemuGetLatestCapsForArch() · 3fe020a0
      Andrea Bolognani 提交于
      As evidenced by all existing callers, the only directory it makes
      sense to use is TEST_QEMU_CAPS_PATH, so let's just bake that into
      the function.
      Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
      Reviewed-by: NCole Robinson <crobinso@redhat.com>
      3fe020a0
    • A
      tests: Make TEST_QEMU_CAPS_PATH public · f0e48979
      Andrea Bolognani 提交于
      The value (with a slightly different name) is currently private
      to testutilsqemu, but since we use this path all over the place
      it makes sense to define it publicly and avoid repetition.
      Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
      Reviewed-by: NCole Robinson <crobinso@redhat.com>
      f0e48979
    • E
      snapshot: Use post-parse instead of regex in testsuite · 0ea43b55
      Eric Blake 提交于
      Now that we can override the post-parse handling, let's update the
      testsuite to provide the desired timestamp/name rather than ignoring
      the non-deterministic one that was previously being generated. A few
      output files need timestamps added now that they are no longer
      ignored.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NCole Robinson <crobinso@redhat.com>
      0ea43b55
    • E
      snapshot: Don't expose testsuite-only state in snapshot XML · a007fcab
      Eric Blake 提交于
      None of the existing drivers actually use the 0-valued 'nostate'
      snapshot state; rather, it was a fluke of implementation. In fact,
      some drivers, like qemu, actively reject 'nostate' as invalid during a
      snapshot redefine. Normally, a driver computes the state post-parse
      from the current domain, and thus virDomainSnapshotGetXMLDesc() will
      never expose the state. However, since the testsuite lacks any
      associated domain to copy state from, and lacks post-parse processing
      that normal drivers have, the testsuite output had several spots with
      the state, coupled with a regex filter to ignore the oddity.
      
      It is better to follow the lead of other XML defaults, by not
      outputting anything during format if post-parse defaults have not been
      applied, and rejecting the default value during parsing. The testsuite
      needs a bit of an update, by adding another flag for when to simulate
      a post-parse action of setting a snapshot state, but none of the
      drivers are impacted other than rejecting XML that was previously
      already suspicious in nature.
      
      Similarly, don't expose creation time 0 (for now, only possible if a
      user redefined a snapshot to claim creation at the Epoch, but also
      happens once setting the creation time is deferred to a post-parse
      handler).
      
      This is also a step towards cleaning up snapshot_conf.c to separate
      its existing post-parse work (namely, setting the creationTime and
      default snapshot name) from the pure parsing work, so that we can get
      rid of the testsuite hack of regex filtering of the XML and instead
      have more accurate testing of our parser/formatter code.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NCole Robinson <crobinso@redhat.com>
      a007fcab
    • E
      snapshot: Refactor snapshotxml2xml test · a10c6b30
      Eric Blake 提交于
      Upcoming changes want to separate out a post-parse massaging of
      snapshots separate from parsing the XML, so as not to be dependent on
      filtering out an ever-changing timestamp from the testsuite. Along the
      way, this means we will want to add yet another conditional to the
      snapshot xml2xml tests on whether to perform post-processing steps to
      canned values. This will be easier to read if we consolidate all the
      decisions into a flags variable, instead of adding yet another
      boolean.
      
      While at it, drop the redundant inout test of "noparent" (once is
      enough).
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NCole Robinson <crobinso@redhat.com>
      a10c6b30