1. 11 3月, 2016 2 次提交
  2. 10 3月, 2016 2 次提交
  3. 08 3月, 2016 6 次提交
  4. 01 3月, 2016 7 次提交
    • A
    • P
      qemu: introduce vram64 attribute for QXL video device · b4a5fd95
      Pavel Hrdina 提交于
      This attribute is used to extend secondary PCI bar and expose it to the
      guest as 64bit memory.  It works like this: attribute vram is there to
      set size of secondary PCI bar and guest sees it as 32bit memory,
      attribute vram64 can extend this secondary PCI bar.  If both attributes
      are used, guest sees two memory bars, both address the same memory, with
      the difference that the 32bit bar can address only the first part of the
      whole memory.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1260749Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      b4a5fd95
    • P
      37b74633
    • P
      domain_conf: always set primary video device as primary · 119cd06e
      Pavel Hrdina 提交于
      We always place primary video device at first place, to make it easier
      to create a qemu command or format an xml, but we should also set the
      primary boolean for primary video device to 'true'.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      119cd06e
    • J
      polkit: Adjust message when authentication agent isn't found · 1d35f6ff
      John Ferlan 提交于
      When there isn't a ssh -X type session running and a user has not
      been added to the libvirt group, attempts to run 'virsh -c qemu:///system'
      commands from an otherwise unprivileged user will fail with rather
      generic or opaque error message:
      
          "error: authentication failed: no agent is available to authenticate"
      
      This patch will adjust the error code and message to help reflect the
      situation that the problem is the requested mechanism is UNAVAILABLE and
      a slightly more descriptive error. The result on a failure then becomes:
      
          "error: authentication unavailable: no polkit agent available to
                  authenticate action 'org.libvirt.unix.manage'"
      
      A bit more history on this - at one time a failure generated the
      following type message when running the 'pkcheck' as a subprocess:
      
      "error: authentication failed: polkit\56retains_authorization_after_challenge=1
      Authorization requires authentication but no agent is available."
      
      but, a patch was generated to adjust the error message to help provide
      more details about what failed. This was pushed as commit id '96a108c9'.
      That patch prepended a "polkit: " to the output. It really didn't solve
      the problem, but gave a hint.
      
      After some time it was deemed using DBus API calls directly was a
      better way to go (since pkcheck calls them anyway). So, commit id
      '1b854c76' (more or less) copied the code from remoteDispatchAuthPolkit
      and adjusted it. Then commit id 'c7542573' adjusted the remote.c
      code to call the new API (virPolkitCheckAuth). Finally, commit id
      '308c0c5a' altered the code to call DBus APIs directly. In doing
      so, it reverted the failing error message to the generic message
      that would have been received from DBus anyway.
      1d35f6ff
    • M
      qemu: add spice opengl support · 937ebba0
      Marc-André Lureau 提交于
      Add Spice graphics gl attribute. qemu 2.6 should have -spice gl=on argument to
      enable opengl rendering context (patches on the ML). This is necessary to
      actually enable virgl rendering.
      
      Add a qemuxml2argv test for virtio-gpu + spice with virgl.
      Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      937ebba0
    • M
      qemu: Shorten per-domain directory names · a89f05ba
      Martin Kletzander 提交于
      Per-domain directories were introduced in order to be able to
      completely separate security labels for each domain (commit
      f1f68ca3).  However when the domain
      name is long (let's say a ridiculous 110 characters), we cannot
      connect to the monitor socket because on length of UNIX socket address
      is limited.  In order to get around this, let's shorten it in similar
      fashion and in order to avoid conflicts, throw in an ID there as well.
      Also save that into the status XML and load the old status XMLs
      properly (to clean up after older domains).  That way we can change it
      in the future.
      
      The shortening can be seen in qemuxml2argv tests, for example in the
      hugepages-pages2 case.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      a89f05ba
  5. 26 2月, 2016 4 次提交
  6. 25 2月, 2016 2 次提交
    • M
      vircgroupmock: Mock access("/sys/devices/system/cpu/present") · 50129dcc
      Michal Privoznik 提交于
      There's been a report on the upstream list [1] describing we
      access /sys/devices/system/cpu/present directly on the host from
      within our test suite. This may end up in unpredictable results
      as no all linux systems are required to have that file. Mock
      access to the file.
      
      libvirt.git/tests $ ../run strace vircgrouptest
      ...
      access("/sys/devices/system/cpu/present", F_OK) = 0
      ...
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      50129dcc
    • E
      build: accomodate selinux 2.5 header API change · 5ea3a690
      Eric Blake 提交于
      Yet again, selinux has been adding const-correctness; this change
      is ABI-compatible, but breaks API, which affects us when we try to
      override things in our testsuite:
      
      ../../tests/securityselinuxhelper.c:307:24: error: conflicting types for 'selabel_open'
       struct selabel_handle *selabel_open(unsigned int backend,
                              ^~~~~~~~~~~~
      In file included from ../../tests/securityselinuxhelper.c:32:0:
      /usr/include/selinux/label.h:73:24: note: previous declaration of 'selabel_open' was here
      
      The problem is a new 'const' prior to the second parameter.
      
      Fix it the same way we did in commit 292d3f2d: check for the new
      const at configure time.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      5ea3a690
  7. 23 2月, 2016 4 次提交
    • A
      tests: Fix typo oaque -> opaque · 73fc4651
      Andrea Bolognani 提交于
      No functional changes.
      73fc4651
    • J
      xenconfig: support xl<->xml conversion of rbd disk devices · 6604a3dd
      Jim Fehlig 提交于
      The target= setting in xl disk configuration can be used to encode
      meta info that is meaningful to a backend. Leverage this fact to
      support qdisk network disk types such as rbd. E.g. <disk> config
      such as
      
         <disk type='network' device='disk'>
           <driver name='qemu' type='raw'/>
           <source protocol='rbd' name='pool/image'>
             <host name='mon1.example.org' port='6321'/>
             <host name='mon2.example.org' port='6322'/>
             <host name='mon3.example.org' port='6322'/>
           </source>
           <target dev='hdb' bus='ide'/>
           <address type='drive' controller='0' bus='0' target='0' unit='1'/>
         </disk>
      
      can be converted to the following xl config (and vice versa)
      
        disk = [ "format=raw,vdev=hdb,access=rw,backendtype=qdisk,
                  target=rbd:pool/image:auth_supported=none:mon_host=mon1.example.org\\:6321\\;mon2.example.org\\:6322\\;mon3.example.org\\:6322"
               ]
      
      Note that in xl disk config, a literal backslash in target= must
      be escaped with a backslash. Conversion of <auth> config is not
      handled in this patch, but can be done in a follow-up patch.
      
      Also add a test for the conversions.
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      6604a3dd
    • J
      xenconfig: produce key=value disk config syntax in xl formatter · a44f1f85
      Jim Fehlig 提交于
      The most formal form of xl disk configuration uses key=value
      syntax to define each configuration item, e.g.
      
      format=raw, vdev=xvda, access=rw, backendtype=phy, target=disksrc
      
      Change the xl disk formatter to produce this syntax, which allows
      target= to contain meta info needed to setup a network-based
      disksrc (e.g. rbd, nbd, iscsi). For details on xl disk config
      format, see  $xen-src/docs/misc/xl-disk-configuration.txt
      
      Update the disk config in the tests to use the formal syntax.
      But add tests to ensure disks specified with the positional
      parameter syntax are correctly converted to <disk> XML.
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      a44f1f85
    • J
      xenconfig: replace text 'xm' with 'xl' in xlconfigtest · 8910ceaf
      Jim Fehlig 提交于
      While at it, improve a few comments. No functional change.
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      8910ceaf
  8. 22 2月, 2016 1 次提交
  9. 19 2月, 2016 3 次提交
    • C
      qemu: parse: drop redundant AddImplicitControllers · e6ad2b69
      Cole Robinson 提交于
      PostParse handles it for us now.
      
      This causes some test suite churn; qemu's custom PostParse could is
      now invoked before the generic AddImplicitControllers, so PCI
      controllers end up sequentially in the XML before the generically
      added IDE controllers. So it's just some XML reordering
      e6ad2b69
    • C
      domain: add implicit controllers from post parse · 4066c734
      Cole Robinson 提交于
      Seems like the natural fit, since we are already adding other XML bits
      in the PostParse routine.
      
      Previously AddImplicitControllers was only called at the end of XML
      parsing, meaning code that builds a DomainDef by hand had to manually
      call it. Now those PostParse callers get it for free.
      
      There's some test churn here; xen xm and sexpr test suite bits weren't
      calling this before, but now they are, so you'll see new IDE controllers.
      I don't think this will cause problems in practice, since the code already
      needs to handle these implicit controllers like in the case when a user
      defines their own XML.
      4066c734
    • A
      test: qemuxml2argv: Drop QEMU_CAPS_DEVICE uses · b6c40bd5
      Andrea Bolognani 提交于
      Since commit 51045df0, the QEMU_CAPS_DEVICE capability is enabled
      automatically and shouldn't be passed as an argument to DO_TEST();
      however, commit 998a936c accidentally introduced few such uses.
      b6c40bd5
  10. 18 2月, 2016 6 次提交
    • C
      tests: Remove unused virtTestClearLineRegex · ad859090
      Cole Robinson 提交于
      This was only used for test 'xml blanking', which has now all
      been removed, and isn't an ideal paradigm anyways since it
      inhibits easy XML regeneration.
      ad859090
    • C
      tests: lxcconf2xml: Drop XML blanking · 1064fb33
      Cole Robinson 提交于
      Hardcode a UUID like we did for qemuargv2xml, so we can use standard
      comparison helpers, which gives us VIR_TEST_REGENERATE_OUTPUT support
      1064fb33
    • C
      tests: qemuargv2xml: Drop memory XML blanking · 2fc011fe
      Cole Robinson 提交于
      The memory XML blanking is only there to avoid the unit= churn that
      was added by default a long time ago.
      
      Drop the blanking, switch over to using the standard comparison
      helpers, and regenerate the output with VIR_TEST_REGENERATE_OUTPUT.
      2fc011fe
    • C
      tests: qemuargv2xml: hardcode disk auth usage · 73ed1d74
      Cole Robinson 提交于
      If a qemuargv has iscsi or ceph secrets on the command line, we will
      convert that to XML like:
      
        <auth username='myname'>
          <secret type='iscsi'/>
        </auth>
      
      This is not valid XML, as either a UUID or usage must be specified in
      the secret block. It's not clear though how the argv2xml code can do
      anything correct here, since XML like this requires a libvirt secret
      object to have already been defined.
      
      The current test suite handles this by blanking out any <secret> block
      in the XML. This avoids domainschematest failures.
      
      Instead of blanking, let's hardcode a usage= name. This lets us test
      the other bits of generated <secret> XML, and is a step towards wiring
      up VIR_TEST_REGENERATE_OUTPUT
      73ed1d74
    • C
      tests: qemuargv2xml: Remove UUID randomness · b25027ba
      Cole Robinson 提交于
      Overwrite any randomly generated UUID to use a hardcoded value, so
      we don't need to blank it when comparing XML.
      b25027ba
    • C
      tests: qemuargv2xml: Remove unneeded XML blanking · 7973c0ef
      Cole Robinson 提交于
      None of the test cases depend on dropping these XML bits
      7973c0ef
  11. 17 2月, 2016 3 次提交
    • E
      virnetdaemon: Store servers in a hash table · 252610f7
      Erik Skultety 提交于
      Since the daemon can manage and add (at fresh start) multiple servers,
      we also should be able to add them from a JSON state file in case of a
      daemon restart, so post exec restart support for multiple servers is also
      provided. Patch also updates virnetdaemontest accordingly.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      252610f7
    • E
      util: Refactor virHashForEach so it returns as soon as an iterator fails · 353de572
      Erik Skultety 提交于
      The method will now return 0 on success and -1 on error, rather than number of
      items which it iterated over before it returned back to the caller. Since the
      only place where we actually check the number of elements iterated is in
      virhashtest, return value of 0 and -1 can be a pretty accurate hint that it
      iterated over all the items. However, if we really want to know the number of
      items iterated over (like virhashtest does), a counter has to be provided
      through opaque data to each iterator call. This patch adjusts return value of
      virHashForEach, refactors the body, so it returns as soon as one of the
      iterators fail and adjusts virhashtest to reflect these changes.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      353de572
    • E
      util: Add a return value to void hash iterators · cc48d3a1
      Erik Skultety 提交于
      Our existing virHashForEach method iterates through all items disregarding the
      fact, that some of the iterators might have actually failed. Errors are usually
      dispatched through an error element in opaque data which then causes the
      original caller of virHashForEach to return -1. In that case, virHashForEach
      could return as soon as one of the iterators fail. This patch changes the
      iterator return type and adjusts all of its instances accordingly, so the
      actual refactor of virHashForEach method can be dealt with later.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      cc48d3a1