The reverse debugging test uses the avocado datadrainer class to
create a background thread that reads from the console socket and
dumps it via python logger.
Most tests log console output as a side effect of doing calls
to match strings, but this test never tries to match anything.
This isn't critical, so just drop the functionality.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
tests/functional/reverse_debugging.py | 6 ------
1 file changed, 6 deletions(-)
diff --git a/tests/functional/reverse_debugging.py b/tests/functional/reverse_debugging.py
index 1b880cda8f..9c89f5c897 100644
--- a/tests/functional/reverse_debugging.py
+++ b/tests/functional/reverse_debugging.py
@@ -35,8 +35,6 @@ class ReverseDebugging(LinuxKernelTest):
endian_is_le = True
def run_vm(self, record, shift, args, replay_path, image_path, port):
- from avocado.utils import datadrainer
-
logger = logging.getLogger('replay')
vm = self.get_vm(name='record' if record else 'replay')
vm.set_console()
@@ -54,10 +52,6 @@ def run_vm(self, record, shift, args, replay_path, image_path, port):
if args:
vm.add_args(*args)
vm.launch()
- console_drainer = datadrainer.LineLogger(vm.console_socket.fileno(),
- logger=self.log.getChild('console'),
- stop_check=(lambda : not vm.is_running()))
- console_drainer.start()
return vm
@staticmethod
--
2.50.1
Daniel P. Berrangé <berrange@redhat.com> writes: > The reverse debugging test uses the avocado datadrainer class to > create a background thread that reads from the console socket and > dumps it via python logger. > > Most tests log console output as a side effect of doing calls > to match strings, but this test never tries to match anything. > > This isn't critical, so just drop the functionality. > > Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> -- Alex Bennée Virtualisation Tech Lead @ Linaro
Daniel P. Berrangé <berrange@redhat.com> writes: > The reverse debugging test uses the avocado datadrainer class to > create a background thread that reads from the console socket and > dumps it via python logger. > > Most tests log console output as a side effect of doing calls > to match strings, but this test never tries to match anything. > > This isn't critical, so just drop the functionality. We do end up with zero length logs for all console output although I don't know if we got that far before: ➜ find tests/functional/ -iwholename "*reverse_debug*log" -exec ls -l {} \; -rw-rw-r-- 1 alex alex 3196 Aug 26 10:18 tests/functional/aarch64/test_aarch64_reverse_debug.ReverseDebugging_AArch64.test_aarch64_virt/base.log -rw-rw-r-- 1 alex alex 0 Aug 26 10:18 tests/functional/aarch64/test_aarch64_reverse_debug.ReverseDebugging_AArch64.test_aarch64_virt/record.log -rw-rw-r-- 1 alex alex 0 Aug 26 10:18 tests/functional/aarch64/test_aarch64_reverse_debug.ReverseDebugging_AArch64.test_aarch64_virt/console.log -rw-rw-r-- 1 alex alex 0 Aug 26 10:18 tests/functional/aarch64/test_aarch64_reverse_debug.ReverseDebugging_AArch64.test_aarch64_virt/replay.log -rw-rw-r-- 1 alex alex 5968 Sep 15 11:09 tests/functional/aarch64/test_reverse_debug.ReverseDebugging_AArch64.test_aarch64_virt/base.log -rw-rw-r-- 1 alex alex 0 Sep 15 11:09 tests/functional/aarch64/test_reverse_debug.ReverseDebugging_AArch64.test_aarch64_virt/record.log -rw-rw-r-- 1 alex alex 0 Sep 15 11:09 tests/functional/aarch64/test_reverse_debug.ReverseDebugging_AArch64.test_aarch64_virt/console.log -rw-rw-r-- 1 alex alex 0 Sep 15 11:09 tests/functional/aarch64/test_reverse_debug.ReverseDebugging_AArch64.test_aarch64_virt/replay.log -rw-rw-r-- 1 alex alex 2656 Aug 26 10:04 tests/functional/ppc64/test_ppc64_reverse_debug.ReverseDebugging_ppc64.test_ppc64_pseries/base.log -rw-rw-r-- 1 alex alex 258 Aug 26 10:04 tests/functional/ppc64/test_ppc64_reverse_debug.ReverseDebugging_ppc64.test_ppc64_pseries/record.log -rw-rw-r-- 1 alex alex 0 Aug 26 10:04 tests/functional/ppc64/test_ppc64_reverse_debug.ReverseDebugging_ppc64.test_ppc64_pseries/console.log -rw-rw-r-- 1 alex alex 516 Aug 26 10:04 tests/functional/ppc64/test_ppc64_reverse_debug.ReverseDebugging_ppc64.test_ppc64_pseries/replay.log -rw-rw-r-- 1 alex alex 2620 Sep 4 18:03 tests/functional/ppc64/test_reverse_debug.ReverseDebugging_ppc64.test_ppc64_pseries/base.log -rw-rw-r-- 1 alex alex 258 Sep 4 18:03 tests/functional/ppc64/test_reverse_debug.ReverseDebugging_ppc64.test_ppc64_pseries/record.log -rw-rw-r-- 1 alex alex 0 Sep 4 18:03 tests/functional/ppc64/test_reverse_debug.ReverseDebugging_ppc64.test_ppc64_pseries/console.log -rw-rw-r-- 1 alex alex 516 Sep 4 18:03 tests/functional/ppc64/test_reverse_debug.ReverseDebugging_ppc64.test_ppc64_pseries/replay.log -rw-rw-r-- 1 alex alex 2656 Aug 26 10:04 tests/functional/ppc64/test_ppc64_reverse_debug.ReverseDebugging_ppc64.test_ppc64_powernv/base.log -rw-rw-r-- 1 alex alex 0 Aug 26 10:04 tests/functional/ppc64/test_ppc64_reverse_debug.ReverseDebugging_ppc64.test_ppc64_powernv/record.log -rw-rw-r-- 1 alex alex 0 Aug 26 10:04 tests/functional/ppc64/test_ppc64_reverse_debug.ReverseDebugging_ppc64.test_ppc64_powernv/console.log -rw-rw-r-- 1 alex alex 0 Aug 26 10:04 tests/functional/ppc64/test_ppc64_reverse_debug.ReverseDebugging_ppc64.test_ppc64_powernv/replay.log -rw-rw-r-- 1 alex alex 4810 Sep 15 11:09 tests/functional/ppc64/test_reverse_debug.ReverseDebugging_ppc64.test_ppc64_powernv/base.log -rw-rw-r-- 1 alex alex 0 Sep 15 11:09 tests/functional/ppc64/test_reverse_debug.ReverseDebugging_ppc64.test_ppc64_powernv/record.log -rw-rw-r-- 1 alex alex 0 Sep 15 11:09 tests/functional/ppc64/test_reverse_debug.ReverseDebugging_ppc64.test_ppc64_powernv/console.log -rw-rw-r-- 1 alex alex 118 Sep 15 11:11 tests/functional/ppc64/test_reverse_debug.ReverseDebugging_ppc64.test_ppc64_powernv/replay.log -rw-rw-r-- 1 alex alex 2642 Aug 26 10:05 tests/functional/x86_64/test_x86_64_reverse_debug.ReverseDebugging_X86_64.test_x86_64_pc/base.log -rw-rw-r-- 1 alex alex 0 Aug 26 10:05 tests/functional/x86_64/test_x86_64_reverse_debug.ReverseDebugging_X86_64.test_x86_64_pc/record.log -rw-rw-r-- 1 alex alex 0 Aug 26 10:05 tests/functional/x86_64/test_x86_64_reverse_debug.ReverseDebugging_X86_64.test_x86_64_pc/console.log -rw-rw-r-- 1 alex alex 0 Aug 26 10:05 tests/functional/x86_64/test_x86_64_reverse_debug.ReverseDebugging_X86_64.test_x86_64_pc/replay.log -rw-rw-r-- 1 alex alex 5317 Sep 15 11:09 tests/functional/x86_64/test_reverse_debug.ReverseDebugging_X86_64.test_x86_64_pc/base.log -rw-rw-r-- 1 alex alex 0 Sep 15 11:09 tests/functional/x86_64/test_reverse_debug.ReverseDebugging_X86_64.test_x86_64_pc/record.log -rw-rw-r-- 1 alex alex 0 Sep 15 11:09 tests/functional/x86_64/test_reverse_debug.ReverseDebugging_X86_64.test_x86_64_pc/console.log -rw-rw-r-- 1 alex alex 0 Sep 15 11:09 tests/functional/x86_64/test_reverse_debug.ReverseDebugging_X86_64.test_x86_64_pc/replay.log > > Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> > --- > tests/functional/reverse_debugging.py | 6 ------ > 1 file changed, 6 deletions(-) > > diff --git a/tests/functional/reverse_debugging.py b/tests/functional/reverse_debugging.py > index 1b880cda8f..9c89f5c897 100644 > --- a/tests/functional/reverse_debugging.py > +++ b/tests/functional/reverse_debugging.py > @@ -35,8 +35,6 @@ class ReverseDebugging(LinuxKernelTest): > endian_is_le = True > > def run_vm(self, record, shift, args, replay_path, image_path, port): > - from avocado.utils import datadrainer > - > logger = logging.getLogger('replay') > vm = self.get_vm(name='record' if record else 'replay') > vm.set_console() > @@ -54,10 +52,6 @@ def run_vm(self, record, shift, args, replay_path, image_path, port): > if args: > vm.add_args(*args) > vm.launch() > - console_drainer = datadrainer.LineLogger(vm.console_socket.fileno(), > - logger=self.log.getChild('console'), > - stop_check=(lambda : not vm.is_running())) > - console_drainer.start() > return vm > > @staticmethod -- Alex Bennée Virtualisation Tech Lead @ Linaro
On Mon, Sep 15, 2025 at 11:18:09AM +0100, Alex Bennée wrote: > Daniel P. Berrangé <berrange@redhat.com> writes: > > > The reverse debugging test uses the avocado datadrainer class to > > create a background thread that reads from the console socket and > > dumps it via python logger. > > > > Most tests log console output as a side effect of doing calls > > to match strings, but this test never tries to match anything. > > > > This isn't critical, so just drop the functionality. > > We do end up with zero length logs for all console output although I don't know > if we got that far before: AFAICT, the logs were also zero-length with the current code. When I ran it with the datadrainer code, there didn't seem to be any output to be drained. I'm unclear if that's expected or a sign I did something wrong, or something has broken since the test was first written ? > > Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> > > --- > > tests/functional/reverse_debugging.py | 6 ------ > > 1 file changed, 6 deletions(-) > > > > diff --git a/tests/functional/reverse_debugging.py b/tests/functional/reverse_debugging.py > > index 1b880cda8f..9c89f5c897 100644 > > --- a/tests/functional/reverse_debugging.py > > +++ b/tests/functional/reverse_debugging.py > > @@ -35,8 +35,6 @@ class ReverseDebugging(LinuxKernelTest): > > endian_is_le = True > > > > def run_vm(self, record, shift, args, replay_path, image_path, port): > > - from avocado.utils import datadrainer > > - > > logger = logging.getLogger('replay') > > vm = self.get_vm(name='record' if record else 'replay') > > vm.set_console() > > @@ -54,10 +52,6 @@ def run_vm(self, record, shift, args, replay_path, image_path, port): > > if args: > > vm.add_args(*args) > > vm.launch() > > - console_drainer = datadrainer.LineLogger(vm.console_socket.fileno(), > > - logger=self.log.getChild('console'), > > - stop_check=(lambda : not vm.is_running())) > > - console_drainer.start() > > return vm > > > > @staticmethod > > -- > Alex Bennée > Virtualisation Tech Lead @ Linaro > With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
Daniel P. Berrangé <berrange@redhat.com> writes: > On Mon, Sep 15, 2025 at 11:18:09AM +0100, Alex Bennée wrote: >> Daniel P. Berrangé <berrange@redhat.com> writes: >> >> > The reverse debugging test uses the avocado datadrainer class to >> > create a background thread that reads from the console socket and >> > dumps it via python logger. >> > >> > Most tests log console output as a side effect of doing calls >> > to match strings, but this test never tries to match anything. >> > >> > This isn't critical, so just drop the functionality. >> >> We do end up with zero length logs for all console output although I don't know >> if we got that far before: > > AFAICT, the logs were also zero-length with the current code. > When I ran it with the datadrainer code, there didn't seem > to be any output to be drained. I'm unclear if that's expected > or a sign I did something wrong, or something has broken since > the test was first written ? Hmm looking at test it looks like it only runs the first few instructions so unlikely to have any output. This makes me more inclined just to port to the check-tcg tests where we have control of the binary and we can more easily verify things are working as they should. > > >> > Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> >> > --- >> > tests/functional/reverse_debugging.py | 6 ------ >> > 1 file changed, 6 deletions(-) >> > >> > diff --git a/tests/functional/reverse_debugging.py b/tests/functional/reverse_debugging.py >> > index 1b880cda8f..9c89f5c897 100644 >> > --- a/tests/functional/reverse_debugging.py >> > +++ b/tests/functional/reverse_debugging.py >> > @@ -35,8 +35,6 @@ class ReverseDebugging(LinuxKernelTest): >> > endian_is_le = True >> > >> > def run_vm(self, record, shift, args, replay_path, image_path, port): >> > - from avocado.utils import datadrainer >> > - >> > logger = logging.getLogger('replay') >> > vm = self.get_vm(name='record' if record else 'replay') >> > vm.set_console() >> > @@ -54,10 +52,6 @@ def run_vm(self, record, shift, args, replay_path, image_path, port): >> > if args: >> > vm.add_args(*args) >> > vm.launch() >> > - console_drainer = datadrainer.LineLogger(vm.console_socket.fileno(), >> > - logger=self.log.getChild('console'), >> > - stop_check=(lambda : not vm.is_running())) >> > - console_drainer.start() >> > return vm >> > >> > @staticmethod >> >> -- >> Alex Bennée >> Virtualisation Tech Lead @ Linaro >> > > With regards, > Daniel -- Alex Bennée Virtualisation Tech Lead @ Linaro
© 2016 - 2025 Red Hat, Inc.