All of lore.kernel.org
 help / color / mirror / Atom feed
* [PULL 0/4] qtests and gitlab-CI
@ 2020-01-17 11:07 Thomas Huth
  2020-01-17 11:07 ` [PULL 1/4] tests: acpi: update path in rebuild-expected-aml Thomas Huth
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Thomas Huth @ 2020-01-17 11:07 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell; +Cc: Alex Bennée

 Hi Peter,

the following changes since commit fee0ec1fd11a6fb960517e18201ed8a686a0d7e8:

  Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging (2020-01-14 14:11:34 +0000)

are available in the Git repository at:

  https://gitlab.com/huth/qemu.git tags/pull-request-2020-01-17

for you to fetch changes up to c82b95489f8c33318101d18e643f7b50259d8e4e:

  gitlab-ci.yml: Run tcg test with tci (2020-01-16 17:01:39 +0100)

----------------------------------------------------------------
* Various fixes for qtests
* Enable TCG tests with TCI in the gitlab CI
----------------------------------------------------------------

Laurent Vivier (1):
      migration-test: ppc64: fix FORTH test program

Shameer Kolothum (1):
      tests: acpi: update path in rebuild-expected-aml

Thomas Huth (2):
      tests/qtest/vhost-user-test: Fix memory leaks
      gitlab-ci.yml: Run tcg test with tci

 .gitlab-ci.yml                          |  1 +
 tests/data/acpi/rebuild-expected-aml.sh |  6 +++---
 tests/qtest/migration-test.c            |  4 ++--
 tests/qtest/vhost-user-test.c           | 11 ++++++++---
 4 files changed, 14 insertions(+), 8 deletions(-)



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PULL 1/4] tests: acpi: update path in rebuild-expected-aml
  2020-01-17 11:07 [PULL 0/4] qtests and gitlab-CI Thomas Huth
@ 2020-01-17 11:07 ` Thomas Huth
  2020-01-17 11:07 ` [PULL 2/4] migration-test: ppc64: fix FORTH test program Thomas Huth
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Thomas Huth @ 2020-01-17 11:07 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell; +Cc: Alex Bennée, Shameer Kolothum

From: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>

Since commit 1e8a1fae7464("test: Move qtests to a separate
directory") qtests are now placed in a separate folder and
this breaks the script used to rebuild the expected ACPI
tables for bios-tables-test. Update the script with correct
path.

Fixes: 1e8a1fae7464("test: Move qtests to a separate directory")
Signed-off-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20200114165138.15716-1-shameerali.kolothum.thodi@huawei.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/data/acpi/rebuild-expected-aml.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/data/acpi/rebuild-expected-aml.sh b/tests/data/acpi/rebuild-expected-aml.sh
index f89d4624bc..d44e511533 100755
--- a/tests/data/acpi/rebuild-expected-aml.sh
+++ b/tests/data/acpi/rebuild-expected-aml.sh
@@ -14,7 +14,7 @@
 
 qemu_bins="x86_64-softmmu/qemu-system-x86_64 aarch64-softmmu/qemu-system-aarch64"
 
-if [ ! -e "tests/bios-tables-test" ]; then
+if [ ! -e "tests/qtest/bios-tables-test" ]; then
     echo "Test: bios-tables-test is required! Run make check before this script."
     echo "Run this script from the build directory."
     exit 1;
@@ -26,11 +26,11 @@ for qemu in $qemu_bins; do
         echo "Also, run this script from the build directory."
         exit 1;
     fi
-    TEST_ACPI_REBUILD_AML=y QTEST_QEMU_BINARY=$qemu tests/bios-tables-test
+    TEST_ACPI_REBUILD_AML=y QTEST_QEMU_BINARY=$qemu tests/qtest/bios-tables-test
 done
 
 eval `grep SRC_PATH= config-host.mak`
 
-echo '/* List of comma-separated changed AML files to ignore */' > ${SRC_PATH}/tests/bios-tables-test-allowed-diff.h
+echo '/* List of comma-separated changed AML files to ignore */' > ${SRC_PATH}/tests/qtest/bios-tables-test-allowed-diff.h
 
 echo "The files were rebuilt and can be added to git."
-- 
2.18.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PULL 2/4] migration-test: ppc64: fix FORTH test program
  2020-01-17 11:07 [PULL 0/4] qtests and gitlab-CI Thomas Huth
  2020-01-17 11:07 ` [PULL 1/4] tests: acpi: update path in rebuild-expected-aml Thomas Huth
