RE: [PATCH v2] tcg plugins: expose an API version concept

2019-11-11 Thread Robert Foley
old deprecated APIs in the future. > > Signed-off-by: Alex Bennée > Reviewed-by: Philippe Mathieu-Daudé > > --- > v2 > - error out on missing plugin version symbol > - fix missing symbol on hotblocks.so > - more verbose error text, avoid bad grammar > --- Reviewed-by: Robert Foley Thanks, Rob

[PATCH 2/4] Add use of RCU for qemu_logfile.

2019-11-07 Thread Robert Foley
for freeing/closing when readers have finished. Signed-off-by: Robert Foley --- include/qemu/log.h | 47 util/log.c | 78 ++ include/exec/log.h | 33 +--- tcg/tcg.c | 12 +-- 4 files changed

[PATCH 3/4] qemu_log_lock/unlock now preserves the qemu_logfile handle.

2019-11-07 Thread Robert Foley
qemu_log_lock() now returns a handle and qemu_log_unlock() receives a handle to unlock. This allows for changing the handle during logging and ensures the lock() and unlock() are for the same file. Signed-off-by: Robert Foley --- include/qemu/log.h| 14 +++--- accel/tcg/cpu

[PATCH 1/4] Add a mutex to guarantee single writer to qemu_logfile handle.

2019-11-07 Thread Robert Foley
This is being added in preparation for using RCU with the logfile handle. Also added qemu_logfile_init() for initializing the logfile mutex. Signed-off-by: Robert Foley --- util/log.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/util/log.c b/util/log.c index

[PATCH 4/4] Added tests for close and change of logfile.

2019-11-07 Thread Robert Foley
One test ensures that the logfile handle is still valid even if the logfile is changed during logging. The other test validates that the logfile handle remains valid under the logfile lock even if the logfile is closed. Signed-off-by: Robert Foley --- tests/test-logging.c | 74

[PATCH 0/4] Make the qemu_logfile handle thread safe.

2019-11-07 Thread Robert Foley
This patch adds thread safety to the qemu_logfile handle. This now allows changing the logfile while logging is active, and also solves the issue of a seg fault while changing the logfile. This patch adds use of RCU for handling the swap out of the old qemu_logfile file descriptor. Robert

Re: logfile issue

2019-11-06 Thread Robert Foley
n when a new handle is set. Thanks for your comments on this. We agree that using RCU is a great solution here. We have this patch well underway and plan to post a patch in the next few days. -Rob On Mon, 4 Nov 2019 at 07:13, Alex Bennée wrote: > > > Robert Foley writes: > > &g

Re: [PATCH 2/4] Add use of RCU for qemu_logfile.

2019-11-07 Thread Robert Foley
On Thu, 7 Nov 2019 at 11:24, Alex Bennée wrote: > > Robert Foley writes: > > diff --git a/include/qemu/log.h b/include/qemu/log.h > > index a91105b2ad..975de18e23 100644 > > --- a/include/qemu/log.h > > +++ b/include/qemu/log.h > > @@ -3,9 +3,17 @@ > >

Re: [PATCH 4/4] Added tests for close and change of logfile.

2019-11-07 Thread Robert Foley
Agree with all the suggestions below. These are great ideas. Will make the changes. Thanks, -Rob Foley On Thu, 7 Nov 2019 at 11:32, Alex Bennée wrote: > > > Robert Foley writes: > > > One test ensures that the logfile handle is still valid even if > > the logfile i

Re: [PATCH 4/4] Added tests for close and change of logfile.

2019-11-07 Thread Robert Foley
e writes: > > > Robert Foley writes: > > > >> One test ensures that the logfile handle is still valid even if > >> the logfile is changed during logging. > >> The other test validates that the logfile handle remains valid under > >> the logfile l

Re: [PATCH 3/4] qemu_log_lock/unlock now preserves the qemu_logfile handle.

2019-11-07 Thread Robert Foley
019 at 11:25, Alex Bennée wrote: > > > Robert Foley writes: > > > qemu_log_lock() now returns a handle and qemu_log_unlock() receives a > > handle to unlock. This allows for changing the handle during logging > > and ensures the lock() and unlock() are for the same file.

logfile issue

2019-10-31 Thread Robert Foley
We hit an issue when trying to change the log file from the monitor console. The root of the issue here is that the qemu_logfile handle is not thread safe. So when we try to close the file, we end up with a seg fault. The full analysis is below along with some possible solutions. Will plan to

Re: FW: [PATCH v1 3/5] docs/devel: update tcg-plugins.rst with API versioning details

2019-11-13 Thread Robert Foley
plugins > + configure --enable-plugins > > Once built a program can be run with multiple plugins loaded each with > -their own arguments: > +their own arguments:: > > -:: > -$QEMU $OTHER_QEMU_ARGS \ > + $QEMU $OTHER_QEMU_ARGS \ >-plugin tests/plugin/libhowvec.so,arg=inline,arg=hint \ >-plugin tests/plugin/libhotblocks.so > > -- > 2.20.1 > > Reviewed-by: Robert Foley

