summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/core/target
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2023-12-19 16:04:24 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-12-20 07:47:00 +0000
commit08369812c1a9a33338a3998968b802822b97c40a (patch)
tree68e134d24531106f5d835bc85efb12c4af41e84d /meta/lib/oeqa/core/target
parent2ad6a0be02aca682cbfb68e84dc60fcbaa95b0ce (diff)
downloadpoky-08369812c1a9a33338a3998968b802822b97c40a.tar.gz
testimage: Drop target_dumper and most of monitor_dumper
The target_dumper code is basically broken. It has been reading binary files over the text base serial communication and runs at every command failure which makes no sense. Each run might overwrite files from the previous run and the output appears corrupted due to confusion from the binary data. For now, remove the commands and the target dumper code as the command and execution point are problematic. Also remove the same pieces of the monitor code but leave the command list since in theory this can be moved to a more useful place in the code. (From OE-Core rev: a24d787987dccc95fdd95b7e85bf525a1c55b285) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/core/target')
-rw-r--r--meta/lib/oeqa/core/target/qemu.py10
-rw-r--r--meta/lib/oeqa/core/target/ssh.py20
2 files changed, 1 insertions, 29 deletions
diff --git a/meta/lib/oeqa/core/target/qemu.py b/meta/lib/oeqa/core/target/qemu.py
index 6893d10226..d93b3ac94a 100644
--- a/meta/lib/oeqa/core/target/qemu.py
+++ b/meta/lib/oeqa/core/target/qemu.py
@@ -14,8 +14,6 @@ from collections import defaultdict
14 14
15from .ssh import OESSHTarget 15from .ssh import OESSHTarget
16from oeqa.utils.qemurunner import QemuRunner 16from oeqa.utils.qemurunner import QemuRunner
17from oeqa.utils.dump import MonitorDumper
18from oeqa.utils.dump import TargetDumper
19 17
20supported_fstypes = ['ext3', 'ext4', 'cpio.gz', 'wic'] 18supported_fstypes = ['ext3', 'ext4', 'cpio.gz', 'wic']
21 19
@@ -47,14 +45,6 @@ class OEQemuTarget(OESSHTarget):
47 use_kvm=kvm, use_slirp=slirp, dump_dir=dump_dir, logger=logger, 45 use_kvm=kvm, use_slirp=slirp, dump_dir=dump_dir, logger=logger,
48 serial_ports=serial_ports, boot_patterns = boot_patterns, 46 serial_ports=serial_ports, boot_patterns = boot_patterns,
49 use_ovmf=ovmf, tmpfsdir=tmpfsdir) 47 use_ovmf=ovmf, tmpfsdir=tmpfsdir)
50 dump_monitor_cmds = kwargs.get("testimage_dump_monitor")
51 self.monitor_dumper = MonitorDumper(dump_monitor_cmds, dump_dir, self.runner)
52 if self.monitor_dumper:
53 self.monitor_dumper.create_dir("qmp")
54
55 dump_target_cmds = kwargs.get("testimage_dump_target")
56 self.target_dumper = TargetDumper(dump_target_cmds, dump_dir, self.runner)
57 self.target_dumper.create_dir("qemu")
58 48
59 def start(self, params=None, extra_bootparams=None, runqemuparams=''): 49 def start(self, params=None, extra_bootparams=None, runqemuparams=''):
60 if self.use_slirp and not self.server_ip: 50 if self.use_slirp and not self.server_ip:
diff --git a/meta/lib/oeqa/core/target/ssh.py b/meta/lib/oeqa/core/target/ssh.py
index f4dd0ca417..09cdd14c75 100644
--- a/meta/lib/oeqa/core/target/ssh.py
+++ b/meta/lib/oeqa/core/target/ssh.py
@@ -48,8 +48,6 @@ class OESSHTarget(OETarget):
48 if port: 48 if port:
49 self.ssh = self.ssh + [ '-p', port ] 49 self.ssh = self.ssh + [ '-p', port ]
50 self.scp = self.scp + [ '-P', port ] 50 self.scp = self.scp + [ '-P', port ]
51 self._monitor_dumper = None
52 self.target_dumper = None
53 51
54 def start(self, **kwargs): 52 def start(self, **kwargs):
55 pass 53 pass
@@ -57,15 +55,6 @@ class OESSHTarget(OETarget):
57 def stop(self, **kwargs): 55 def stop(self, **kwargs):
58 pass 56 pass
59 57
60 @property
61 def monitor_dumper(self):
62 return self._monitor_dumper
63
64 @monitor_dumper.setter
65 def monitor_dumper(self, dumper):
66 self._monitor_dumper = dumper
67 self.monitor_dumper.dump_monitor()
68
69 def _run(self, command, timeout=None, ignore_status=True): 58 def _run(self, command, timeout=None, ignore_status=True):
70 """ 59 """
71 Runs command in target using SSHProcess. 60 Runs command in target using SSHProcess.
@@ -104,14 +93,7 @@ class OESSHTarget(OETarget):
104 93
105 status, output = self._run(sshCmd, processTimeout, ignore_status) 94 status, output = self._run(sshCmd, processTimeout, ignore_status)
106 self.logger.debug('Command: %s\nStatus: %d Output: %s\n' % (command, status, output)) 95 self.logger.debug('Command: %s\nStatus: %d Output: %s\n' % (command, status, output))
107 if (status == 255) and (('No route to host') in output): 96
108 if self.monitor_dumper:
109 self.monitor_dumper.dump_monitor()
110 if status == 255:
111 if self.target_dumper:
112 self.target_dumper.dump_target()
113 if self.monitor_dumper:
114 self.monitor_dumper.dump_monitor()
115 return (status, output) 97 return (status, output)
116 98
117 def copyTo(self, localSrc, remoteDst): 99 def copyTo(self, localSrc, remoteDst):