Skip to content

Commit

Permalink
qemu_guest_agent: Called before the variable is assigned
Browse files Browse the repository at this point in the history
add_line_at_end is called before the {guest_homepath} is
assigned. same as cmd_get_guestkey, cmd_del_key_file.

Signed-off-by: Dehan Meng <[email protected]>
  • Loading branch information
6-dehan committed Jan 20, 2025
1 parent bd33da7 commit 5a6b808
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions qemu/tests/cfg/qemu_guest_agent.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -555,9 +555,6 @@
cmd_clean_keys = rm -rf ~/.ssh/*
ssh_keygen_cmd = "ssh-keygen -t rsa -P "" -f ~/.ssh/id_rsa"
cmd_get_hostkey = "cat ~/.ssh/id_rsa.pub"
add_line_at_end = "echo >> ${guest_homepath}/.ssh/authorized_keys"
cmd_get_guestkey = "cat ${guest_homepath}/.ssh/authorized_keys"
cmd_del_key_file = "rm -rf ${guest_homepath}/.ssh/authorized_keys"
cmd_install_sshpass = "dnf -y install sshpass"
# Please set user password
# guest_user_passwd =
Expand All @@ -568,6 +565,7 @@
guest_homepath = /${guest_user}
test_login_guest = ssh ${guest_user}@%s -o StrictHostKeyChecking=no ls ${guest_homepath}
output_check_str = 'anaconda-ks.cfg'
cmd_get_guestkey = "cat ${guest_homepath}/.ssh/authorized_keys"
- non_root_user:
only Linux
guest_user = "fedora"
Expand All @@ -576,6 +574,7 @@
cmd_remove_user = userdel -rf ${guest_user}
test_login_guest = ssh ${guest_user}@%s -o StrictHostKeyChecking=no ls '/home'
output_check_str = '${guest_user}'
cmd_get_guestkey = "cat ${guest_homepath}/.ssh/authorized_keys"
- administrator:
only Windows
guest_user = "Administrator"
Expand All @@ -595,6 +594,8 @@
cmd_sshpass = 'sshpass -p %s ssh ${guest_user}@%s -o StrictHostKeyChecking=no dir "${guest_homepath}"'
test_login_guest = ssh ${guest_user}@%s -o StrictHostKeyChecking=no dir "${guest_homepath}"
output_check_str = "Downloads"
add_line_at_end = "echo >> ${guest_homepath}/.ssh/authorized_keys"
cmd_del_key_file = "rm -rf ${guest_homepath}/.ssh/authorized_keys"
- check_get_cpustats:
only Linux
no RHEL.7 RHEL.8 RHEL.9.1 RHEL.9.0
Expand Down

0 comments on commit 5a6b808

Please sign in to comment.