Re: [PATCH v1 1/5] Add a mutex to guarantee single writer to qemu_logfile handle.

2019-11-18 Thread Robert Foley
the mutex.initialized asserts. Thanks, -Rob On Sat, 16 Nov 2019 at 06:58, Richard Henderson wrote: > > On 11/12/19 4:01 PM, Robert Foley wrote: > > Also added qemu_logfile_init() for initializing the logfile mutex. > > > > Signed-off-by: Robert Foley > > --- > &g

Re: [PATCH v2 3/6] Add a mutex to guarantee single writer to qemu_logfile handle.

2019-11-18 Thread Robert Foley
ese changes later. I will add more details to the commit message. Thanks, -Rob On Mon, 18 Nov 2019 at 07:16, Alex Bennée wrote: > > > Robert Foley writes: > > > Also added qemu_logfile_init() for initializing the logfile mutex. > > > > Signed-off-by:

Re: [PATCH v2 5/6] Add use of RCU for qemu_logfile.

2019-11-18 Thread Robert Foley
void) { QemuLogFile *logfile; rcu_read_lock(); logfile = atomic_rcu_read(_logfile); if (logfile) { qemu_flockfile(logfile->fd); return logfile->fd; } rcu_read_unlock(); return NULL; } I will make the changes. Thanks, -Rob On Mon, 18 Nov 2019 at 07:22, Alex B

Re: [PATCH v2 5/6] Add use of RCU for qemu_logfile.

