On 5/28/20 1:07 PM, Alex Bennée wrote: > > Philippe Mathieu-Daudé <phi...@redhat.com> writes: > >> On 5/28/20 9:12 AM, Pavel Dovgalyuk wrote: >>> >>> On 27.05.2020 17:53, Philippe Mathieu-Daudé wrote: >>>> On 5/27/20 12:31 PM, Pavel Dovgalyuk wrote: >>>>> This patch adds a test for record/replay an execution of x86_64 machine. >>>>> Execution scenario includes simple kernel boot, which allows testing >>>>> basic hardware interaction in RR mode. >>>>> >>>>> Signed-off-by: Pavel Dovgalyuk <pavel.dovga...@ispras.ru> >>>>> --- >>>>> 0 files changed >>>>> >>>>> diff --git a/tests/acceptance/replay_kernel.py >>>>> b/tests/acceptance/replay_kernel.py >>>>> index b8b277ad2f..c7526f1aba 100644 >>>>> --- a/tests/acceptance/replay_kernel.py >>>>> +++ b/tests/acceptance/replay_kernel.py >>>>> @@ -55,3 +55,19 @@ class ReplayKernel(LinuxKernelUtils): >>>>> True, shift, args) >>>>> self.run_vm(kernel_path, kernel_command_line, console_pattern, >>>>> False, shift, args) >>>>> + >>>>> + def test_x86_64_pc(self): >>>>> + """ >>>>> + :avocado: tags=arch:x86_64 >>>>> + :avocado: tags=machine:pc >>>>> + """ >>>>> + kernel_url = >>>>> ('https://archives.fedoraproject.org/pub/archive/fedora' >>>>> + >>>>> '/linux/releases/29/Everything/x86_64/os/images/pxeboot' >>>>> + '/vmlinuz') >>>>> + kernel_hash = '23bebd2680757891cf7adedb033532163a792495' >>>>> + kernel_path = self.fetch_asset(kernel_url, >>>>> asset_hash=kernel_hash) >>>>> + >>>>> + kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + >>>>> 'console=ttyS0' >>>>> + console_pattern = 'Kernel command line: %s' % >>>>> kernel_command_line >>>>> + >>>>> + self.run_rr(kernel_path, kernel_command_line, console_pattern) >>>>> >>>> This one timeouted (I build with --enable-debug): >>> >>> I've got the strange behavior for the couple of times. >>> >>> Console output was correct (I saw 'Kernel command line' in logs), but >>> _console_interation function didn't notice it. >>> >>> Therefore the test finished with timeout. >>> >>> How this could be possible? >> >> IIRC there is a problem in how Avocado consume the chardev output. > > Is this the same problem Robert has tried to work around in tests/vm? > > From: Robert Foley <robert.fo...@linaro.org> > Subject: [PATCH v7 12/12] tests/vm: Add workaround to consume console > Date: Tue, 19 May 2020 09:22:59 -0400 > Message-Id: <20200519132259.405-13-robert.fo...@linaro.org>
Exactly! I guess Marc-André or Eduardo suggested the same fix (use a dedicated polling thread). > >> >> Cleber has been working on some PoC / kludge. >> >> Cleber/Eduardo do you remember the problem? >> >>> >>>> (1/1) tests/acceptance/replay_kernel.py:ReplayKernel.test_x86_64_pc: >>>> replay: recording... >>>> replay: replaying... >>>> INTERRUPTED: Test interrupted by SIGTERM\nRunner error occurred: Timeout >>>> reached\nOriginal status: ERROR\n{'name': >>>> '1-tests/acceptance/replay_kernel.py:ReplayKernel.test_x86_64_pc', >>>> 'logdir': >>>> 'avocado/job-results/job-2020-05-27T16.48-71d7bf4/test-results/1-tes... >>>> (90.68 s) >>>> >>> > >