@ 2020-01-17 11:07 ` Thomas Huth
  2020-01-17 11:07 ` [PULL 3/4] tests/qtest/vhost-user-test: Fix memory leaks Thomas Huth
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Thomas Huth @ 2020-01-17 11:07 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell; +Cc: Laurent Vivier, wei, Alex Bennée

From: Laurent Vivier <lvivier@redhat.com>

Commit e51e711b1bef has moved the initialization of start_address and
end_address after the definition of the command line argument,
where the nvramrc is initialized, and thus the loop is between 0 and 0
rather than 1 MiB and 100 MiB.

It doesn't affect the result of the test if all the tests are run in
sequence because the two first tests don't run the loop, so the
values are correctly initialized when we actually need them.

But it hangs when we ask to run only one test, for instance:

    QTEST_QEMU_BINARY=ppc64-softmmu/qemu-system-ppc64 \
    tests/migration-test -m=quick -p /ppc64/migration/validate_uuid_error

Fixes: e51e711b1bef ("tests/migration: Add migration-test header file")
Cc: wei@redhat.com
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Message-Id: <20200107163437.52139-1-lvivier@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/qtest/migration-test.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
index 53afec4395..341d190922 100644
--- a/tests/qtest/migration-test.c
+++ b/tests/qtest/migration-test.c
@@ -480,14 +480,14 @@ static int test_migrate_start(QTestState **from, QTestState **to,
     } else if (strcmp(arch, "ppc64") == 0) {
         machine_opts = "vsmt=8";
         memory_size = "256M";
+        start_address = PPC_TEST_MEM_START;
+        end_address = PPC_TEST_MEM_END;
         arch_source = g_strdup_printf("-nodefaults "
                                       "-prom-env 'use-nvramrc?=true' -prom-env "
                                       "'nvramrc=hex .\" _\" begin %x %x "
                                       "do i c@ 1 + i c! 1000 +loop .\" B\" 0 "
                                       "until'", end_address, start_address);
         arch_target = g_strdup("");
-        start_address = PPC_TEST_MEM_START;
-        end_address = PPC_TEST_MEM_END;
     } else if (strcmp(arch, "aarch64") == 0) {
         init_bootfile(bootpath, aarch64_kernel, sizeof(aarch64_kernel));
         machine_opts = "virt,gic-version=max";
-- 
2.18.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PULL 3/4] tests/qtest/vhost-user-test: Fix memory leaks
  2020-01-17 11:07 [PULL 0/4] qtests and gitlab-CI Thomas Huth
  2020-01-17 11:07 ` [PULL 1/4] tests: acpi: update path in rebuild-expected-aml Thomas Huth
  2020-01-17 11:07 ` [PULL 2/4] migration-test: ppc64: fix FORTH test program Thomas Huth
@ 2020-01-17 11:07 ` Thomas Huth
  2020-01-17 11:07 ` [PULL 4/4] gitlab-ci.yml: Run tcg test with tci Thomas Huth
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Thomas Huth @ 2020-01-17 11:07 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell; +Cc: Alex Bennée

Do not allocate resources in case we return early, and make sure
to free dest_cmdline at the end.

