Bug #17623
Fix test suite breaking when user connects to VM via virt-viewer
100%
Description
Subtasks
History
#1 Updated by segfault 2020-04-15 14:43:15
- Status changed from Confirmed to Needs Validation
- Assignee deleted (
segfault) - Feature Branch set to bugfix/17623-allow-connecting-via-virt-viewer
#2 Updated by segfault 2020-04-15 14:50:16
This might also fix the issues we occasionally see on Jenkins, where the screenshot just contains “Waiting for a guest domain to re-start” (see for example https://jenkins.tails.boum.org/job/test_Tails_ISO_devel/2060/artifact/build-artifacts/05%3A20%3A31_Watching_a_MP4_video_stored_on_the_non-persistent_filesystem.png).
#3 Updated by intrigeri 2020-04-16 06:19:22
Sounds good.
I’ve tried connecting to TailsToaster
with virt-viewer
while the test suite was running, and:
- On current stable, it fails because the test suite is stuck at
Screen: waiting for TailsGreeter.png
, while I do see the Welcome Screen invirt-viewer
. After pressingCTRL-c
I see lots ofimport-im6.q16: unable to open X server `:2'
error/import.c/ImportImageCommand/359@ errors. - On this branch, it succeeded once, and failed once: the system under test got stuck in the Greeter. Looks like the click on
TailsGreeterLoginButton.png
was lost. Everyvirt-viewer
instance I start disconnects immediately after showing me the screen for a fraction of second.
So, at this point, I’m not sure I understand what’s the goal of this branch.
What do we expect happens if a developer runs virt-viewer
themselves?
Should the test suite work exactly as if this had not happened?
IOW, what sort of breakage is this branch meant to fix, and what’s the expected resulting behavior (as opposed to “breaking”)?
#4 Updated by segfault 2020-04-16 10:00:56
intrigeri wrote:
> IOW, what sort of breakage is this branch meant to fix, and what’s the expected resulting behavior (as opposed to “breaking”)?
The breaking behavior (as I experience it on current stable): When I connect to TailsToaster via virt-viewer, the test suite only creates screenshots showing “”Waiting for a guest domain to re-start", so it fails the next time it searches for an image in a screenshot.
The expected behavior of this branch (as I experienced it in multiple local test runs): When I connect via virt-viewer, the test suite restarts its own virt-viewer connection the next time it creates a screenshot, resulting in a correct screenshot. My own virt-viewer connection gets closed at that point, but until then I can see what the test suite is doing and I can reconnect manually after the screenshot was being taken.
> * On this branch, it succeeded once, and failed once: the system under test got stuck in the Greeter. Looks like the click on TailsGreeterLoginButton.png
was lost. Every virt-viewer
instance I start disconnects immediately after showing me the screen for a fraction of second.
Oh, I didn’t see that issue yet. Let me check if it happened on Jenkins.
#5 Updated by segfault 2020-04-16 10:04:09
segfault wrote:
> > * On this branch, it succeeded once, and failed once: the system under test got stuck in the Greeter. Looks like the click on TailsGreeterLoginButton.png
was lost. Every virt-viewer
instance I start disconnects immediately after showing me the screen for a fraction of second.
>
> Oh, I didn’t see that issue yet. Let me check if it happened on Jenkins.
There is only one test result yet on Jenkins. I propose we let it run the test suite a few more times (5?) and see if any new issues occur there before we decide to merge this.
#6 Updated by intrigeri 2020-04-18 06:54:44
- Status changed from Needs Validation to In Progress
- Assignee set to segfault
> There is only one test result yet on Jenkins. I propose we let it run the test suite a few more times (5?) and see if any new issues occur there before we decide to merge this.
Sounds good.
#7 Updated by anonym 2020-04-21 10:36:20
segfault wrote:
> This might also fix the issues we occasionally see on Jenkins, where the screenshot just contains “Waiting for a guest domain to re-start” (see for example https://jenkins.tails.boum.org/job/test_Tails_ISO_devel/2060/artifact/build-artifacts/05%3A20%3A31_Watching_a_MP4_video_stored_on_the_non-persistent_filesystem.png).
That would be great! It does feel a bit odd to restart the display in its screenshot()
method, though, so please add a comment explaining why.
segfault wrote:
> intrigeri wrote:
> > IOW, what sort of breakage is this branch meant to fix, and what’s the expected resulting behavior (as opposed to “breaking”)?
>
> The breaking behavior (as I experience it on current stable): When I connect to TailsToaster via virt-viewer, the test suite only creates screenshots showing “”Waiting for a guest domain to re-start", so it fails the next time it searches for an image in a screenshot.
>
> The expected behavior of this branch (as I experienced it in multiple local test runs): When I connect via virt-viewer, the test suite restarts its own virt-viewer connection the next time it creates a screenshot, resulting in a correct screenshot. My own virt-viewer connection gets closed at that point, but until then I can see what the test suite is doing and I can reconnect manually after the screenshot was being taken.
I wonder why you want to do this. I sometimes take over the session with virt-viewer
to investigate a failure, but since it already has failed, the current scenario cannot be continued so I couldn’t care less. Can you elaborate what you are doing and why?
The very few times I have wanted to interact with the tested Tails’ desktop I have just used VNC (without -viewonly
), which avoids the problems of messing with the test suite’s virt-viewer
connection. I told you about this, but I guess you did not get it to work?
#8 Updated by anonym 2020-04-21 10:37:25
- related to Feature #16209: Core work: Foundations Team added
#9 Updated by intrigeri 2020-04-22 13:55:03
> The very few times I have wanted to interact with the tested Tails’ desktop I have just used VNC (without -viewonly
), which avoids the problems of messing with the test suite’s virt-viewer
connection. I told you about this, but I guess you did not get it to work?
Does this work on Wayland?
#10 Updated by intrigeri 2020-04-22 13:55:51
- related to deleted (
Feature #16209: Core work: Foundations Team)
#11 Updated by intrigeri 2020-04-22 13:55:56
- blocks Feature #16209: Core work: Foundations Team added
#12 Updated by segfault 2020-04-26 12:09:19
anonym wrote:
> segfault wrote:
> > This might also fix the issues we occasionally see on Jenkins, where the screenshot just contains “Waiting for a guest domain to re-start” (see for example https://jenkins.tails.boum.org/job/test_Tails_ISO_devel/2060/artifact/build-artifacts/05%3A20%3A31_Watching_a_MP4_video_stored_on_the_non-persistent_filesystem.png).
>
> That would be great! It does feel a bit odd to restart the display in its screenshot()
method, though, so please add a comment explaining why.
Done.
> segfault wrote:
> > intrigeri wrote:
> > > IOW, what sort of breakage is this branch meant to fix, and what’s the expected resulting behavior (as opposed to “breaking”)?
> >
> > The breaking behavior (as I experience it on current stable): When I connect to TailsToaster via virt-viewer, the test suite only creates screenshots showing “”Waiting for a guest domain to re-start", so it fails the next time it searches for an image in a screenshot.
> >
> > The expected behavior of this branch (as I experienced it in multiple local test runs): When I connect via virt-viewer, the test suite restarts its own virt-viewer connection the next time it creates a screenshot, resulting in a correct screenshot. My own virt-viewer connection gets closed at that point, but until then I can see what the test suite is doing and I can reconnect manually after the screenshot was being taken.
>
> I wonder why you want to do this. I sometimes take over the session with virt-viewer
to investigate a failure, but since it already has failed, the current scenario cannot be continued so I couldn’t care less. Can you elaborate what you are doing and why?
I think I was just checking on what the VM was doing because I was waiting for the test result. And because I use virt-manager extensively when working on Tails, I see the TailsToaster listed there and see that it’s running, so it’s very convenient and even tempting to just click on it and take a look. But it’s very inconvenient that that causes the currently running scenario to fail.
> The very few times I have wanted to interact with the tested Tails’ desktop I have just used VNC (without -viewonly
), which avoids the problems of messing with the test suite’s virt-viewer
connection. I told you about this, but I guess you did not get it to work?
I remember that I had issues with VNC when you suggested it to me but to be honest I’m not sure if I got it to work in the end. Anyway, I don’t see why we shouldn’t support virt-viewer in addition to VNC.
#13 Updated by segfault 2020-04-26 12:11:24
- Status changed from In Progress to Needs Validation
- Assignee deleted (
segfault)
segfault wrote:
> This might also fix the issues we occasionally see on Jenkins, where the screenshot just contains “Waiting for a guest domain to re-start” (see for example https://jenkins.tails.boum.org/job/test_Tails_ISO_devel/2060/artifact/build-artifacts/05%3A20%3A31_Watching_a_MP4_video_stored_on_the_non-persistent_filesystem.png).
This issue didn’t occur in the 10 test runs we currently have for this branch on Jenkins.
intrigeri wrote:
> * On this branch, it succeeded once, and failed once: the system under test got stuck in the Greeter. Looks like the click on TailsGreeterLoginButton.png
was lost. Every virt-viewer
instance I start disconnects immediately after showing me the screen for a fraction of second.
This issue also didn’t occur.
#14 Updated by CyrilBrulebois 2020-05-06 04:29:00
- Target version changed from Tails_4.6 to Tails_4.7
#15 Updated by intrigeri 2020-05-10 19:06:09
- Assignee set to intrigeri
segfault wrote:
> intrigeri wrote:
>> * On this branch, it succeeded once, and failed once: the system under test got stuck in the Greeter. Looks like the click on TailsGreeterLoginButton.png
was lost. Every virt-viewer
instance I start disconnects immediately after showing me the screen for a fraction of second.
>
> This issue also didn’t occur.
I doubt this problem will ever happen on Jenkins. I saw this problem only locally, after “I’ve tried connecting to TailsToaster
with virt-viewer
while the test suite was running”, i.e. when trying to get the benefits I see described in the title of this issue (which I’m very interested in since we don’t support --view
under Wayland and I don’t know if the VNC tricks mentioned by @anonym will work under Wayland; and anyway, even if that would work, it would be much less convenient for me than clicking on the TailsToaster VM in virt-manager).
That first personal experience put me under the impression that even with this branch merged, I still can’t use virt-viewer
without risking breaking the test suite. It might have been a one-off unrelated problem though, and I’m happy to retry, so let’s not draw conclusions out of it, and given this branch improves things for you, and nobody said it made things worse for them, I’m in favor of merging it.
I’ll check Jenkins results and will merge if happy.
#16 Updated by intrigeri 2020-05-10 19:17:33
- Status changed from Needs Validation to Resolved
- % Done changed from 0 to 100
Applied in changeset commit:tails|7f78e456ac41ba464ae7c65b3c66fed554cc4e30.