Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPU: Checking virtiofsd's version #4169

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions provider/in_place_upgrade_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,3 +176,25 @@ def post_upgrade_restore(self, test):
test.fail("Failed to restart sshd: %s" % o)
except Exception as error:
test.fail("Failed to restore permit: %s" % str(error))

def check_version_virtiofsd(self, test):
"""
Check virtiofsd's version
"""
try:
virtiofsd = self.params.get("chk_virtiofsd")
status, actual_fsd = self.session.cmd_status_output(virtiofsd)
post_release = self.params.get("post_release")
if post_release == "release 10":
expected_fsd = "el10"
elif post_release == "release 9":
expected_fsd = "el9"
else:
# No virtiofsd on rhel7 so skip test from rhel7 to rhel8
expected_fsd = "el8"
if not re.search(expected_fsd, actual_fsd):
test.fail("Actual result: %s, expected result: %s"
% (actual_fsd, expected_fsd))
except Exception as error:
test.fail("virtiofsd's version is not expected : %s"
% str(error))
1 change: 1 addition & 0 deletions qemu/tests/cfg/in_place_upgrade.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
stop_yum_update = "rm -rf /var/run/yum.pid"
check_repo_list = "yum repolist enabled"
check_rhel_ver = "cut -f1-2 -d. /etc/redhat-release | sed 's/[^0-9]//g'"
chk_virtiofsd = "rpm -qa | grep virtiofsd"
s390,s390x:
# no need to check in host, and we don't support RHEL.7.9 as the
# host on s390x
Expand Down
2 changes: 2 additions & 0 deletions qemu/tests/in_place_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ def run(test, params, env):
upgrade_test.post_upgrade_restore(test)
# post checking
upgrade_test.post_upgrade_check(test, post_release)
# check virtiofsd's version
upgrade_test.check_version_virtiofsd(test)
post_rhel_ver = upgrade_test.run_guest_cmd(check_rhel_ver)
vm.verify_kernel_crash()
if params.get("device_cio_free_check_cmd"):
Expand Down
Loading