Skip to content

Commit

Permalink
IPU: Checking virtiofsd's version
Browse files Browse the repository at this point in the history
Signed-off-by: Miriam Deng <[email protected]>
  • Loading branch information
MiriamDeng committed Sep 29, 2024
1 parent 9dff199 commit 34bbeae
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
19 changes: 19 additions & 0 deletions provider/in_place_upgrade_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,3 +176,22 @@ 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"
if post_release == "release 9":
expected_fsd = "el9"
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

0 comments on commit 34bbeae

Please sign in to comment.