Reported-by: Euler Robot <euler.robot@huawei.com>
Reported-by: Pan Nengyuan <pannengyuan@huawei.com>
Message-Id: <20200116140736.9498-1-thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/qtest/vhost-user-test.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/tests/qtest/vhost-user-test.c b/tests/qtest/vhost-user-test.c
index 2324b964ad..9ee0f1e4fd 100644
--- a/tests/qtest/vhost-user-test.c
+++ b/tests/qtest/vhost-user-test.c
@@ -707,9 +707,9 @@ static void test_read_guest_mem(void *obj, void *arg, QGuestAllocator *alloc)
 static void test_migrate(void *obj, void *arg, QGuestAllocator *alloc)
 {
     TestServer *s = arg;
-    TestServer *dest = test_server_new("dest");
-    GString *dest_cmdline = g_string_new(qos_get_current_command_line());
-    char *uri = g_strdup_printf("%s%s", "unix:", dest->mig_path);
+    TestServer *dest;
+    GString *dest_cmdline;
+    char *uri;
     QTestState *to;
     GSource *source;
     QDict *rsp;
@@ -720,6 +720,10 @@ static void test_migrate(void *obj, void *arg, QGuestAllocator *alloc)
         return;
     }
 
+    dest = test_server_new("dest");
+    dest_cmdline = g_string_new(qos_get_current_command_line());
+    uri = g_strdup_printf("%s%s", "unix:", dest->mig_path);
+
     size = get_log_size(s);
     g_assert_cmpint(size, ==, (256 * 1024 * 1024) / (VHOST_LOG_PAGE * 8));
 
@@ -778,6 +782,7 @@ static void test_migrate(void *obj, void *arg, QGuestAllocator *alloc)
     qtest_quit(to);
     test_server_free(dest);
     g_free(uri);
+    g_string_free(dest_cmdline, true);
 }
 
 static void wait_for_rings_started(TestServer *s, size_t count)
-- 
2.18.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PULL 4/4] gitlab-ci.yml: Run tcg test with tci
  2020-01-17 11:07 [PULL 0/4] qtests and gitlab-CI Thomas Huth
                   ` (2 preceding siblings ...)
  2020-01-17 11:07 ` [PULL 3/4] tests/qtest/vhost-user-test: Fix memory leaks Thomas Huth
@ 2020-01-17 11:07 ` Thomas Huth
  2020-01-17 16:46 ` [PULL 0/4] qtests and gitlab-CI no-reply
  2020-01-17 17:27 ` Peter Maydell
  5 siblings, 0 replies; 7+ messages in thread
From: Thomas Huth @ 2020-01-17 11:07 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell; +Cc: Alex Bennée

Since commit 2f160e0f9797c7522bfd0d09218d0c9340a5137c ("tci: Add
implementation for INDEX_op_ld16u_i64") has been included now, we
can also run the TCG tests with tci, so let's enable them in our
Gitlab CI now.

Message-Id: <20191127155105.3784-1-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 .gitlab-ci.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index dce8f2d3f5..d9a90f795d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -87,6 +87,7 @@ build-tci:
  - ../configure --enable-tcg-interpreter
       --target-list="$(for tg in $TARGETS; do echo -n ${tg}'-softmmu '; done)"
  - make -j2
+ - make run-tcg-tests-x86_64-softmmu
  - make tests/qtest/boot-serial-test tests/qtest/cdrom-test tests/qtest/pxe-test
  - for tg in $TARGETS ; do
      export QTEST_QEMU_BINARY="${tg}-softmmu/qemu-system-${tg}" ;
-- 
2.18.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PULL 0/4] qtests and gitlab-CI
  2020-01-17 11:07 [PULL 0/4] qtests and gitlab-CI Thomas Huth
                   ` (3 preceding siblings ...)
  2020-01-17 11:07 ` [PULL 4/4] gitlab-ci.yml: Run tcg test with tci Thomas Huth
@ 2020-01-17 16:46 ` no-reply
  2020-01-17 17:27 ` Peter Maydell
  5 siblings, 0 replies; 7+ messages in thread
From: no-reply @ 2020-01-17 16:46 UTC (permalink / raw)
  To: thuth; +Cc: peter.maydell, alex.bennee, qemu-devel

Patchew URL: https://patchew.org/QEMU/20200117110758.1995-1-thuth@redhat.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Message-id: 20200117110758.1995-1-thuth@redhat.com
Type: series
Subject: [PULL 0/4] qtests and gitlab-CI

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

From https://github.com/patchew-project/qemu
 * [new tag]         patchew/20200117110758.1995-1-thuth@redhat.com -> patchew/20200117110758.1995-1-thuth@redhat.com
Switched to a new branch 'test'
7fbbaf7 gitlab-ci.yml: Run tcg test with tci
1c4d104 tests/qtest/vhost-user-test: Fix memory leaks
2e1728c migration-test: ppc64: fix FORTH test program
247a6a0 tests: acpi: update path in rebuild-expected-aml

=== OUTPUT BEGIN ===
1/4 Checking commit 247a6a033937 (tests: acpi: update path in rebuild-expected-aml)
ERROR: line over 90 characters
#44: FILE: tests/data/acpi/rebuild-expected-aml.sh:34:
+echo '/* List of comma-separated changed AML files to ignore */' > ${SRC_PATH}/tests/qtest/bios-tables-test-allowed-diff.h

total: 1 errors, 0 warnings, 21 lines checked

Patch 1/4 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

2/4 Checking commit 2e1728c34f2b (migration-test: ppc64: fix FORTH test program)
3/4 Checking commit 1c4d10497e69 (tests/qtest/vhost-user-test: Fix memory leaks)
4/4 Checking commit 7fbbaf7a0df6 (gitlab-ci.yml: Run tcg test with tci)
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20200117110758.1995-1-thuth@redhat.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PULL 0/4] qtests and gitlab-CI
  2020-01-17 11:07 [PULL 0/4] qtests and gitlab-CI Thomas Huth
                   ` (4 preceding siblings ...)
  2020-01-17 16:46 ` [PULL 0/4] qtests and gitlab-CI no-reply
@ 2020-01-17 17:27 ` Peter Maydell
  5 siblings, 0 replies; 7+ messages in thread
