1. 23 9月, 2016 7 次提交
    • F
      crypto: Switch to QEMU UUID API · 2ef950f9
      Fam Zheng 提交于
      The uuid generation doesn't return error, so update the function
      signature and calling code accordingly.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NJeff Cody <jcody@redhat.com>
      Message-Id: <1474432046-325-7-git-send-email-famz@redhat.com>
      Reviewed-by: NDaniel P. Berrange <berrange@redhat.com>
      2ef950f9
    • F
      vpc: Use QEMU UUID API · 38440a21
      Fam Zheng 提交于
      Previously we conditionally generated footer->uuid, when libuuid was
      available. Now that we have a built-in implementation, we can switch to
      it.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NJeff Cody <jcody@redhat.com>
      Message-Id: <1474432046-325-6-git-send-email-famz@redhat.com>
      38440a21
    • F
      vdi: Use QEMU UUID API · 7c6f55b6
      Fam Zheng 提交于
      The UUID operations we need from libuuid are fully supported by QEMU UUID
      implementation. Use it, and remove the unused code.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NJeff Cody <jcody@redhat.com>
      Message-Id: <1474432046-325-5-git-send-email-famz@redhat.com>
      7c6f55b6
    • F
      vhdx: Use QEMU UUID API · cb6414df
      Fam Zheng 提交于
      This removes our dependency to libuuid, so that the driver can always be
      built.
      
      Similar to how we handled data plane configure options, --enable-vhdx
      and --disable-vhdx are also changed to a nop with a message saying it's
      obsolete.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NJeff Cody <jcody@redhat.com>
      Message-Id: <1474432046-325-4-git-send-email-famz@redhat.com>
      cb6414df
    • F
      uuid: Make null_uuid static · 3630be75
      Fam Zheng 提交于
      So that it doesn't have to be zeroed at each call.
      Suggested-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Reviewed-by: NJeff Cody <jcody@redhat.com>
      Message-Id: <1474432046-325-3-git-send-email-famz@redhat.com>
      3630be75
    • F
      util: Add UUID API · cea25275
      Fam Zheng 提交于
      A number of different places across the code base use CONFIG_UUID. Some
      of them are soft dependency, some are not built if libuuid is not
      available, some come with dummy fallback, some throws runtime error.
      
      It is hard to maintain, and hard to reason for users.
      
      Since UUID is a simple standard with only a small number of operations,
      it is cleaner to have a central support in libqemuutil. This patch adds
      qemu_uuid_* functions that all uuid users in the code base can
      rely on. Except for qemu_uuid_generate which is new code, all other
      functions are just copy from existing fallbacks from other files.
      
      Note that qemu_uuid_parse is moved without updating the function
      signature to use QemuUUID, to keep this patch simple.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NJeff Cody <jcody@redhat.com>
      Message-Id: <1474432046-325-2-git-send-email-famz@redhat.com>
      cea25275
    • E
      docker: Handle exceptions when looking for docker command · 0679f98b
      Eduardo Habkost 提交于
      When trying to run docker tests on a host without the docker
      command,  we get the following Python backtrace:
      
        $ make docker-test-quick@centos6 V=1
        .../qemu/tests/docker/docker.py build qemu:centos6 .../qemu/tests/docker/dockerfiles/centos6.docker
        Traceback (most recent call last):
          File ".../qemu/tests/docker/docker.py", line 339, in <module>
            sys.exit(main())
          File ".../qemu/tests/docker/docker.py", line 336, in main
            return args.cmdobj.run(args, argv)
          File ".../qemu/tests/docker/docker.py", line 231, in run
            dkr = Docker()
          File ".../qemu/tests/docker/docker.py", line 98, in __init__
            self._command = _guess_docker_command()
          File ".../qemu/tests/docker/docker.py", line 41, in _guess_docker_command
            stdout=DEVNULL, stderr=DEVNULL) == 0:
          File "/usr/lib64/python2.7/subprocess.py", line 523, in call
            return Popen(*popenargs, **kwargs).wait()
          File "/usr/lib64/python2.7/subprocess.py", line 711, in __init__
            errread, errwrite)
          File "/usr/lib64/python2.7/subprocess.py", line 1343, in _execute_child
            raise child_exception
        OSError: [Errno 2] No such file or directory
        .../qemu/tests/docker/Makefile.include:47: recipe for target 'docker-image-centos6' failed
        make: *** [docker-image-centos6] Error 1
      
      Change _guess_docker_command() to handle OSError exceptions
      raised by subprocess.call(), so we will keep looking for other
      commands and print a better error message.
      
      New output will be:
      
        $ make docker-test-quick@centos6 V=1
        .../qemu/tests/docker/docker.py build qemu:centos6 .../qemu/tests/docker/dockerfiles/centos6.docker
        Traceback (most recent call last):
          File ".../qemu/tests/docker/docker.py", line 343, in <module>
            sys.exit(main())
          File ".../qemu/tests/docker/docker.py", line 340, in main
            return args.cmdobj.run(args, argv)
          File ".../qemu/tests/docker/docker.py", line 235, in run
            dkr = Docker()
          File ".../qemu/tests/docker/docker.py", line 102, in __init__
            self._command = _guess_docker_command()
          File ".../qemu/tests/docker/docker.py", line 49, in _guess_docker_command
            commands_txt)
        Exception: Cannot find working docker command. Tried:
          docker
          sudo -n docker
        .../qemu/tests/docker/Makefile.include:47: recipe for target 'docker-image-centos6' failed
        make: *** [docker-image-centos6] Error 1
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <1474369559-16903-1-git-send-email-ehabkost@redhat.com>
      [exceptions.OSError -> OSError and drop the import. - Fam]
      Signed-off-by: NFam Zheng <famz@redhat.com>
      0679f98b
  2. 22 9月, 2016 15 次提交
  3. 21 9月, 2016 18 次提交