- `Instrument.channels` is a dictionary, we want the values not the
keys; this is provded by `list_channels`.
- `InstrumentChannel` objects do not have a `measure` attribute. Use
`kind` instead.
Previously trying to pull a file from an android target would fail if the file
was owned by root, this commit adds read permissions to the file before
attempting to pull.
If a command is executed "as_root", SshConnection always prepended
"sudo" invocation to the command, even if the user name is "root". This
causes problems on patforms that do not have "sudo".
This commit changes this behavior so that sudo is never used for root
users.
On some devices backgrounding a task results in the command returning
immediately with no error. This was falsely interpreted as the command failing
to run, therefore the additional check has been removed.
Targets have been observed where `ps` output contains entries with NAME columns
of the form "[foo bar]". This means the `parts` list is too long and the PsEntry
call reports too many arguments. Since NAME is the rightmost column, just fix
the number of entries we recognise to 8.
If we get an TargetError when trying to set a governor tunable we currently fall
back to an older sysfs layout under the assumption that the file we tried to
write doesn't exist. However it may be that the file exists, but we tried to
write an invalid value (or something else went wrong). In this case we fall back
to the old file location, fail, and produce a nonsense error about the old path
not existing.
Instead, when we get a TargetError, check if the file exists, and fall back to
the old location only if it does not.
As per issue #102, not all devices have permission to list the root directory
causing the ls command to be incorrectly determined. This commit changes the
directory to be checked to the working directory to ensure sufficient
permissions.
This means when caiman is broken you can see the error message, instead of just
finding out later that there is no data.
We still don't detect caiman being broken until we call stop(), but it's still
an improvement.
Fixes issue #98 where the passed `cpus` parameter was ignored when setting the
governor and frequency and set for all cpus instead of those specified in the
passed parameter.
Also fixes kwargs not being correctly passed for governor tunables.
CFLAGS in the makefile were being specified incorrectly.
- the single quotes for forcing all options to be passed as a single
token by the shell.
- Specifying -static and -lc via -Wl is not needed.
If the ADB command fails (e.g. if you provide the wrong device ID), adb_command
raises a CalledProcessError. CalledProcessError doesn't print the output of the
failed command, so you get a useless error message.
This is relevent here in particular as _setup_ls is the first thing to run an
ADB command if a non-IP device ID is provided.
Catch the CalledProcessError and instead raise a HostError with the command
output in the exception message.
From #92, when rebooting a platform the internal connection state becomes
different from `_connected_as_root`, now clears the state upon device reboot or
reset.
Gem5SimulationPlatfrom was not acceping base Platform's parameters, such
as core_names, making it impossible to configure them on construction.
This is rectified in this commit.
When rebooting a platform the internal connection state becomes
different from _connected_as_root, which was set before reboot.
Add the possibility to force adb root if you've rebooted or know
to have done something that would result in the platform having
a different connection state than the one of _connected_as_root.
Signed-off-by: Ionela Voinescu <ionela.voinescu@arm.com>
Commit 28891a82 made it easier to debug issues during walk_modules by
attaching the specific name of the module being loaded to the exception.
However, the error may not originite in the imported module, but one of
the modules that module itself is importing.
To further facilitate debugging, exc_info (which contains the traceback)
for the orginal ImportError is now also attached to the raised
HostError.
This regex currently matches the `rc` group against the added-patches-count,
e.g. "00005" in "4.4.41-00005-g17b74bafccbe-dirty" and "59" in
"4.4.0-59-generic". Fix this by requiring "rc" in the match.
This adds a regexp to better parse all the kernel version numbers as well
as additional (optional) fields like SHA1 and RC.
The regexp has been made generic enough to match these examples:
4.9.0-rc6-00202-g3a60597
4.9.0-rc6-00202
4.9.0-rc6-00202-g3a60597 #321 SMP PREEMPT Mon Feb 13 12:30:59 GMT 2017 aarch64 GNU/Linux
3.18.31-g226dafe #1 SMP PREEMPT Wed Feb 15 16:34:14 GMT 2017
4.4.0-59-generic #80~14.04.1-Ubuntu SMP Fri Jan 6 18:02:02 UTC 2017
3.11.0-26-generic #45~precise1-Ubuntu SMP Tue Jul 15 04:02:35 UTC 2014
3.13.0-107-generic #154-Ubuntu SMP Tue Dec 20 09:57:27 UTC 2016
3.13.0-generic #154-Ubuntu SMP Tue Dec 20 09:57:27 UTC 2016
4.8.0 #1 SMP Fri Jan 6 18:06:24 GMT 2017
Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
This adds a couple of commodity ADB commands to reboot in bootloader
mode and to restart ADB in root mode.
Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>