From: Peter Maydell @ 2020-01-17 17:27 UTC (permalink / raw)
  To: Thomas Huth; +Cc: Alex Bennée, QEMU Developers

On Fri, 17 Jan 2020 at 11:08, Thomas Huth <thuth@redhat.com> wrote:
>
>  Hi Peter,
>
> the following changes since commit fee0ec1fd11a6fb960517e18201ed8a686a0d7e8:
>
>   Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging (2020-01-14 14:11:34 +0000)
>
> are available in the Git repository at:
>
>   https://gitlab.com/huth/qemu.git tags/pull-request-2020-01-17
>
> for you to fetch changes up to c82b95489f8c33318101d18e643f7b50259d8e4e:
>
>   gitlab-ci.yml: Run tcg test with tci (2020-01-16 17:01:39 +0100)
>
> ----------------------------------------------------------------
> * Various fixes for qtests
> * Enable TCG tests with TCI in the gitlab CI
> ----------------------------------------------------------------
>
> Laurent Vivier (1):
>       migration-test: ppc64: fix FORTH test program
>
> Shameer Kolothum (1):
>       tests: acpi: update path in rebuild-expected-aml
>
> Thomas Huth (2):
>       tests/qtest/vhost-user-test: Fix memory leaks
>       gitlab-ci.yml: Run tcg test with tci


Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/5.0
for any user-visible changes.

-- PMM


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-01-17 17:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-17 11:07 [PULL 0/4] qtests and gitlab-CI Thomas Huth
2020-01-17 11:07 ` [PULL 1/4] tests: acpi: update path in rebuild-expected-aml Thomas Huth
2020-01-17 11:07 ` [PULL 2/4] migration-test: ppc64: fix FORTH test program Thomas Huth
2020-01-17 11:07 ` [PULL 3/4] tests/qtest/vhost-user-test: Fix memory leaks Thomas Huth
2020-01-17 11:07 ` [PULL 4/4] gitlab-ci.yml: Run tcg test with tci Thomas Huth
2020-01-17 16:46 ` [PULL 0/4] qtests and gitlab-CI no-reply
2020-01-17 17:27 ` Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.