1. 06 8月, 2019 1 次提交
  2. 02 8月, 2019 1 次提交
    • E
      tests: Fix virsh-snapshot/checkpoint without readline-devel · 8bfb1371
      Eric Blake 提交于
      readline-devel is an optional build dependency; when it is not
      present, the output of 'virsh <<EOF ... EOF' is different in that the
      input provided by the user is not echoed, and prompts become
      interleaved on the same line as actual output, which in turn causes
      the sed doing prompt filtering to mess up:
      
      | ./virsh-snapshot
      | --- exp	2019-07-31 18:42:31.107399428 -0300
      | +++ out.cooked	2019-07-31 18:42:31.108399437 -0300
      | @@ -1,8 +1,3 @@
      | -
      | -
      | -Domain snapshot s3 created from 's3.xml'
      | -Domain snapshot s2 created from 's2.xml'
      | -Name:           s2
      |  Domain:         test
      |  Current:        yes
      |  State:          running
      
      Maybe we should fix virsh in interactive mode to echo regardless of
      whether readline-devel was used, but the quicker fix is to make the
      test use 'virsh "..."' rather than reading its input from stdin.
      Reported-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Tested-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
      8bfb1371
  3. 29 7月, 2019 7 次提交
  4. 27 7月, 2019 5 次提交
    • E
      backup: Add virsh-checkpoints test · 43686f36
      Eric Blake 提交于
      Similar to virsh-snapshots. Provides decent coverage of the checkpoint
      API, the test driver implementation, and the virsh access to the API.
      A later patch will worry about testing that snapshots and checkpoints
      are mutually exclusive (in part so it is easier to revert that when we
      finally implement the interaction and lift that restriction).
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
      43686f36
    • E
      backup: Parse and output checkpoint XML · 1a4df34a
      Eric Blake 提交于
      Add a new file checkpoint_conf.c that performs the translation to and
      from new XML describing a checkpoint. The code shares a common base
      class with snapshots, since a checkpoint similarly represents the
      domain state at a moment in time. Add some basic testing of round trip
      XML handling through the new code.
      
      Of note - this code intentionally differs from snapshots in that XML
      schema validation is unconditional, rather than based on a public API
      flag.  We have many existing interfaces that still need to add a flag
      for opt-in schema validation, but those interfaces have existing
      clients that may not have been producing strictly-compliant XML, or we
      may still uncover bugs where our RNG grammar is inconsistent with our
      code (where omitting the opt-in flag allows existing apps to keep
      working while waiting for an RNG patch).  But since checkpoints are
      brand-new, it's easier to ensure the code matches the schema by always
      using the schema.  If needed, a later patch could extend the API and
      add a flag to turn on to request schema validation, rather than having
      it forced (possibly just the validation of the <domain> sub-element
      during REDEFINE) - but if a user encounters XML that looks like it
      should be good but fails to validate with our RNG schema, they would
      either have to upgrade to a new libvirt that adds the new flag, or
      upgrade to a new libvirt that fixes the RNG schema, which implies
      adding such a flag won't help much.
      
      Also, the redefine flag requires the <domain> sub-element to be
      present, rather than catering to historical back-compat to older
      versions.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      1a4df34a
    • E
      backup: Document new XML for checkpoints · d85842cf
      Eric Blake 提交于
      Prepare for new checkpoint APIs by describing the XML that will
      represent a checkpoint.  The checkpoint XML is modeled heavily after
      virDomainSnapshotPtr. See the docs for more details.
      
      Add testsuite coverage for some minimal uses of the XML (bare minimum,
      the sample from html, and a full dumpxml, and some counter-examples
      that should fail schema validation). Although use of the REDEFINE flag
      will require the <domain> subelement to be present, it is easier for
      most of the tests to provide counterpart output produced with the
      NO_DOMAIN flag (particularly since synthesizing a valid <domain>
      during testing is not trivial).
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
      d85842cf
    • S
      tests: Call virCommandFree() in cleanup section · 9b4bc795
      Stefan Berger 提交于
      Fix a potential memory leak by calling virCommandFree() in the cleanup
      section.
      Signed-off-by: NStefan Berger <stefanb@linux.ibm.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      Message-Id: <20190726205633.2041912-3-stefanb@linux.vnet.ibm.com>
      9b4bc795
    • E
      snapshot: Fix tests/virsh-snapshot · 0dbfc396
      Eric Blake 提交于
      Creating an 'exp' output file, but never comparing it against the
      actual output, does not actually constitute testing the output. :)
      
      Fixes: 280a2b41Signed-off-by: NEric Blake <eblake@redhat.com>
      0dbfc396
  5. 26 7月, 2019 5 次提交
  6. 25 7月, 2019 7 次提交
  7. 24 7月, 2019 1 次提交
  8. 23 7月, 2019 1 次提交
  9. 19 7月, 2019 1 次提交
  10. 18 7月, 2019 11 次提交