1. 19 3月, 2016 2 次提交
  2. 18 3月, 2016 4 次提交
    • J
      tests: add schema test for default cache mode · adddaff1
      Jim Fehlig 提交于
      None of the existing domXML configs under tests/* specify a
      default cache mode since default generally means "use the
      hypervisor default" and is left unset by the various hypervisor
      drivers. Add a config to tests/domainschemadata that specifies
      cache='default'.
      adddaff1
    • J
      tests: add xlconfigdata to domainschematests · 1a01e879
      Jim Fehlig 提交于
      Include the XML files under tests/xlconfigdata in the domain
      schema tests
      1a01e879
    • M
      tests: Set PATH in each test · 363b401f
      Michal Privoznik 提交于
      Currently we spawn couple of binaries in our test suite.
      Moreover, we provide some spoofed versions of system binaries
      hoping that those will be executed instead of the system ones.
      For instance, for testing SSH socket we have written our own ssh
      binary for producing predictable results. We certainly don't want
      to execute the system ssh binary.
      However, in order to prefer our binaries over system ones, we
      need to set PATH environment variable. But this is done only at
      the Makefile level. So if anybody runs a test by hand that
      expects our spoofed binary, the test ends up executing real
      system binaries. This is not good. In fact, it's terribly wrong.
      The fix lies in a small trick - putting our build directory at
      the beginning of the PATH environment variable in each test.
      Hopefully, since every test has this VIRT_TEST_MAIN* wrapper, we
      can fix this at a single place.
      Moreover, while this removes setting PATH for our tests written
      in bash, it's safe as we are not calling anything ours that would
      require PATH change there.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      363b401f
    • M
      Drop paths.h include · 865764de
      Michal Privoznik 提交于
      We include the file in plenty of places. This is mostly due to
      historical reasons. The only place that needs something from the
      header file is storage_backend_fs which opens _PATH_MOUNTED. But
      it gets the file included indirectly via mntent.h. At no other
      place in our code we need _PATH_.*. Drop the include and
      configure check then.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      865764de
  3. 16 3月, 2016 2 次提交
    • E
      tests: Add a new test for logging outputs parser · 6bd9758e
      Erik Skultety 提交于
      Test for parser's functionality.
      6bd9758e
    • E
      tests: Slightly tweak virlogtest · 814b2ec6
      Erik Skultety 提交于
      Patch adds a generic DO_TEST_FULL macro, some PASS/FAIL macros to better
      visually distinguish tests that should fail and tests that should pass. Also,
      some cosmetic changes like renames and direct call to fprintf is replaced with
      our VIR_TEST_DEBUG macro, as using testutils should be our preferred way of
      reporting errors in tests.
      814b2ec6
  4. 11 3月, 2016 5 次提交
  5. 10 3月, 2016 2 次提交
  6. 08 3月, 2016 6 次提交
  7. 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
  8. 26 2月, 2016 4 次提交
  9. 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
  10. 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
  11. 22 2月, 2016 1 次提交
  12. 19 2月, 2016 1 次提交
    • 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