-
Notifications
You must be signed in to change notification settings - Fork 168
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
Automate case: Connect to the guest console without serial device #5865
Automate case: Connect to the guest console without serial device #5865
Conversation
cleaning libvirtd logs... |
@@ -70,6 +70,12 @@ | |||
serial_dev_type = pty | |||
console_target_type = virtio | |||
second_serial_console = yes | |||
- test_connect_to_console_without_serial_device: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a negative scenario. Can we use negative_test_without_serial_device or other related? This can help us debug auto case quickly after reading the case pattern.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change to test_connect_to_console_without_serial_device_negative_test
@@ -821,6 +823,11 @@ def get_console_type(): | |||
if console_type == 'server': | |||
console = prepare_serial_console() | |||
|
|||
if connect_to_console_without_serial_device: | |||
libvirt_version.is_libvirt_feature_supported(params) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest we add the libvirt_version.is_libvirt_feature_supported
in global but not only in if condition. So we can reuse it if we add new test scenarios later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this dependence version is specific to this case only, so keep it in specific case looks more sensible
- test_connect_to_console_without_serial_device: | ||
only x86_64 | ||
serial_dev_type = pty | ||
error_msg = "Cannot run interactive console without a controlling TTY" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where we get this error message? The actual message in our test is "error: internal error: cannot find character device ".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chunfuwen Have you got the expected error message after our last discussion?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@meinaLi the expected error message has been gotten, so update cfg file for responding it
@@ -835,6 +842,13 @@ def get_console_type(): | |||
console_type != 'server'): | |||
check_serial_console(console, username, password) | |||
|
|||
if connect_to_console_without_serial_device: | |||
# use raw virsh console command since we need to output message from virsh console VM | |||
result = process.run("virsh console %s" % vm_name, shell=True, verbose=True, ignore_status=True).stderr_text |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'd better to use virsh.command() but not process for virsh commands if there is no virsh.console related functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since it need second terminal to launch virsh console command, virsh.command will block execution
6505b9d
to
67f42e4
Compare
(1/1) type_specific.io-github-autotest-libvirt.serial.functional.test_connect_to_console_without_serial_device: STARTED |
@meinaLi script and test result has been updated, please double check them |
@@ -70,6 +70,12 @@ | |||
serial_dev_type = pty | |||
console_target_type = virtio | |||
second_serial_console = yes | |||
- test_connect_to_console_without_serial_device: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This name is redundant and different style from other cases. We might directly use connect_to_console_no_serial_device
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
@@ -70,6 +70,12 @@ | |||
serial_dev_type = pty | |||
console_target_type = virtio | |||
second_serial_console = yes | |||
- test_connect_to_console_without_serial_device: | |||
only x86_64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be no arch specific. Please remove it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
xx-300602 - [console][negative] Connect to the guest console without serial device Signed-off-by: chunfuwen <[email protected]>
67f42e4
to
569a1a7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Automate case: Connect to the guest console without serial device
xx-300602 - [console][negative] Connect to the guest console without serial device