1. 06 5月, 2016 7 次提交
  2. 05 5月, 2016 12 次提交
    • M
      virNetServerClientNewPostExecRestart: Avoid align problems · b17e610e
      Michal Privoznik 提交于
      I've noticed this while trying to compile libvirt on my arm box.
      
        CC       rpc/libvirt_net_rpc_server_la-virnetserverclient.lo
      rpc/virnetserverclient.c: In function 'virNetServerClientNewPostExecRestart':
      rpc/virnetserverclient.c:516:45: error: cast increases required alignment of target type [-Werror=cast-align]
                                                   (long long *) &timestamp) < 0) {
                                                   ^
      cc1: all warnings being treated as errors
      
      Problem is, @timestap is defined as time_t which is 32 bits long,
      and we are typecasting it to long long which is 64bits long.
      Solution is to make @timestamp type of long long. At the same
      time, we can make @conn_time in _virNetServerClient struct long
      long too. There is no need for it to be type of time_t.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      b17e610e
    • M
      virNetServerClientNewPostExecRestart: Drop useless typecasts · 2a3a2c2f
      Michal Privoznik 提交于
      In this function, @id is defined as unsigned long long. When
      passing this variable to virJSONValueObjectGetNumberUlong(),
      well address of this variable, it's typecasted to ull*. There
      is no need for that. It's a same story with @nrequests_max.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      2a3a2c2f
    • J
      Add qemucapsprobe in .gitignore · 8d8f65f0
      Jiri Denemark 提交于
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      8d8f65f0
    • J
      tests: Add qemucapsprobe helper · f943a28c
      Jiri Denemark 提交于
      Adding new *.replies files for qemucapabilitiestest or updating the
      files when libvirt adds an additional QMP command into the probing
      process is quite painful. The goal of the new qemucapsprobe command is
      to make this process as easy as
      
          tests/qemucapsprobe /path/to/qemu/binary >caps.replies
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      f943a28c
    • J
      virjson: Make pretty format more compact · 7197e5fd
      Jiri Denemark 提交于
      json_reformat uses two spaces for when indenting nested objects, let's
      do the same. The result of virJSONValueToString will be exactly the same
      as json_reformat would produce.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      7197e5fd
    • J
      666d7805
    • J
      qemu: Make virQEMUCapsNewForBinary usable from tests · b0b8517e
      Jiri Denemark 提交于
      virQEMUCapsNewForBinary unconditionally loads data from cache and probes
      using both QMP and -help parsing, which is suboptimal when we want to
      use it in tests.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      b0b8517e
    • J
      tests: Decouple preload code from main() · 18f63c17
      Jiri Denemark 提交于
      The new VIRT_TEST_PRELOAD macro does not force the caller to create a
      special main function which would need to be called through
      virtTestMain().
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      18f63c17
    • J
      tests: Create a shared library with qemu driver · dd214b5f
      Jiri Denemark 提交于
      Currently all qemu driver tests are statically linked to qemu driver
      library, which makes it impossible to mock any API from the library.
      This patch creates a shared qemu driver library which can be used
      instead of the static one.
      
      NB we can't use libvirt_driver_qemu.so directly since it is linked with
      -module and it is supposed to be dlopened.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      dd214b5f
    • R
      bhyve: implement domainShutdown · 9e0bb1c8
      Roman Bogorodskiy 提交于
      Bhyve supports ACPI shutdown by issuing SIGTERM signal to a bhyve
      process.
      
      Add the bhyveDomainShutdown() function and virBhyveProcessShutdown()
      helper function that just sends SIGTERM to VM's bhyve process. If
      a guest supports ACPI shutdown then process will be terminated and
      this event will be noticed by the bhyve monitor code that will handle
      setting proper status and clean up VM's resources by calling
      virBhyveProcessStop().
      9e0bb1c8
    • R
      bhyve: drop virProcessKillPainfully() from destroy · c35c2fe7
      Roman Bogorodskiy 提交于
      Current implementation of domainDestroy for bhyve calls
      virProcessKillPainfully() for the bhyve process and then
      executes "bhyvectl --destroy".
      
      This is wrong for two reasons:
      
       * bhyvectl --destroy alone is sufficient because it terminates
         the process
       * virProcessKillPainfully() first sends SIGTERM and after few
         attempts sends SIGKILL. As SIGTERM triggers ACPI shutdown that
         we're not interested in, it creates an unwanted side effect in
         domainDestroy.
      
      Also, destroy monitor only after "bhyvectl --destroy" command succeeded
      to avoid a case when the command fails and domain remains running, but
      not being monitored anymore.
      c35c2fe7
    • E
      build: fix 32-bit build of admin · a4ef8057
      Eric Blake 提交于
      We can't guarantee which 64-bit type will be used in an RPC struct;
      while %lu worked on 64-bit Linux, that won't always be the type
      used on all 64-bit platforms; and certainly is not right for 32-bit:
      
      admin.c: In function 'adminDispatchClientGetInfo':
      admin.c:265:25: error: format '%lu' expects argument of type 'long unsigned int', but argument 7 has type 'uint64_t {aka long long unsigned int}' [-Werror=format=]
      Signed-off-by: NEric Blake <eblake@redhat.com>
      a4ef8057
  3. 04 5月, 2016 18 次提交
  4. 03 5月, 2016 3 次提交