2019-11-18 Thread Robert Foley
On Mon, 18 Nov 2019 at 08:23, Alex Bennée wrote: > > > Robert Foley writes: > > > On Mon, 18 Nov 2019 at 07:22, Alex Bennée wrote: > >> > >> > >> > +if (logfile) { > >> > +qemu_flockfile(logfile-

Re: [PATCH v2 5/6] Add use of RCU for qemu_logfile.

2019-11-18 Thread Robert Foley
\n"). Will make this change. Thanks, -Rob On Mon, 18 Nov 2019 at 11:41, Alex Bennée wrote: > > > Robert Foley writes: > > > On Mon, 18 Nov 2019 at 08:23, Alex Bennée wrote: > >> > >> > >> Robert Foley writes: > >> > >> >

Re: [PATCH v1 3/5] Add use of RCU for qemu_logfile.

2019-11-12 Thread Robert Foley
f(!qemu_logfile && need_to_open_file) { logfile = g_new0(QemuLogFile, 1); __snip__ existing patch logic for opening the qemu_logfile will be inserted here. } qemu_mutex_unlock(_logfile_mutex); > > { > > char *pidstr; > > + > > g_free(logfil

[PATCH v1 4/5] Added tests for close and change of logfile.

2019-11-12 Thread Robert Foley
One test ensures that the logfile handle is still valid even if the logfile is changed during logging. The other test validates that the logfile handle remains valid under the logfile lock even if the logfile is closed. Signed-off-by: Robert Foley -- v1 - Changes for first round of code

[PATCH v1 3/5] Add use of RCU for qemu_logfile.

2019-11-12 Thread Robert Foley
for freeing/closing when readers have finished. Signed-off-by: Robert Foley --- v1 - Changes for review comments. - Minor changes to definition of QemuLogFile. - Changed qemu_log_separate() to fix unbalanced and remove qemu_log_enabled() check. - changed qemu_log_lock

[PATCH v1 0/5] Make the qemu_logfile handle thread safe.

2019-11-12 Thread Robert Foley
. - It also includes a fix for an issue in qemu_set_log_filename(). This issue was uncovered by the test added for this patch. --- Robert Foley (5): Add a mutex to guarantee single writer to qemu_logfile handle. qemu_log_lock/unlock now preserves the qemu_logfile handle. Add

[PATCH v1 2/5] qemu_log_lock/unlock now preserves the qemu_logfile handle.

2019-11-12 Thread Robert Foley
qemu_log_lock() now returns a handle and qemu_log_unlock() receives a handle to unlock. This allows for changing the handle during logging and ensures the lock() and unlock() are for the same file. Signed-off-by: Robert Foley --- v1 - Moved this up in the patch sequence to be before

[PATCH v1 1/5] Add a mutex to guarantee single writer to qemu_logfile handle.

2019-11-12 Thread Robert Foley
Also added qemu_logfile_init() for initializing the logfile mutex. Signed-off-by: Robert Foley --- v1 - changed qemu_logfile_init() to use __constructor__. --- util/log.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/util/log.c b/util/log.c index 1ca13059ee..c25643dc99

[PATCH v1 5/5] Fix double free issue in qemu_set_log_filename().

2019-11-12 Thread Robert Foley
After freeing the logfilename, we set logfilename to NULL, in case of an error which returns without setting logfilename. Signed-off-by: Robert Foley --- v1 - This is new in the patch v1. --- util/log.c | 1 + 1 file changed, 1 insertion(+) diff --git a/util/log.c b/util/log.c index

[PATCH v2 6/6] Added tests for close and change of logfile.

2019-11-15 Thread Robert Foley
One test ensures that the logfile handle is still valid even if the logfile is changed during logging. The other test validates that the logfile handle remains valid under the logfile lock even if the logfile is closed. Signed-off-by: Robert Foley Reviewed-by: Alex Bennée --- v1 - Changes

[PATCH v2 5/6] Add use of RCU for qemu_logfile.

2019-11-15 Thread Robert Foley
for freeing/closing when readers have finished. Signed-off-by: Robert Foley --- v2 - No specific changes, just merging in cleanup changes in qemu_set_log(). --- v1 - Changes for review comments. - Minor changes to definition of QemuLogFile. - Changed qemu_log_separate() to fix

[PATCH v2 3/6] Add a mutex to guarantee single writer to qemu_logfile handle.

2019-11-15 Thread Robert Foley
Also added qemu_logfile_init() for initializing the logfile mutex. Signed-off-by: Robert Foley --- v2 - In qemu_set_log() moved location of mutex lock/unlock due to cleanup changes. --- v1 - changed qemu_logfile_init() to use __constructor__. --- util/log.c | 14 ++ 1

[PATCH v2 2/6] Cleaned up flow of code in qemu_set_log(), to simplify and clarify.

2019-11-15 Thread Robert Foley
Also added some explanation of the reasoning behind the branches. Signed-off-by: Robert Foley --- v2 - This is new in patch v2. --- util/log.c | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/util/log.c b/util/log.c index 4316fe74ee..417d16ec66

[PATCH v2 4/6] qemu_log_lock/unlock now preserves the qemu_logfile handle.

2019-11-15 Thread Robert Foley
qemu_log_lock() now returns a handle and qemu_log_unlock() receives a handle to unlock. This allows for changing the handle during logging and ensures the lock() and unlock() are for the same file. Signed-off-by: Robert Foley Reviewed-by: Alex Bennée --- v1 - Moved this up in the patch

[PATCH v2 0/6] Make the qemu_logfile handle thread safe.

2019-11-15 Thread Robert Foley
. - It also includes a fix for an issue in qemu_set_log_filename(). This issue was uncovered by the test added for this patch. --- Robert Foley (6): Fix double free issue in qemu_set_log_filename(). Cleaned up flow of code in qemu_set_log(), to simplify and clarify. Add

[PATCH v2 1/6] Fix double free issue in qemu_set_log_filename().

2019-11-15 Thread Robert Foley
After freeing the logfilename, we set logfilename to NULL, in case of an error which returns without setting logfilename. Signed-off-by: Robert Foley Reviewed-by: Alex Bennée --- v2 - moved this change to the beginning of the patch series. --- v1 - This is new in the patch v1. --- util

Re: [PATCH 1/4] Add a mutex to guarantee single writer to qemu_logfile handle.

2019-11-07 Thread Robert Foley
b On Thu, 7 Nov 2019 at 11:53, Alex Bennée wrote: > > > Robert Foley writes: > > > This is being added in preparation for using RCU with the logfile handle. > > Also added qemu_logfile_init() for initializing the logfile mutex. > > > > Signed-off-by: Robert Foley

Re: [PATCH 4/4] Added tests for close and change of logfile.

2019-11-07 Thread Robert Foley
it could depend on how glibc > was built for your system though. Mine is Debian Buster. > Interesting. We had assumed it was just the way we were running the test. But it sounds like something about our particular setup. I'm using Ubuntu bionic on an aarch64 system. Will look further. T

[PATCH v3 4/6] qemu_log_lock/unlock now preserves the qemu_logfile handle.

2019-11-18 Thread Robert Foley
ot;\n")), since the translator can longjmp out of the loop if it attempts to translate an instruction in an inaccessible page. Signed-off-by: Robert Foley Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson --- v3 - Changes to one use case to remove use of qemu_log_lock()/unlock().

[PATCH v3 5/6] Add use of RCU for qemu_logfile.

2019-11-18 Thread Robert Foley
for freeing/closing when readers have finished. Signed-off-by: Robert Foley Reviewed-by: Alex Bennée --- v3 - Changes for qemu_log_lock() to unconditionally hold the rcu_read_lock() until qemu_log_unlock() - Changed qemu_log_unlock() to unconditionally rcu_read_unlock() --- v2

[PATCH v3 3/6] Add a mutex to guarantee single writer to qemu_logfile handle.

2019-11-18 Thread Robert Foley
. Signed-off-by: Robert Foley Reviewed-by: Alex Bennée --- v3 - Removed assert that mutex is initialized. We will rely on the constructor. - Also added details in the commit message regarding the temporary ugliness that will be cleaned up in a later patch. --- v2

[PATCH v3 6/6] Added tests for close and change of logfile.

2019-11-18 Thread Robert Foley
One test ensures that the logfile handle is still valid even if the logfile is changed during logging. The other test validates that the logfile handle remains valid under the logfile lock even if the logfile is closed. Signed-off-by: Robert Foley Reviewed-by: Alex Bennée --- v1 - Changes

[PATCH v3 1/6] Fix double free issue in qemu_set_log_filename().

2019-11-18 Thread Robert Foley
After freeing the logfilename, we set logfilename to NULL, in case of an error which returns without setting logfilename. Signed-off-by: Robert Foley Reviewed-by: Alex Bennée --- v2 - moved this change to the beginning of the patch series. --- v1 - This is new in the patch v1. --- util

[PATCH v3 2/6] Cleaned up flow of code in qemu_set_log(), to simplify and clarify.

2019-11-18 Thread Robert Foley
Also added some explanation of the reasoning behind the branches. Signed-off-by: Robert Foley Reviewed-by: Alex Bennée --- v2 - This is new in patch v2. --- util/log.c | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/util/log.c b/util/log.c index

[PATCH v3 0/6] Make the qemu_logfile handle thread safe.

2019-11-18 Thread Robert Foley
. - It also includes a fix for an issue in qemu_set_log_filename(). This issue was uncovered by the test added for this patch. --- Robert Foley (6): Fix double free issue in qemu_set_log_filename(). Cleaned up flow of code in qemu_set_log(), to simplify and clarify. Add a mutex

Re: [PATCH 1/2] target/arm: Do not reject rt == rt2 for strexd

2019-11-19 Thread Robert Foley
Richard Henderson writes: > > There was too much cut and paste between ldrexd and strexd, > as ldrexd does prohibit two output registers the same. > > Fixes: af288228995 > Reported-by: Michael Goffioul > Signed-off-by: Richard Henderson > --- Reviewed-by: Robert Foley

Re: [PATCH v1 5/5] tests/plugins: make howvec clean-up after itself.

2020-02-10 Thread Robert Foley
15 @@ static void plugin_exit(qemu_plugin_id_t id, void *p) > g_list_free(it); > } > > +g_list_free(counts); > +g_hash_table_destroy(insns); > + Just one minor comment. Seems like there might be an option to use g_autoptr(GList) for counts. Reviewed-by: Ro

Re: [PATCH 1/2] test-logging: Fix -Werror=maybe-uninitialized warning

2020-01-21 Thread Robert Foley
Good catch. Reviewed-by: Robert Foley On Tue, 21 Jan 2020 at 04:58, Thomas Huth wrote: > > On 21/01/2020 10.28, mreza...@redhat.com wrote: > > From: Miroslav Rezanina > > > > Checking for uninitialized variables raises warning for file path > > v

Re: [PATCH v2 00/14] tests/vm: Add support for aarch64 VMs

2020-03-03 Thread Robert Foley
On Tue, 3 Mar 2020 at 05:24, Alex Bennée wrote: > > We are happy to make any adjustments here. Our first set of > > refactoring here was > > aimed at making it more pythonic. Is this where the concerns are? > > I'm just worried about the fragility of multiple steps in the chain of > io we are

Re: [PATCH v3 08/19] tests/iotests: be a little more forgiving on the size test

2020-02-25 Thread Robert Foley
is not bigger than before and > also dump the values in the report. > > Signed-off-by: Alex Bennée Reviewed-by: Robert Foley

Re: [PATCH v2 00/14] tests/vm: Add support for aarch64 VMs

2020-03-02 Thread Robert Foley
On Mon, 2 Mar 2020 at 11:38, Alex Bennée wrote: > > > Robert Foley writes: > > > This is version 2 of the patch series to > > add support for aarch64 VMs. > > - Ubuntu 18.04 aarch64 VM > > - CentOS 8 aarch64 VM > > For now I've pulled the first 5 patch

Re: [PATCH 3/8] tests/vm: change wait_ssh to optionally wait for root.

2020-01-27 Thread Robert Foley
On Mon, 27 Jan 2020 at 06:06, Alex Bennée wrote: > > Allow wait_ssh to wait for root user to be ready. > > This solves the issue where we perform a wait_ssh() > > successfully, but the root user is not yet ready > > to be logged in. > > So in the case it's the root user we care about... We care

Re: [PATCH 0/8] tests/vm: Add support for aarch64 VMs

2020-01-29 Thread Robert Foley
Thanks for the details on the failure. I have not been able to reproduce it yet, but digging into it further. On Tue, 28 Jan 2020 at 12:52, Alex Bennée wrote: > > > Robert Foley writes: > > > This patch adds support for 2 aarch64 VMs. > > - Ubuntu 18.04 aarch64 VM &g

Re: [PATCH 7/8] tests/vm: Added a new script for ubuntu.aarch64.

2020-01-27 Thread Robert Foley
Hi Drew, On Mon, 27 Jan 2020 at 12:27, Andrew Jones wrote: > > > > I suppose we could check the version of QEMU and use the above > > defaults only for earlier versions of QEMU. > > This is something we will probably move to aarch64vm.py since it is common. > > What versions of QEMU do these

Re: [PATCH 7/8] tests/vm: Added a new script for ubuntu.aarch64.

2020-01-27 Thread Robert Foley
On Mon, 27 Jan 2020 at 15:07, Alex Bennée wrote: > Robert Foley writes: > > > Hi Drew, > > > > On Mon, 27 Jan 2020 at 12:27, Andrew Jones wrote: > > > >> > > >> > I suppose we could check the version of QEMU and use the a

Re: [PATCH 5/8] tests/vm: Added configuration file support

2020-01-27 Thread Robert Foley
On Mon, 27 Jan 2020 at 07:38, Alex Bennée wrote: > > +if 'password' in target_dict: > > +config['root_pass'] = target_dict['password'] > > +config['guest_pass'] = target_dict['password'] > > This seems like impedance matching between two dictionaries. Surely it >

Re: [PATCH 7/8] tests/vm: Added a new script for ubuntu.aarch64.

2020-01-27 Thread Robert Foley
On Mon, 27 Jan 2020 at 10:01, Alex Bennée wrote: > > vm-boot-ssh-%: $(IMAGES_DIR)/%.img > > $(call quiet-command, \ > > - $(SRC_PATH)/tests/vm/$* \ > > + $(PYTHON) $(SRC_PATH)/tests/vm/$* \ > > This seems like it should be in a different patch. Good point, will

[PATCH v1 03/14] tests/vm: increased max timeout for vm boot.

2020-02-05 Thread Robert Foley
Add change to increase timeout waiting for VM to boot. Needed for some emulation cases where it can take longer than 5 minutes to boot. Signed-off-by: Robert Foley --- tests/vm/basevm.py | 7 +++ 1 file changed, 7 insertions(+) diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index

[PATCH v1 08/14] tests/vm: Added configuration file support

2020-02-05 Thread Robert Foley
.yml. Signed-off-by: Robert Foley --- tests/vm/Makefile.include | 2 ++ tests/vm/basevm.py| 29 +- tests/vm/conf_example_aarch64.yml | 51 +++ tests/vm/conf_example_x86.yml | 50 ++ 4 files changed

[PATCH v1 14/14] tests/vm: change scripts to use self._config

2020-02-05 Thread Robert Foley
This change converts existing scripts to using for example self.ROOT_PASS, to self._config['root_pass']. We made similar changes for GUEST_USER, and GUEST_PASS. This allows us also to remove the change in basevm.py, which adds __getattr__ for backwards compatibility. Signed-off-by: Robert Foley

[PATCH v1 11/14] tests/vm: allow wait_ssh() to specify command

2020-02-05 Thread Robert Foley
This allows for waiting for completion of arbitrary commands. Signed-off-by: Robert Foley --- tests/vm/basevm.py | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 97d55f8030..ebedbce4ae 100755 --- a/tests/vm

[PATCH v1 09/14] tests/vm: add --boot-console switch

2020-02-05 Thread Robert Foley
Added ability to view console during boot via --boot-console switch to basevm.py. This helps debug issues that occur during the boot sequence. Also added a new special variable to vm-build: BOOT_CONSOLE=1 will cause this new --boot-console switch to be set. Signed-off-by: Robert Foley --- tests

[PATCH v1 06/14] tests/vm: Add logging of console to file.

2020-02-05 Thread Robert Foley
are not consumed by the script. Signed-off-by: Robert Foley --- tests/vm/basevm.py| 48 ++--- tests/vm/socket_thread.py | 73 +++ 2 files changed, 116 insertions(+), 5 deletions(-) create mode 100644 tests/vm/socket_thread.py diff

[PATCH v1 00/14] tests/vm: Add support for aarch64 VMs

2020-02-05 Thread Robert Foley
sole as the VM boots up to aid in debugging problems during VM boot. Robert Foley (14): tests/vm: use $(PYTHON) consistently tests/vm: Debug mode shows ssh output. tests/vm: increased max timeout for vm boot. tests/vm: give wait_ssh() option to wait for root tests/vm: Added gen_cloud_init_iso(

[PATCH v1 04/14] tests/vm: give wait_ssh() option to wait for root

2020-02-05 Thread Robert Foley
Allow wait_ssh to wait for root user to be ready. This solves the issue where we perform a wait_ssh() successfully, but the root user is not yet ready to be logged in. Signed-off-by: Robert Foley --- tests/vm/basevm.py | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git

[PATCH v1 07/14] tests/vm: Add configuration to basevm.py

2020-02-05 Thread Robert Foley
to vary on the VM being created or launched. This will for example allow for creating an aarch64 vm. Signed-off-by: Robert Foley --- tests/vm/basevm.py | 141 +++-- 1 file changed, 111 insertions(+), 30 deletions(-) diff --git a/tests/vm/basevm.py b/tests

[PATCH v1 02/14] tests/vm: Debug mode shows ssh output.

2020-02-05 Thread Robert Foley
Add changes to tests/vm/basevm.py so that during debug mode we show ssh output. Signed-off-by: Robert Foley Reviewed-by: Peter Puhov Reviewed-by: Alex Bennée --- tests/vm/basevm.py | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/vm/basevm.py b/tests/vm

[PATCH v1 05/14] tests/vm: Added gen_cloud_init_iso() to basevm.py

2020-02-05 Thread Robert Foley
This method was located in both centos and ubuntu.i386. Signed-off-by: Robert Foley --- tests/vm/basevm.py | 40 tests/vm/centos | 33 + tests/vm/ubuntu.i386 | 37 + 3 files

[PATCH v1 01/14] tests/vm: use $(PYTHON) consistently

2020-02-05 Thread Robert Foley
Change Makefile.include to use $(PYTHON) so for vm-boot-ssh to be consistent with other cases like vm-build. Signed-off-by: Robert Foley --- tests/vm/Makefile.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include index

[PATCH v1 13/14] tests/vm: Added a new script for centos.aarch64.

2020-02-05 Thread Robert Foley
centos.aarch64 creates a CentOS 8 image. Also added a new kickstart script used to build the centos.aarch64 image. Signed-off-by: Robert Foley --- tests/vm/Makefile.include| 3 +- tests/vm/centos-8-aarch64.ks | 51 tests/vm/centos.aarch64 | 221

[PATCH v1 12/14] tests/vm: Added a new script for ubuntu.aarch64.

2020-02-05 Thread Robert Foley
ubuntu.aarch64 provides a script to create an Ubuntu 18.04 VM. Another new file is also added aarch64vm.py, which is a module with common methods used by aarch64 VMs, such as how to create the flash images. Signed-off-by: Robert Foley --- tests/vm/Makefile.include | 3 +- tests/vm

[PATCH v1 10/14] tests/vm: Add ability to select QEMU from current build.

2020-02-05 Thread Robert Foley
Added a new special variable QEMU_LOCAL=1, which will indicate to take the QEMU binary from the current build. Signed-off-by: Robert Foley --- tests/vm/Makefile.include | 4 tests/vm/basevm.py| 28 2 files changed, 28 insertions(+), 4 deletions

Re: [PATCH v3 02/17] tests/docker: better handle symlinked libs

2020-02-03 Thread Robert Foley
e sure we chase the symlinks to copy the right > binary to where it can be found. > > Signed-off-by: Alex Bennée > Reviewed-by: Philippe Mathieu-Daudé > Tested-by: Philippe Mathieu-Daudé Reviewed-by: Robert Foley

Re: [PATCH v1 4/5] target/riscv: progressively load the instruction during decode

2020-02-07 Thread Robert Foley
Hi, On Fri, 7 Feb 2020 at 10:01, Alex Bennée wrote: > -static void decode_RV32_64C0(DisasContext *ctx) > +static void decode_RV32_64C0(DisasContext *ctx, uint16_t opcode) > { > -uint8_t funct3 = extract32(ctx->opcode, 13, 3); > -uint8_t rd_rs2 = GET_C_RS2S(ctx->opcode); > -uint8_t

Re: [PATCH v1 1/5] docs/devel: document query handle lifetimes

2020-02-07 Thread Robert Foley
On Fri, 7 Feb 2020 at 10:01, Alex Bennée wrote: > > I forgot to document the lifetime of handles in the developer > documentation. Do so now. > > Signed-off-by: Alex Bennée Reviewed-by: Robert Foley Regards, -Rob > --- > docs/devel/tcg-plugins.rst | 13 +++--

Re: [PATCH v1 06/14] tests/vm: Add logging of console to file.

2020-02-07 Thread Robert Foley
On Fri, 7 Feb 2020 at 12:12, Alex Bennée wrote: > Robert Foley writes: > > > This adds logging of the char device used by the console > > to a file. The basevm.py then uses this file to read > > chars from the console. > > One reason to add this is to aid with debu

Re: [PATCH 2/8] tests/vm: increased max timeout for vm boot.

2020-01-24 Thread Robert Foley
the patch. Thanks & Regards, -Rob On Fri, 24 Jan 2020 at 12:12, Philippe Mathieu-Daudé wrote: > > Hi Robert, > > On 1/24/20 5:53 PM, Robert Foley wrote: > > Add change to increase timeout waiting for VM to boot. > > Needed for some emulation cases where it can take longer

[PATCH 2/8] tests/vm: increased max timeout for vm boot.

2020-01-24 Thread Robert Foley
Add change to increase timeout waiting for VM to boot. Needed for some emulation cases where it can take longer than 5 minutes to boot. Signed-off-by: Robert Foley Reviewed-by: Peter Puhov --- tests/vm/basevm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/vm

[PATCH 0/8] tests/vm: Add support for aarch64 VMs

2020-01-24 Thread Robert Foley
hese VMs, we implemented a few enhancements to help with testing. For example, we added support for allowing debug mode to show the ssh output. We also added support for a new --boot-console option which will show the boot console as the VM boots up to aid in debugging problems during VM boot. Rober

[PATCH 1/8] tests/vm: Debug mode shows ssh output.

2020-01-24 Thread Robert Foley
Add changes to tests/vm/basevm.py so that during debug mode we show ssh output. Signed-off-by: Robert Foley Reviewed-by: Peter Puhov --- tests/vm/basevm.py | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index ed5dd4f3d0

[PATCH 6/8] tests/vm: add --boot-console switch

2020-01-24 Thread Robert Foley
Added ability to view console during boot via --boot-console switch. This helps debug issues that occur during the boot sequence. Signed-off-by: Robert Foley Reviewed-by: Peter Puhov --- tests/vm/basevm.py | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tests/vm/basevm.py b/tests/vm

[PATCH 8/8] tests/vm: Added a new script for centos.aarch64.

2020-01-24 Thread Robert Foley
centos.aarch64 creates a CentOS 8 image. Also added a new kickstart script used to build the centos.aarch64 image. Signed-off-by: Robert Foley Reviewed-by: Peter Puhov --- tests/vm/Makefile.include| 3 +- tests/vm/centos-8-aarch64.ks | 52 + tests/vm/centos.aarch64 | 218

[PATCH 5/8] tests/vm: Added configuration file support

2020-01-24 Thread Robert Foley
Changes to tests/vm/basevm.py to allow accepting a configuration file as a parameter. Allows for specifying VM options such as cpu, machine, memory, and arbitrary qemu arguments for specifying options such as NUMA configuration. Also added an example config_example.yml. Signed-off-by: Robert

[PATCH 7/8] tests/vm: Added a new script for ubuntu.aarch64.

2020-01-24 Thread Robert Foley
ubuntu.aarch64 provides a script to create an Ubuntu 18.04 VM. Another new file is also added aarch64vm.py, which is a module with common methods used by aarch64 VMs, such as how to create the flash images. Signed-off-by: Robert Foley Reviewed-by: Peter Puhov --- tests/vm/Makefile.include

[PATCH 4/8] tests/vm: Add configuration to basevm.py

2020-01-24 Thread Robert Foley
to vary on the VM being created or launched. This will for example allow for creating an aarch64 vm. Signed-off-by: Robert Foley Reviewed-by: Peter Puhov --- tests/vm/basevm.py | 108 ++--- 1 file changed, 82 insertions(+), 26 deletions(-) diff --git

[PATCH 3/8] tests/vm: change wait_ssh to optionally wait for root.

2020-01-24 Thread Robert Foley
Allow wait_ssh to wait for root user to be ready. This solves the issue where we perform a wait_ssh() successfully, but the root user is not yet ready to be logged in. Signed-off-by: Robert Foley Reviewed-by: Peter Puhov --- tests/vm/basevm.py | 9 +++-- 1 file changed, 7 insertions(+), 2

Re: [PATCH 4/8] tests/vm: Add configuration to basevm.py

2020-01-27 Thread Robert Foley
On Mon, 27 Jan 2020 at 07:26, Alex Bennée wrote: > > -SSH_KEY = open(os.path.join(os.path.dirname(__file__), > > - "..", "keys", "id_rsa")).read() > > -SSH_PUB_KEY = open(os.path.join(os.path.dirname(__file__), > > - "..", "keys", "id_rsa.pub")).read() > > - > >

Re: [PATCH 6/8] tests/vm: add --boot-console switch

2020-01-27 Thread Robert Foley
On Mon, 27 Jan 2020 at 07:56, Alex Bennée wrote: > > @@ -523,6 +525,10 @@ def main(vmcls, config=None): > > if args.snapshot: > > img += ",snapshot=on" > > vm.boot(img) > > +wait_boot = getattr(vm, "wait_boot", None) > > Didn't we add a __getattr method, so

Re: [PATCH v2 02/12] tests/docker: better handle symlinked libs

2020-01-30 Thread Robert Foley
Hi, I was looking at this patch and have a comment about the number of groups that are expected to be found by this regex. It seems like the old code expected two groups to be found otherwise it will not append the library to the found libs. def _get_so_libs(executable): libs = [] ldd_re =

[PATCH v2 03/14] tests/vm: increased max timeout for vm boot.

2020-02-19 Thread Robert Foley
Add change to increase timeout waiting for VM to boot. Needed for some emulation cases where it can take longer than 5 minutes to boot. Signed-off-by: Robert Foley Reviewed-by: Alex Bennée Reviewed-by: Peter Puhov --- tests/vm/basevm.py | 7 +++ 1 file changed, 7 insertions(+) diff --git

[PATCH v2 00/14] tests/vm: Add support for aarch64 VMs

2020-02-19 Thread Robert Foley
some cases the latin1 is needed for chars coming out of the i socket which do not have a utf-8 equivalent. Robert Foley (14): tests/vm: use $(PYTHON) consistently tests/vm: Debug mode shows ssh output. tests/vm: increased max timeout for vm boot. tests/vm: give wait_ssh() option to wai

[PATCH v2 10/14] tests/vm: Add ability to select QEMU from current build.

2020-02-19 Thread Robert Foley
Added a new special variable QEMU_LOCAL=1, which will indicate to take the QEMU binary from the current build. Signed-off-by: Robert Foley --- tests/vm/Makefile.include | 4 tests/vm/basevm.py| 29 - 2 files changed, 28 insertions(+), 5 deletions

[PATCH v2 06/14] tests/vm: Add workaround to consume console

2020-02-19 Thread Robert Foley
characters to be consumed. We also add the option of logging the console to a file. Signed-off-by: Robert Foley --- python/qemu/console_socket.py | 162 ++ python/qemu/machine.py| 12 ++- tests/vm/Makefile.include | 4 + tests/vm/basevm.py| 24

[PATCH v2 05/14] tests/vm: Added gen_cloud_init_iso() to basevm.py

2020-02-19 Thread Robert Foley
This method was located in both centos and ubuntu.i386. Signed-off-by: Robert Foley Reviewed-by: Alex Bennée Reviewed-by: Peter Puhov --- tests/vm/basevm.py | 40 tests/vm/centos | 33 + tests/vm/ubuntu.i386 | 37

[PATCH v2 08/14] tests/vm: Added configuration file support

2020-02-19 Thread Robert Foley
.yml. Signed-off-by: Robert Foley --- tests/vm/Makefile.include | 2 ++ tests/vm/basevm.py| 29 +- tests/vm/conf_example_aarch64.yml | 51 +++ tests/vm/conf_example_x86.yml | 50 ++ 4 files changed

[PATCH v2 09/14] tests/vm: add --boot-console switch

2020-02-19 Thread Robert Foley
Added ability to view console during boot via --boot-console switch to basevm.py. This helps debug issues that occur during the boot sequence. Also added a new special variable to vm-build: BOOT_CONSOLE=1 will cause this new --boot-console switch to be set. Signed-off-by: Robert Foley --- tests

[PATCH v2 12/14] tests/vm: Added a new script for ubuntu.aarch64.

2020-02-19 Thread Robert Foley
ubuntu.aarch64 provides a script to create an Ubuntu 18.04 VM. Another new file is also added aarch64vm.py, which is a module with common methods used by aarch64 VMs, such as how to create the flash images. Signed-off-by: Robert Foley --- tests/vm/Makefile.include | 3 +- tests/vm

[PATCH v2 14/14] tests/vm: change scripts to use self._config

2020-02-19 Thread Robert Foley
This change converts existing scripts to using for example self.ROOT_PASS, to self._config['root_pass']. We made similar changes for GUEST_USER, and GUEST_PASS. This allows us also to remove the change in basevm.py, which adds __getattr__ for backwards compatibility. Signed-off-by: Robert Foley

[PATCH v2 11/14] tests/vm: allow wait_ssh() to specify command

2020-02-19 Thread Robert Foley
This allows for waiting for completion of arbitrary commands. Signed-off-by: Robert Foley --- tests/vm/basevm.py | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index a30a641a4a..792e4a3fb2 100644 --- a/tests/vm

[PATCH v2 02/14] tests/vm: Debug mode shows ssh output.

2020-02-19 Thread Robert Foley
Add changes to tests/vm/basevm.py so that during debug mode we show ssh output. Signed-off-by: Robert Foley Reviewed-by: Peter Puhov Reviewed-by: Alex Bennée --- tests/vm/basevm.py | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/vm/basevm.py b/tests/vm

[PATCH v2 04/14] tests/vm: give wait_ssh() option to wait for root

2020-02-19 Thread Robert Foley
Allow wait_ssh to wait for root user to be ready. This solves the issue where we perform a wait_ssh() successfully, but the root user is not yet ready to be logged in. Signed-off-by: Robert Foley Reviewed-by: Alex Bennée Reviewed-by: Peter Puhov --- tests/vm/basevm.py | 7 +-- 1 file

[PATCH v2 13/14] tests/vm: Added a new script for centos.aarch64.

2020-02-19 Thread Robert Foley
centos.aarch64 creates a CentOS 8 image. Also added a new kickstart script used to build the centos.aarch64 image. Signed-off-by: Robert Foley --- tests/vm/Makefile.include| 3 +- tests/vm/centos-8-aarch64.ks | 51 tests/vm/centos.aarch64 | 224

Re: [PATCH v1 08/14] tests/vm: Added configuration file support

2020-02-14 Thread Robert Foley
On Fri, 14 Feb 2020 at 11:54, Alex Bennée wrote: > > from socket_thread import SocketThread > > +import yaml > > So this throws my setup on my Gentoo SynQuacer. Is this meant to be in > the standard library or is this a separate dependency? > This is a separate dependency. On Ubuntu the package

Re: [PATCH v2 09/19] tracing: only allow -trace to override -D if set

2020-02-14 Thread Robert Foley
On Thu, 13 Feb 2020 at 17:51, Alex Bennée wrote: > > Otherwise any -D settings the user may have made get ignored. > > Signed-off-by: Alex Bennée Reviewed-by: Robert Foley

  1   2   3   4   5   6   >