Skip to content

Commit

Permalink
Merge pull request #3112 from 6-dehan/for-qga-container-revert
Browse files Browse the repository at this point in the history
Revert "Add new case that start qga container"
  • Loading branch information
vivianQizhu authored Dec 7, 2021
2 parents ed8178c + 50e55b7 commit d0116d1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 60 deletions.
9 changes: 0 additions & 9 deletions qemu/tests/cfg/qemu_guest_agent.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -515,15 +515,6 @@
input_dev_type_input1 = keyboard
input_dev_type_input2 = mouse
input_dev_type_input3 = tablet
- gagent_container:
only Linux
no RHEL.8.0, RHEL.8.1
gagent_check_type = container
gagent_container_start_cmd = "podman start qemu-guest-agent"
get_target_ver_cmd = "cat /refer_ver.txt"
get_container_ver_cmd = "podman inspect qemu-guest-agent | grep %s"
# Please define create_container_cmd before this test:
# create_container_cmd = podman create --name qemu-guest-agent --network xxx --privileged --volume xxx:xxx --pull missing qemu-guest-agent:xxx
- gagent_ssh_public_key_injection:
only Linux
guest_user = "fedora"
Expand Down
51 changes: 0 additions & 51 deletions qemu/tests/qemu_guest_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from avocado.core import exceptions
from aexpect.exceptions import ShellTimeoutError

from virttest import utils_package
from virttest import error_context
from virttest import guest_agent
from virttest import utils_misc
Expand Down Expand Up @@ -478,56 +477,6 @@ def gagent_check_guest_info(self, test, params, env):
test.fail("The qga version %s from qga is different with %s "
"from guest." % (qga_ver_qga, qga_ver_guest))

@error_context.context_aware
def gagent_check_container(self, test, params, env):
"""
Start qga container behavior only for linux guest
and release version above rhel8.2.0 now:
steps:
1) Prepare for container that stop qga.service and
install podman.
2) Create qga container.
3) start qga container.
4) Check target qga pkg we aim to test.
:param test: kvm test object
:param params: Dictionary with the test parameters
:param env: Dictionary with test environmen.
"""

session = self._get_session(params, None)
self._open_session_list.append(session)

error_context.context("Prepare env for qemu-ga container.",
logging.info)
self.gagent_stop(session, self.vm)
utils_package.package_install('podman', session)

error_context.context("Create a qemu-ga container.", logging.info)
cmd_create_container = params["create_container_cmd"]
s, o = session.cmd_status_output(cmd_create_container, timeout=120)
if s or "ERROR" in o:
test.fail("Could not create qemu-ga container in VM '%s',"
" detail: '%s'" % (self.vm.name, o))

error_context.context("Try to start qemu-guest-agent container.",
logging.info)
s, o = session.cmd_status_output(params["gagent_container_start_cmd"])
if s or "qemu-guest-agent" not in o:
test.fail("Could not start qemu-ga container in VM '%s',"
" detail: '%s'" % (self.vm.name, o))

error_context.context("Check the latest version of qemu-ga container.",
logging.info)
target_ver = session.cmd_output(params["get_target_ver_cmd"]).strip()
cmd_get_container_ver_guest = params["get_container_ver_cmd"] % target_ver
s, o = session.cmd_status_output(cmd_get_container_ver_guest)
if s or target_ver not in o:
test.fail("The latest qemu-ga container's version is not same as"
" the target version.")

self.gagent_verify(self.params, self.vm)

@error_context.context_aware
def __gagent_check_shutdown(self, shutdown_mode):
error_context.context("Check guest agent command 'guest-shutdown'"
Expand Down

0 comments on commit d0116d1

Please sign in to comment.