From 4acfca29dbca858c14ed4f14c971fcdd9d1f6a52 Mon Sep 17 00:00:00 2001 From: Ani Sinha Date: Wed, 21 Oct 2020 17:31:31 +0100 Subject: [PATCH 1/8] Adding ani's email as an individual contributor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ani is an individual contributor into qemu project. Adding my email into the correct file to reflect so. Signed-off-by: Ani Sinha Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20201007161940.1478-1-ani@anisinha.ca> Message-Id: <20201021163136.27324-2-alex.bennee@linaro.org> --- contrib/gitdm/group-map-individuals | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/gitdm/group-map-individuals b/contrib/gitdm/group-map-individuals index 641169fa63..d135f4b143 100644 --- a/contrib/gitdm/group-map-individuals +++ b/contrib/gitdm/group-map-individuals @@ -23,3 +23,4 @@ vr_qemu@t-online.de nieklinnenbank@gmail.com devnexen@gmail.com pauldzim@gmail.com +ani@anisinha.ca From 52812435bb1a830ddeccca653558b9fc088dc077 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Wed, 21 Oct 2020 17:31:32 +0100 Subject: [PATCH 2/8] contrib/gitdm: Add more individual contributors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Acked-by: Subbaraya Sundeep Acked-by: Michael Rolnik Acked-by: Thomas Huth Acked-by: James Hogan Acked-by: Artyom Tarasenko Message-id: <20201004182506.2038515-1-f4bug@amsat.org> Message-Id: <20201021163136.27324-3-alex.bennee@linaro.org> --- contrib/gitdm/group-map-individuals | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/contrib/gitdm/group-map-individuals b/contrib/gitdm/group-map-individuals index d135f4b143..36bbb77c39 100644 --- a/contrib/gitdm/group-map-individuals +++ b/contrib/gitdm/group-map-individuals @@ -24,3 +24,8 @@ nieklinnenbank@gmail.com devnexen@gmail.com pauldzim@gmail.com ani@anisinha.ca +sundeep.lkml@gmail.com +mrolnik@gmail.com +huth@tuxfamily.org +jhogan@kernel.org +atar4qemu@gmail.com From 5ed7ca318541133de14de538f2c67d8c6b08b861 Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Wed, 21 Oct 2020 17:31:33 +0100 Subject: [PATCH 3/8] tests/docker/dockerfiles/centos: Use SDL2 instead of SDL1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We do not support SDL1 in QEMU anymore. Use SDL2 instead. Signed-off-by: Thomas Huth Signed-off-by: Alex Bennée Tested-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20201021072308.9224-1-thuth@redhat.com> Message-Id: <20201021163136.27324-4-alex.bennee@linaro.org> --- tests/docker/dockerfiles/centos7.docker | 2 +- tests/docker/dockerfiles/centos8.docker | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/docker/dockerfiles/centos7.docker b/tests/docker/dockerfiles/centos7.docker index 8b273725ee..6f11af1989 100644 --- a/tests/docker/dockerfiles/centos7.docker +++ b/tests/docker/dockerfiles/centos7.docker @@ -31,7 +31,7 @@ ENV PACKAGES \ perl-Test-Harness \ pixman-devel \ python3 \ - SDL-devel \ + SDL2-devel \ spice-glib-devel \ spice-server-devel \ tar \ diff --git a/tests/docker/dockerfiles/centos8.docker b/tests/docker/dockerfiles/centos8.docker index a589142114..54bc6d54cd 100644 --- a/tests/docker/dockerfiles/centos8.docker +++ b/tests/docker/dockerfiles/centos8.docker @@ -2,7 +2,7 @@ FROM centos:8.1.1911 RUN dnf -y update ENV PACKAGES \ - SDL-devel \ + SDL2-devel \ bzip2 \ bzip2-devel \ dbus-daemon \ From faf9828e2fbb62cb2edaeeaa48449193d952016f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Wed, 21 Oct 2020 17:31:34 +0100 Subject: [PATCH 4/8] gitlab: skip checkpatch.pl checks if no commit delta on branch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If the current branch is synced to the current upstream git master, there are no commits that need checking. This causes checkpatch.pl to print an error that it found no commits. We need to avoid calling checkpatch.pl in this case. Signed-off-by: Daniel P. Berrangé Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Acked-by: Thomas Huth Message-Id: <20201019143537.283094-2-berrange@redhat.com> Message-Id: <20201021163136.27324-5-alex.bennee@linaro.org> --- .gitlab-ci.d/check-patch.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.gitlab-ci.d/check-patch.py b/.gitlab-ci.d/check-patch.py index 5a14a25b13..0ff30ee077 100755 --- a/.gitlab-ci.d/check-patch.py +++ b/.gitlab-ci.d/check-patch.py @@ -33,8 +33,16 @@ ancestor = subprocess.check_output(["git", "merge-base", ancestor = ancestor.strip() +log = subprocess.check_output(["git", "log", "--format=%H %s", + ancestor + "..."], + universal_newlines=True) + subprocess.check_call(["git", "remote", "rm", "check-patch"]) +if log == "": + print("\nNo commits since %s, skipping checks\n" % ancestor) + sys.exit(0) + errors = False print("\nChecking all commits since %s...\n" % ancestor) From 2d4274d6fe97da3e13ae21720ef0b57d6c3dc980 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Wed, 21 Oct 2020 17:31:35 +0100 Subject: [PATCH 5/8] scripts: fix error from checkpatch.pl when no commits are found MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The error message was supposed to mention the input revision list start point, not the branch flag. Signed-off-by: Daniel P. Berrangé Signed-off-by: Alex Bennée Message-Id: <20201019143537.283094-3-berrange@redhat.com> Message-Id: <20201021163136.27324-6-alex.bennee@linaro.org> --- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 6ed34970f9..88c858f67c 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -392,7 +392,7 @@ if ($chk_branch) { close $HASH; - die "$P: no revisions returned for revlist '$chk_branch'\n" + die "$P: no revisions returned for revlist '$ARGV[0]'\n" unless @patches; my $i = 1; From 0395b19438bd708f98280f87067870743a69a25d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Wed, 21 Oct 2020 17:31:36 +0100 Subject: [PATCH 6/8] tests/acceptance: pick a random gdb port for reverse debugging MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently the test randomly fails if you are using a shared machine due to contention on the well known port 1234. We can ameliorate this a bit by picking a random non-ephemeral port although it doesn't totally avoid the problem. While we could use a totally unique socket address for debugging it is fiddly to probe for gdb support. While gdb socket debugging is not yet ubiquitous this a sub-optimal but workable option. Signed-off-by: Alex Bennée Reviewed-by: Thomas Huth Reviewed-by: Pavel Dovgalyuk Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20201021163136.27324-7-alex.bennee@linaro.org> Signed-off-by: Alex Bennée --- tests/acceptance/reverse_debugging.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/acceptance/reverse_debugging.py b/tests/acceptance/reverse_debugging.py index b72fdf6cdc..be01aca217 100644 --- a/tests/acceptance/reverse_debugging.py +++ b/tests/acceptance/reverse_debugging.py @@ -14,6 +14,7 @@ from avocado import skipIf from avocado_qemu import BUILD_DIR from avocado.utils import gdb from avocado.utils import process +from avocado.utils.network.ports import find_free_port from avocado.utils.path import find_command from boot_linux_console import LinuxKernelTest @@ -33,7 +34,7 @@ class ReverseDebugging(LinuxKernelTest): STEPS = 10 endian_is_le = True - def run_vm(self, record, shift, args, replay_path, image_path): + def run_vm(self, record, shift, args, replay_path, image_path, port): logger = logging.getLogger('replay') vm = self.get_vm() vm.set_console() @@ -43,7 +44,7 @@ class ReverseDebugging(LinuxKernelTest): else: logger.info('replaying the execution...') mode = 'replay' - vm.add_args('-s', '-S') + vm.add_args('-gdb', 'tcp::%d' % port, '-S') vm.add_args('-icount', 'shift=%s,rr=%s,rrfile=%s,rrsnapshot=init' % (shift, mode, replay_path), '-net', 'none') @@ -109,9 +110,10 @@ class ReverseDebugging(LinuxKernelTest): process.run(cmd) replay_path = os.path.join(self.workdir, 'replay.bin') + port = find_free_port() # record the log - vm = self.run_vm(True, shift, args, replay_path, image_path) + vm = self.run_vm(True, shift, args, replay_path, image_path, port) while self.vm_get_icount(vm) <= self.STEPS: pass last_icount = self.vm_get_icount(vm) @@ -120,9 +122,9 @@ class ReverseDebugging(LinuxKernelTest): logger.info("recorded log with %s+ steps" % last_icount) # replay and run debug commands - vm = self.run_vm(False, shift, args, replay_path, image_path) + vm = self.run_vm(False, shift, args, replay_path, image_path, port) logger.info('connecting to gdbstub') - g = gdb.GDBRemote('127.0.0.1', 1234, False, False) + g = gdb.GDBRemote('127.0.0.1', port, False, False) g.connect() r = g.cmd(b'qSupported') if b'qXfer:features:read+' in r: From 8d77ce1d89a208e2de14dc216e42a54657cdc614 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Thu, 22 Oct 2020 14:33:02 +0200 Subject: [PATCH 7/8] gitlab-ci: Clone from GitLab itself MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Let GitLab runners use GitLab repository directly. Suggested-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20201022123302.2884788-1-philmd@redhat.com> Signed-off-by: Alex Bennée --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5d6773efd2..3b15ae5c30 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -24,6 +24,7 @@ include: image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest before_script: - JOBS=$(expr $(nproc) + 1) + - sed -i s,git.qemu.org/git,gitlab.com/qemu-project, .gitmodules script: - mkdir build - cd build From c8e6cfba1291df2202bf406bb5137c9d365505d1 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 26 Oct 2020 11:58:54 -0400 Subject: [PATCH 8/8] makefile: handle -n / -k / -q correctly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use $(findstring) instead of $(filter) to detect -n/-k as different versions of MAKE fill in $(MAKEFLAGS) differently. Do not bother running ninja at all if -nq is passed. Tested-by: Alex Bennée Signed-off-by: Paolo Bonzini Signed-off-by: Alex Bennée Message-Id: <20201026155854.3074290-1-pbonzini@redhat.com> --- Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 4d1fa8bb3d..e7c1000f5c 100644 --- a/Makefile +++ b/Makefile @@ -146,9 +146,12 @@ endif # 4. Rules to bridge to other makefiles ifneq ($(NINJA),) -NINJAFLAGS = $(if $V,-v,) \ +MAKE.n = $(findstring n,$(firstword $(MAKEFLAGS))) +MAKE.k = $(findstring k,$(firstword $(MAKEFLAGS))) +MAKE.q = $(findstring q,$(firstword $(MAKEFLAGS))) +MAKE.nq = $(if $(word 2, $(MAKE.n) $(MAKE.q)),nq) +NINJAFLAGS = $(if $V,-v) $(if $(MAKE.n), -n) $(if $(MAKE.k), -k0) \ $(filter-out -j, $(lastword -j1 $(filter -l% -j%, $(MAKEFLAGS)))) \ - $(subst -k, -k0, $(filter -n -k,$(MAKEFLAGS))) ninja-cmd-goals = $(or $(MAKECMDGOALS), all) ninja-cmd-goals += $(foreach t, $(.tests), $(.test.deps.$t)) @@ -165,7 +168,8 @@ $(ninja-targets): run-ninja # --output-sync line. run-ninja: config-host.mak ifneq ($(filter $(ninja-targets), $(ninja-cmd-goals)),) - +@$(NINJA) $(NINJAFLAGS) $(sort $(filter $(ninja-targets), $(ninja-cmd-goals))) | cat + +$(quiet-@)$(if $(MAKE.nq),@:, $(NINJA) \ + $(NINJAFLAGS) $(sort $(filter $(ninja-targets), $(ninja-cmd-goals))) | cat) endif endif