1. 18 7月, 2019 2 次提交
  2. 16 7月, 2019 4 次提交
  3. 15 7月, 2019 4 次提交
  4. 13 7月, 2019 2 次提交
    • E
      snapshot: Factor out redefine cycle validation · e3989ce3
      Eric Blake 提交于
      The code to check whether a redefined snapshot/checkpoint XML is
      attempting to create a cycle in the list of moments is lengthy, and
      common between the two types of list. Therefore, it belongs in the
      shared base file.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Acked-by: NPeter Krempa <pkrempa@redhat.com>
      e3989ce3
    • D
      tests: skip systemd activation test if FDs 3/4/5 are open · ff09b1f6
      Daniel P. Berrangé 提交于
      With systemd activation the passed in file descriptors are required to
      be numbered from STDERR_FILENO + 1 onwards. The unit tests thus require
      FDs 3, 4 and 5 to be available.
      
      This may not be the case in all environments in which the tests run. For
      example on RHEL7 it was seen that a library constructor (gcrypt probably)
      opens /dev/urandom and leaves the file handle open. This means FD 3 is
      not available and the activation tests fail.
      
      The best way to deal with this would be to create a standalone helper
      program for the tests, but that's much more work than just skipping the
      tests if we notice we have the problem.
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      ff09b1f6
  5. 12 7月, 2019 4 次提交
  6. 11 7月, 2019 3 次提交
    • D
      rpc: always pass "-T -e none" args to ssh · 1939bcd5
      Daniel P. Berrangé 提交于
      Way back in the past, the "no_tty=1" option was added for the remote
      driver to disable local password prompting by disabling use of the local
      tty:
      
        commit b32f4298
        Author: Daniel P. Berrange <berrange@redhat.com>
        Date:   Fri Sep 21 20:17:09 2007 +0000
      
          Added a no_tty param to remote URIs to stop SSH prompting for password
      
      This was done by adding "-T -o BatchMode=yes -e none" args to ssh. This
      achieved the desired results but is none the less semantically flawed
      because it is mixing up config parameters for the local tty vs the
      remote tty.
      
      The "-T" arg stops allocation of a TTY on the remote host. This is good
      for all libvirt SSH tunnels as we never require a TTY for our usage
      model, so we should have just passed this unconditionally.
      
      The "-e none" option disables the escape character for sessions with a
      TTY. If we pass "-T" this is not required, but it also not harmful to
      add it, so we should just pass it unconditionally too.
      
      Only the "-o BatchMode=yes" option is related to disabling local
      password prompts and thus needs control via the no_tty URI param.
      Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      1939bcd5
    • J
      qemu: stop formatting json='1' in status XML · 173a191c
      Ján Tomko 提交于
      For quite some time now it is impossible to connect to a domain
      using a HMP monitor, so there is no point in formatting it in the status
      XML.
      Signed-off-by: NJán Tomko <jtomko@redhat.com>
      Acked-by: NPeter Krempa <pkrempa@redhat.com>
      173a191c
    • E
      snapshot: Add VIR_DOMAIN_SNAPSHOT_CREATE_VALIDATE flag · 95f8e323
      Eric Blake 提交于
      We've been doing a terrible job of performing XML validation in our
      various API that parse XML with a corresponding schema (we started
      with domains back in commit dd69a14f, v1.2.12, but didn't catch all
      domain-related APIs, didn't document the use of the flag, and didn't
      cover other XML). New APIs (like checkpoints) should do the validation
      unconditionally, but it doesn't hurt to continue retrofitting existing
      APIs to at least allow the option.
      
      While there are many APIs that could be improved, this patch focuses
      on wiring up a new snapshot XML creation flag through all the
      hypervisors that support snapshots, as well as exposing it in 'virsh
      snapshot-create'.  For 'virsh snapshot-create-as', we blindly set the
      flag without a command-line option, since the XML we create from the
      command line should generally always comply (note that validation
      might cause failures where it used to succeed, such as if we tighten
      the RNG to reject a name of '../\n'); but blindly passing the flag
      means we also have to add in fallback code to disable validation if
      the server is too old to understand the flag.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Acked-by: NPeter Krempa <pkrempa@redhat.com>
      95f8e323
  7. 09 7月, 2019 4 次提交
    • A
      tests: Add getuid() to virnetdevbandwidthmock · 13f5b223
      Andrea Bolognani 提交于
      When only geteuid() is mocked, the test crashes on Debian 10.
      
        Fatal: failed to reset uid: No such file or directory
      
        Program received signal SIGABRT, Aborted.
        __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
        50      ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
        (gdb) t a a bt
      
        Thread 1 (Thread 0x7ffff3b3e080 (LWP 12003)):
        #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
        #1  0x00007ffff7798535 in __GI_abort () at abort.c:79
        #2  0x00007ffff485ca20 in _gcry_logv (level=level@entry=40, fmt=fmt@entry=0x7ffff4929126 "failed to reset uid: %s\n", arg_ptr=arg_ptr@entry=0x7fffffffe4a0) at ../../src/misc.c:142
        #3  0x00007ffff485cd61 in _gcry_log_fatal (fmt=fmt@entry=0x7ffff4929126 "failed to reset uid: %s\n") at ../../src/misc.c:218
        #4  0x00007ffff48639d1 in lock_pool_pages (n=<optimized out>, p=<optimized out>) at ../../src/secmem.c:340
        #5  _gcry_secmem_init_internal (n=<optimized out>) at ../../src/secmem.c:563
        #6  0x00007ffff4863d78 in _gcry_secmem_init (n=4096) at ../../src/secmem.c:581
        #7  0x00007ffff485e4e6 in _gcry_vcontrol (cmd=<optimized out>, arg_ptr=arg_ptr@entry=0x7fffffffe5e0) at ../../src/global.c:506
        #8  0x00007ffff485a789 in gcry_control (cmd=cmd@entry=GCRYCTL_INIT_SECMEM) at ../../src/visibility.c:79
        #9  0x00007ffff71af10f in ssh_crypto_init () at ./src/libgcrypt.c:621
        #10 0x00007ffff7193796 in _ssh_init (constructor=constructor@entry=1) at ./src/init.c:79
        #11 0x00007ffff71834de in libssh_constructor () at ./src/init.c:116
        #12 0x00007ffff7fe437a in call_init (l=<optimized out>, argc=argc@entry=1, argv=argv@entry=0x7fffffffe778, env=env@entry=0x7fffffffe788) at dl-init.c:72
        #13 0x00007ffff7fe4476 in call_init (env=0x7fffffffe788, argv=0x7fffffffe778, argc=1, l=<optimized out>) at dl-init.c:30
        #14 _dl_init (main_map=0x7ffff7ffe190, argc=1, argv=0x7fffffffe778, env=0x7fffffffe788) at dl-init.c:119
        #15 0x00007ffff7fd60ca in _dl_start_user () from /lib64/ld-linux-x86-64.so.2
        #16 0x0000000000000001 in ?? ()
        #17 0x00007fffffffea26 in ?? ()
        #18 0x0000000000000000 in ?? ()
      Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
      Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
      13f5b223
    • P
      tests: Drop sexpr2xmltest · d0924f8c
      Peter Krempa 提交于
      Now that we no longer support sexpr conversion to the internal config we
      can drop the test.
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      d0924f8c
    • P
      tests: Remove xml2sexprtest · b8551d44
      Peter Krempa 提交于
      The test was the only place calling 'xenFormatSxpr'. Drop it as there
      are no other users of that code since we've dropped xend support in
      commit 1dac5fbb.
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      b8551d44
    • E
      snapshot: Rename qemu domain snapshot test files · 4d91ad1c
      Eric Blake 提交于
      Make it obvious that the domainsnapshotxml2xml test is only run when
      compiling in support for qemu.
      Suggested-by: NPeter Krempa <pkrempa@redhat.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Acked-by: NPeter Krempa <pkrempa@redhat.com>
      4d91ad1c
  8. 06 7月, 2019 1 次提交
    • D
      tests: fix mocking of virFileGetXAttrQuiet on FreeBSD · b5ee13e3
      Daniel P. Berrangé 提交于
      The qemusecuritytest is failing on FreeBSD 11/12, reporting that files
      are not correctly restored. Debugging code printfs show that the
      virFileGetXAttrQuiet mock is returning 0, but the virFileGetXAttr
      function is seeing -1 as the return value.
      
      Essentially there appears to be some kind of optimization between the
      real virFileGetXAttrQuiet and the real virFileGetXAttr, which breaks
      when we mock virFileGetXAttrQuiet. Rather than trying to figure out
      how to avoid this, it is simpler to just mock virFileGetXAttr too
      since it is very short code.
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      b5ee13e3
  9. 03 7月, 2019 14 次提交
  10. 26 6月, 2019 2 次提交