Skip to contentSkip to conversation

testing/next (tags!, shippable/travis deprecation, regression fixes, checkpatch)

PATCH In review Alex Bennée 5 participants 36 messages Jan 14, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

v2 cover testing/next (tags!, shippable/travis deprecation, regression fixes, checkpatch)

Hi,

The main changes from v1:

https://patchew.org/QEMU/[email protected]/

- squeeze the size of the htags generation to fit pages
- move one more job from Travis
- include regression fix for yank
- fix a problem with checkpatch and commit ids

The following need review:

- scripts/checkpatch.pl: fix git-show invocation to include diffstat
- gitlab: migrate the minimal tools and unit tests from Travis
- docker: expand debian-amd64 image to include tag tools
- Makefile: wrap cscope in quiet-command calls
- Makefile: wrap etags in quiet-command calls
- Makefile: wrap ctags in quiet-command calls
- Makefile: add GNU global tags support

Alessandro Di Federico (1):
Add newline when generating Dockerfile

Alex Bennée (8):
Makefile: add GNU global tags support
Makefile: wrap ctags in quiet-command calls
Makefile: wrap etags in quiet-command calls
Makefile: wrap cscope in quiet-command calls
docker: expand debian-amd64 image to include tag tools
gitlab: move docs and tools build across from Travis
gitlab: migrate the minimal tools and unit tests from Travis scripts/checkpatch.pl: fix git-show invocation to include diffstat

Lukas Straub (1):
Fix build with new yank feature by adding stubs

Philippe Mathieu-Daudé (2):
tests/docker: Remove Debian 9 remnant lines shippable.yml: Remove jobs duplicated on Gitlab-CI

 Makefile                                     | 46 ++++++++++++++++----
 stubs/yank.c                                 | 29 ++++++++++++
 .gitignore                                   |  3 ++
 .gitlab-ci.yml                               | 30 ++++++++++---
 .shippable.yml                               | 14 +-----
 .travis.yml                                  | 25 -----------
 MAINTAINERS                                  |  1 +
 scripts/checkpatch.pl                        |  2 +-
 stubs/meson.build                            |  1 +
 tests/docker/Makefile.include                |  1 -
 tests/docker/docker.py                       |  4 +-
 tests/docker/dockerfiles/debian-amd64.docker |  5 ++-
 12 files changed, 104 insertions(+), 57 deletions(-)
 create mode 100644 stubs/yank.c
Signature · 1 line
2.20.1
#1 lore raw

PATCH v2 1/12 tests/docker: Remove Debian 9 remnant lines

From: Philippe Mathieu-Daudé <[email protected]>

Debian 9 base container has been removed in commits e3755276d1f and c9d78b06c06. Remove the last remnants.

Fixes e3755276d1f ("tests/docker: Remove old Debian 9 containers")

Message-Id: <[email protected]>

---
 tests/docker/Makefile.include | 1 -
 1 file changed, 1 deletion(-)
tests/docker/Makefile.include +0 -1
index c254ac38d0..0779dab5b9 100644
@@ -108,7 +108,6 @@ ifneq ($(HOST_ARCH),x86_64)
 DOCKER_PARTIAL_IMAGES += debian-mips-cross debian-mipsel-cross debian-mips64el-cross
 DOCKER_PARTIAL_IMAGES += debian-ppc64el-cross
 DOCKER_PARTIAL_IMAGES += debian-s390x-cross
-DOCKER_PARTIAL_IMAGES += debian-win32-cross debian-win64-cross
 DOCKER_PARTIAL_IMAGES += fedora travis
 endif
 
Signature · 1 line
2.20.1
Reviewed-by on v2 1/12
#2 lore raw

Re: [PATCH v2 01/12] tests/docker: Remove Debian 9 remnant lines

Quoted 6 lines · Alex Bennée

From: Philippe Mathieu-Daudé <[email protected]>

Debian 9 base container has been removed in commits e3755276d1f and c9d78b06c06. Remove the last remnants.

Quoted 9 lines
Fixes e3755276d1f ("tests/docker: Remove old Debian 9 containers")

Message-Id: <[email protected]>

---
 tests/docker/Makefile.include | 1 -
 1 file changed, 1 deletion(-)
#3 lore raw

PATCH v2 2/12 Makefile: add GNU global tags support

In reply to Alex Bennée

GNU Global is another tags engine which is more like cscope in being able to support finding both references and definitions. You will be un-surprised to know it also integrates well with Emacs.

The main benefit of integrating it into find-src-path is it takes less time to rebuild the database from scratch when you have a lot of build directories under your source tree.

---
v2
- run in SRC_PATH
- wrap in quiet-command

---
 Makefile   | 14 +++++++++++++-
 .gitignore |  3 +++
 2 files changed, 16 insertions(+), 1 deletion(-)
Makefile +13 -1
index fb9923ff22..0c509a7704 100644
@@ -253,6 +253,18 @@ ctags:
 	rm -f "$(SRC_PATH)/"tags
 	$(find-src-path) -exec ctags -f "$(SRC_PATH)/"tags --append {} +
 
+.PHONY: gtags
+gtags:
+	$(call quiet-command, 			\
+		rm -f "$(SRC_PATH)/"GTAGS; 	\
+		rm -f "$(SRC_PATH)/"GRTAGS; 	\
+		rm -f "$(SRC_PATH)/"GPATH, 	\
+		"GTAGS", "Remove old $@ files")
+	$(call quiet-command, 				\
+	        (cd $(SRC_PATH) && 			\
+		 $(find-src-path) | gtags -f -), 	\
+		"GTAGS", "Re-index $(SRC_PATH)")
+
 .PHONY: TAGS
 TAGS:
 	rm -f "$(SRC_PATH)/"TAGS
@@ -279,7 +291,7 @@ help:
 	$(call print-help,all,Build all)
 	$(call print-help,dir/file.o,Build specified target only)
 	$(call print-help,install,Install QEMU, documentation and tools)
-	$(call print-help,ctags/TAGS,Generate tags file for editors)
+	$(call print-help,ctags/gtags/TAGS,Generate tags file for editors)
 	$(call print-help,cscope,Generate cscope index)
 	$(call print-help,sparse,Run sparse on the QEMU source)
 	@echo  ''
.gitignore +3 -0
index b32bca1315..75a4be0724 100644
@@ -7,6 +7,9 @@
 cscope.*
 tags
 TAGS
+GPATH
+GRTAGS
+GTAGS
 *~
 *.ast_raw
 *.depend_raw
Signature · 1 line
2.20.1
Reviewed-by on v2 2/12
#4 lore raw

Re: [PATCH v2 02/12] Makefile: add GNU global tags support

Quoted 10 lines · Alex Bennée

GNU Global is another tags engine which is more like cscope in being able to support finding both references and definitions. You will be un-surprised to know it also integrates well with Emacs.

The main benefit of integrating it into find-src-path is it takes less time to rebuild the database from scratch when you have a lot of build directories under your source tree.

Quoted 8 lines

---
v2
- run in SRC_PATH
- wrap in quiet-command

---
 Makefile   | 14 +++++++++++++-
 .gitignore |  3 +++
 2 files changed, 16 insertions(+), 1 deletion(-)
#5 lore raw

PATCH v2 3/12 shippable.yml: Remove jobs duplicated on Gitlab-CI

In reply to Alex Bennée

From: Philippe Mathieu-Daudé <[email protected]>

The following jobs are duplicated on Gitlab-CI since commit 6bcb5fc0f7a ("gitlab-ci: Add cross-compiling build tests"):

- IMAGE=debian-armel-cross

  TARGET_LIST=arm-softmmu               -> cross-armel-system
  TARGET_LIST=arm-linux-user            -> cross-armel-user
  TARGET_LIST=armeb-linux-user          -> cross-armel-user

- IMAGE=debian-armhf-cross

  TARGET_LIST=arm-softmmu               -> cross-armhf-system
  TARGET_LIST=arm-linux-user            -> cross-armhf-user
  TARGET_LIST=armeb-linux-user          -> cross-armhf-user

- IMAGE=debian-arm64-cross

TARGET_LIST=aarch64-softmmu -> cross-arm64-system
TARGET_LIST=aarch64-linux-user -> cross-arm64-user

- IMAGE=debian-s390x-cross

TARGET_LIST=s390x-softmmu -> cross-s390x-system
TARGET_LIST=s390x-linux-user -> cross-s390x-user

- IMAGE=debian-mips-cross

TARGET_LIST=mipsel-linux-user -> cross-mips-user

- IMAGE=debian-mips64el-cross

TARGET_LIST=mips64el-softmmu -> cross-mips64el-system
TARGET_LIST=mips64el-linux-user -> cross-mips64el-user

- IMAGE=debian-ppc64el-cross

  TARGET_LIST=ppc64-softmmu             -> cross-ppc64el-system
  TARGET_LIST=ppc64-linux-user          -> cross-ppc64el-user
  TARGET_LIST=ppc64abi32-linux-user     -> cross-ppc64el-user

Remove them from Shippable CI.

Message-Id: <[email protected]>

---
 .shippable.yml | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)
.shippable.yml +1 -13
index 14350e6de8..97bfa2a0f3 100644
@@ -7,20 +7,8 @@ env:
   matrix:
     - IMAGE=debian-amd64
       TARGET_LIST=x86_64-softmmu,x86_64-linux-user
-    - IMAGE=debian-armel-cross
-      TARGET_LIST=arm-softmmu,arm-linux-user,armeb-linux-user
-    - IMAGE=debian-armhf-cross
-      TARGET_LIST=arm-softmmu,arm-linux-user,armeb-linux-user
-    - IMAGE=debian-arm64-cross
-      TARGET_LIST=aarch64-softmmu,aarch64-linux-user
-    - IMAGE=debian-s390x-cross
-      TARGET_LIST=s390x-softmmu,s390x-linux-user
     - IMAGE=debian-mips-cross
-      TARGET_LIST=mips-softmmu,mipsel-linux-user
-    - IMAGE=debian-mips64el-cross
-      TARGET_LIST=mips64el-softmmu,mips64el-linux-user
-    - IMAGE=debian-ppc64el-cross
-      TARGET_LIST=ppc64-softmmu,ppc64-linux-user,ppc64abi32-linux-user
+      TARGET_LIST=mips-softmmu
 build:
   pre_ci_boot:
     image_name: registry.gitlab.com/qemu-project/qemu/qemu/${IMAGE}
Signature · 1 line
2.20.1
#6 lore raw

PATCH v2 4/12 Add newline when generating Dockerfile

In reply to Alex Bennée

From: Alessandro Di Federico <[email protected]>

Message-Id: <[email protected]>

---
 tests/docker/docker.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/docker/docker.py +2 -2
index 36b7868406..884dfeb29c 100755
@@ -332,9 +332,9 @@ class Docker(object):
                          (uname, uid, uname))
 
         tmp_df.write("\n")
-        tmp_df.write("LABEL com.qemu.dockerfile-checksum=%s" % (checksum))
+        tmp_df.write("LABEL com.qemu.dockerfile-checksum=%s\n" % (checksum))
         for f, c in extra_files_cksum:
-            tmp_df.write("LABEL com.qemu.%s-checksum=%s" % (f, c))
+            tmp_df.write("LABEL com.qemu.%s-checksum=%s\n" % (f, c))
 
         tmp_df.flush()
 
Signature · 1 line
2.20.1
Reviewed-by on v2 4/12
#8 lore raw

Re: [PATCH v2 04/12] Add newline when generating Dockerfile

In reply to Alex Bennée
Quoted 10 lines · Alex Bennée

From: Alessandro Di Federico <[email protected]>

Message-Id: <[email protected]>

---
 tests/docker/docker.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
#9 lore raw

PATCH v2 5/12 Makefile: wrap ctags in quiet-command calls

In reply to Alex Bennée

For prettier output.

---
 Makefile | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
Makefile +7 -2
index 0c509a7704..bbab640b31 100644
@@ -250,8 +250,13 @@ find-src-path = find "$(SRC_PATH)/" -path "$(SRC_PATH)/meson" -prune -o \( -name
 
 .PHONY: ctags
 ctags:
-	rm -f "$(SRC_PATH)/"tags
-	$(find-src-path) -exec ctags -f "$(SRC_PATH)/"tags --append {} +
+	$(call quiet-command, 			\
+		rm -f "$(SRC_PATH)/"tags, 	\
+		"CTAGS", "Remove old tags")
+	$(call quiet-command, \
+		$(find-src-path) -exec ctags 		\
+		-f "$(SRC_PATH)/"tags --append {} +,	\
+		"CTAGS", "Re-index $(SRC_PATH)")
 
 .PHONY: gtags
 gtags:
Signature · 1 line
2.20.1
Reviewed-by on v2 5/12
#10 lore raw

Re: [PATCH v2 05/12] Makefile: wrap ctags in quiet-command calls

Quoted 1 line · Alex Bennée

For prettier output.

Having commit description following patch subject is not very practical (maybe this is obvious in an emacs client, not in mine :S).

Anyhow:

Quoted 5 lines
---
 Makefile | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
#12 lore raw

PATCH v2 6/12 Makefile: wrap etags in quiet-command calls

In reply to Alex Bennée

For prettier output.

---
 Makefile | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
Makefile +7 -2
index bbab640b31..f7e9eb9f08 100644
@@ -272,8 +272,13 @@ gtags:
 
 .PHONY: TAGS
 TAGS:
-	rm -f "$(SRC_PATH)/"TAGS
-	$(find-src-path) -exec etags -f "$(SRC_PATH)/"TAGS --append {} +
+	$(call quiet-command, 			\
+		rm -f "$(SRC_PATH)/"TAGS,	\
+		"TAGS", "Remove old $@")
+	$(call quiet-command, 				\
+		$(find-src-path) -exec etags 		\
+		-f "$(SRC_PATH)/"TAGS --append {} +, 	\
+		"TAGS", "Re-index $(SRC_PATH)")
 
 .PHONY: cscope
 cscope:
Signature · 1 line
2.20.1
#15 lore raw

PATCH v2 7/12 Makefile: wrap cscope in quiet-command calls

In reply to Alex Bennée

For prettier output.

---
 Makefile | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)
Makefile +11 -3
index f7e9eb9f08..2a926aaeb0 100644
@@ -282,9 +282,17 @@ TAGS:
 
 .PHONY: cscope
 cscope:
-	rm -f "$(SRC_PATH)"/cscope.*
-	$(find-src-path) -print | sed -e 's,^\./,,' > "$(SRC_PATH)/cscope.files"
-	cscope -b -i"$(SRC_PATH)/cscope.files" -f"$(SRC_PATH)"/cscope.out
+	$(call quiet-command,			\
+		rm -f "$(SRC_PATH)/"cscope.* ,	\
+		"cscope", "Remove old $@ files")
+	$(call quiet-command, 					\
+		($(find-src-path) -print | sed -e 's,^\./,,'    \
+		> "$(SRC_PATH)/cscope.files"), 			\
+		"cscope", "Create file list")
+	$(call quiet-command, 				\
+		cscope -b -i"$(SRC_PATH)/cscope.files" 	\
+		-f"$(SRC_PATH)"/cscope.out, 		\
+		"cscope", "Re-index $(SRC_PATH)")
 
 # Needed by "meson install"
 export DESTDIR
Signature · 1 line
2.20.1
#18 lore raw

PATCH v2 8/12 docker: expand debian-amd64 image to include tag tools

In reply to Alex Bennée

This is going to be helpful when we want to both test the tool integration and in the case of global generate a xref doc build.

---
 tests/docker/dockerfiles/debian-amd64.docker | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
tests/docker/dockerfiles/debian-amd64.docker +4 -1
index 55075d9fce..a98314757d 100644
@@ -1,7 +1,7 @@
 #
 # Docker x86_64 target
 #
-# This docker target builds on the debian Stretch base image. Further
+# This docker target builds on the Debian Buster base image. Further
 # libraries which are not widely available are installed by hand.
 #
 FROM qemu/debian10
@@ -14,7 +14,10 @@ RUN apt update && \
 RUN apt update && \
     DEBIAN_FRONTEND=noninteractive eatmydata \
     apt install -y --no-install-recommends \
+        cscope \
         genisoimage \
+        exuberant-ctags \
+        global \
         libbz2-dev \
         liblzo2-dev \
         libgcrypt20-dev \
Signature · 1 line
2.20.1
#19 lore raw

Re: [PATCH v2 08/12] docker: expand debian-amd64 image to include tag tools

Hi Alex,

Quoted 22 lines · Alex Bennée

This is going to be helpful when we want to both test the tool integration and in the case of global generate a xref doc build.

---
 tests/docker/dockerfiles/debian-amd64.docker | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
tests/docker/dockerfiles/debian-amd64.docker +1 -1
index 55075d9fce..a98314757d 100644
@@ -1,7 +1,7 @@
 #
 # Docker x86_64 target
 #
-# This docker target builds on the debian Stretch base image. Further
+# This docker target builds on the Debian Buster base image. Further
 # libraries which are not widely available are installed by hand.
 #
 FROM qemu/debian10

tests/docker/dockerfiles/debian-amd64.docker RUN apt update && \ · line 20

Quoted 7 lines
tests/docker/dockerfiles/debian-amd64.docker +3 -0
@@ -14,7 +14,10 @@ RUN apt update && \
 RUN apt update && \
     DEBIAN_FRONTEND=noninteractive eatmydata \
     apt install -y --no-install-recommends \
+        cscope \
         genisoimage \
+        exuberant-ctags \
+        global \

This clash with Daniel's series which seems ready (and harder to rebase):

'start using libvirt-ci's "lcitool" for dockerfiles'
https://www.mail-archive.com/[email protected]/msg772839.html

Do you mind getting it merged before your patch?

Quoted 4 lines
tests/docker/dockerfiles/debian-amd64.docker +0 -0
         libbz2-dev \
         liblzo2-dev \
         libgcrypt20-dev \
#20 lore raw

Re: [PATCH v2 08/12] docker: expand debian-amd64 image to include tag tools

Quoted 36 lines · Philippe Mathieu-Daudé

Hi Alex,

Quoted 22 lines · Alex Bennée

This is going to be helpful when we want to both test the tool integration and in the case of global generate a xref doc build.

---
 tests/docker/dockerfiles/debian-amd64.docker | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
tests/docker/dockerfiles/debian-amd64.docker +1 -1
index 55075d9fce..a98314757d 100644
@@ -1,7 +1,7 @@
 #
 # Docker x86_64 target
 #
-# This docker target builds on the debian Stretch base image. Further
+# This docker target builds on the Debian Buster base image. Further
 # libraries which are not widely available are installed by hand.
 #
 FROM qemu/debian10

tests/docker/dockerfiles/debian-amd64.docker RUN apt update && \ · line 20

Quoted 7 lines
tests/docker/dockerfiles/debian-amd64.docker +3 -0
@@ -14,7 +14,10 @@ RUN apt update && \
 RUN apt update && \
     DEBIAN_FRONTEND=noninteractive eatmydata \
     apt install -y --no-install-recommends \
+        cscope \
         genisoimage \
+        exuberant-ctags \
+        global \

This clash with Daniel's series which seems ready (and harder to rebase):

Quoted 4 lines

'start using libvirt-ci's "lcitool" for dockerfiles'
https://www.mail-archive.com/[email protected]/msg772839.html

Do you mind getting it merged before your patch?

I don't mind either way. I'll have to get mappings for those three packages added to libvirt-ci, so that we pull them in on the other non-debian distros too. Aside from that it is no big deal.

Quoted 6 lines

tests/docker/dockerfiles/debian-amd64.docker RUN apt update && \ · line 23

Quoted 5 lines
tests/docker/dockerfiles/debian-amd64.docker +0 -0
         libbz2-dev \
         liblzo2-dev \
         libgcrypt20-dev \

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#21 lore raw

Re: [PATCH v2 08/12] docker: expand debian-amd64 image to include tag tools

Quoted 37 lines · Daniel P. Berrangé
Quoted 36 lines · Philippe Mathieu-Daudé

Hi Alex,

Quoted 22 lines · Alex Bennée

This is going to be helpful when we want to both test the tool integration and in the case of global generate a xref doc build.

---
 tests/docker/dockerfiles/debian-amd64.docker | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
tests/docker/dockerfiles/debian-amd64.docker +1 -1
index 55075d9fce..a98314757d 100644
@@ -1,7 +1,7 @@
 #
 # Docker x86_64 target
 #
-# This docker target builds on the debian Stretch base image. Further
+# This docker target builds on the Debian Buster base image. Further
 # libraries which are not widely available are installed by hand.
 #
 FROM qemu/debian10

tests/docker/dockerfiles/debian-amd64.docker RUN apt update && \ · line 20

Quoted 7 lines
tests/docker/dockerfiles/debian-amd64.docker +3 -0
@@ -14,7 +14,10 @@ RUN apt update && \
 RUN apt update && \
     DEBIAN_FRONTEND=noninteractive eatmydata \
     apt install -y --no-install-recommends \
+        cscope \
         genisoimage \
+        exuberant-ctags \
+        global \

This clash with Daniel's series which seems ready (and harder to rebase):

Quoted 8 lines
Quoted 4 lines

'start using libvirt-ci's "lcitool" for dockerfiles'
https://www.mail-archive.com/[email protected]/msg772839.html

Do you mind getting it merged before your patch?

I don't mind either way. I'll have to get mappings for those three packages added to libvirt-ci, so that we pull them in on the other non-debian distros too. Aside from that it is no big deal.

Thanks for the quick feedback :)

#22 lore raw

Re: [PATCH v2 08/12] docker: expand debian-amd64 image to include tag tools

Quoted 41 lines · Philippe Mathieu-Daudé
Quoted 40 lines · Daniel P. Berrangé
Quoted 39 lines · Philippe Mathieu-Daudé

Hi Alex,

Quoted 22 lines · Alex Bennée

This is going to be helpful when we want to both test the tool integration and in the case of global generate a xref doc build.

---
 tests/docker/dockerfiles/debian-amd64.docker | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
tests/docker/dockerfiles/debian-amd64.docker +1 -1
index 55075d9fce..a98314757d 100644
@@ -1,7 +1,7 @@
 #
 # Docker x86_64 target
 #
-# This docker target builds on the debian Stretch base image. Further
+# This docker target builds on the Debian Buster base image. Further
 # libraries which are not widely available are installed by hand.
 #
 FROM qemu/debian10

tests/docker/dockerfiles/debian-amd64.docker RUN apt update && \ · line 20

Quoted 7 lines
tests/docker/dockerfiles/debian-amd64.docker +3 -0
@@ -14,7 +14,10 @@ RUN apt update && \
 RUN apt update && \
     DEBIAN_FRONTEND=noninteractive eatmydata \
     apt install -y --no-install-recommends \
+        cscope \
         genisoimage \
+        exuberant-ctags \
+        global \

This clash with Daniel's series which seems ready (and harder to rebase):

'start using libvirt-ci's "lcitool" for dockerfiles'
https://www.mail-archive.com/[email protected]/msg772839.html

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

Do you mind getting it merged before your patch?

I don't mind either way. I'll have to get mappings for those three packages added to libvirt-ci, so that we pull them in on the other non-debian distros too. Aside from that it is no big deal.

Thanks for the quick feedback :)

Actually my answer was a tangent. My series doesn't touch the debian dockerfile(s) at all, only ubuntu, fedora, centos & suse.

I've left debian untouched because QEMU's handling that with layering so it needs further consideration wrt libvirt-ci auto-generation.

IOW, there is no clash between these series

Quoted 1 line

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
Reviewed-by on v2 8/12
#23 lore raw

Re: [PATCH v2 08/12] docker: expand debian-amd64 image to include tag tools

In reply to Alex Bennée
Quoted 9 lines · Alex Bennée

This is going to be helpful when we want to both test the tool integration and in the case of global generate a xref doc build.

---
 tests/docker/dockerfiles/debian-amd64.docker | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
#24 lore raw

PATCH v2 9/12 gitlab: move docs and tools build across from Travis

In reply to Alex Bennée

While we are at it we might as well check the tag generation. For bonus points we run GNU globals htags into the public pages directory for publishing with the auto generated pages.

---
v2
- explicit disable-system/user
- add some comments, reduce size of HTML dump

---
 .gitlab-ci.yml | 28 ++++++++++++++++++++++------
 .travis.yml    | 16 ----------------
 2 files changed, 22 insertions(+), 22 deletions(-)
.gitlab-ci.yml +22 -6
index 4532f1718a..bd60f3e741 100644
@@ -79,7 +79,6 @@ build-system-ubuntu:
     TARGETS: aarch64-softmmu alpha-softmmu cris-softmmu hppa-softmmu
       moxie-softmmu microblazeel-softmmu mips64el-softmmu
     MAKE_CHECK_ARGS: check-build
-    CONFIGURE_ARGS: --enable-docs
   artifacts:
     expire_in: 2 days
     paths:
@@ -111,7 +110,6 @@ build-system-debian:
     TARGETS: arm-softmmu avr-softmmu i386-softmmu mipsel-softmmu
       riscv64-softmmu sh4eb-softmmu sparc-softmmu xtensaeb-softmmu
     MAKE_CHECK_ARGS: check-build
-    CONFIGURE_ARGS: --enable-docs
   artifacts:
     expire_in: 2 days
     paths:
@@ -126,6 +124,17 @@ check-system-debian:
     IMAGE: debian-amd64
     MAKE_CHECK_ARGS: check
 
+build-tools-and-docs-debian:
+  <<: *native_build_job_definition
+  variables:
+    IMAGE: debian-amd64
+    MAKE_CHECK_ARGS: ctags TAGS cscope
+    CONFIGURE_ARGS: --disable-system --disable-user --enable-docs --enable-tools
+  artifacts:
+    expire_in: 2 days
+    paths:
+      - build
+
 acceptance-system-debian:
   <<: *native_test_job_definition
   needs:
@@ -596,14 +605,21 @@ build-libvhost-user:
     - meson
     - ninja
 
+# Prepare for GitLab pages deployment. Anything copied into the
+# "public" directory will be deployed to $USER.gitlab.io/$PROJECT
 pages:
-  image: $CI_REGISTRY_IMAGE/qemu/ubuntu2004:latest
+  image: $CI_REGISTRY_IMAGE/qemu/debian-amd64:latest
   stage: test
   needs:
-    - job: build-system-ubuntu
-      artifacts: true
+    - job: build-tools-and-docs-debian
   script:
-    - mkdir public
+    - mkdir -p public
+    # HTML-ised source tree
+    - make gtags
+    - htags -anT --tree-view=filetree -m qemu_init
+        -t "Welcome to the QEMU sourcecode"
+    - mv HTML public/src
+    # Project documentation
     - mv build/docs/index.html public/
     - for i in devel interop specs system tools user ; do mv build/docs/$i public/ ; done
   artifacts:
.travis.yml +0 -16
index f2a101936c..3b574a5968 100644
@@ -148,22 +148,6 @@ jobs:
         - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
 
 
-    # Check we can build docs and tools (out of tree)
-    - name: "tools and docs (bionic)"
-      dist: bionic
-      env:
-        - BUILD_DIR="out-of-tree/build/dir" SRC_DIR="../../.."
-        - BASE_CONFIG="--enable-tools --enable-docs"
-        - CONFIG="--target-list=x86_64-softmmu,aarch64-linux-user"
-        - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
-      addons:
-        apt:
-          packages:
-            - ninja-build
-            - python3-sphinx
-            - perl
-
-
     # Test with Clang for compile portability (Travis uses clang-5.0)
     - name: "Clang (user)"
       env:
Signature · 1 line
2.20.1
Reviewed-by on v2 9/12
#25 lore raw

Re: [PATCH v2 09/12] gitlab: move docs and tools build across from Travis

Quoted 9 lines · Alex Bennée

While we are at it we might as well check the tag generation. For bonus points we run GNU globals htags into the public pages directory for publishing with the auto generated pages.

Quoted 9 lines

---
v2
- explicit disable-system/user
- add some comments, reduce size of HTML dump

---
 .gitlab-ci.yml | 28 ++++++++++++++++++++++------
 .travis.yml    | 16 ----------------
 2 files changed, 22 insertions(+), 22 deletions(-)
#26 lore raw

PATCH v2 10/12 Fix build with new yank feature by adding stubs

In reply to Alex Bennée

From: Lukas Straub <[email protected]>

[AJB: tweak MAINTAINERS]

Message-Id: <[email protected]>

---
 stubs/yank.c      | 29 +++++++++++++++++++++++++++++
 MAINTAINERS       |  1 +
 stubs/meson.build |  1 +
 3 files changed, 31 insertions(+)
 create mode 100644 stubs/yank.c
stubs/yank.c new file +29 -0
new file mode 100644
index 0000000000..6090416065
@@ -0,0 +1,29 @@
+#include "qemu/osdep.h"
+#include "qemu/yank.h"
+
+bool yank_register_instance(const YankInstance *instance, Error **errp)
+{
+    return true;
+}
+
+void yank_unregister_instance(const YankInstance *instance)
+{
+}
+
+void yank_register_function(const YankInstance *instance,
+                            YankFn *func,
+                            void *opaque)
+{
+}
+
+void yank_unregister_function(const YankInstance *instance,
+                              YankFn *func,
+                              void *opaque)
+{
+}
+
+void yank_generic_iochannel(void *opaque)
+{
+}
+
+
MAINTAINERS +1 -0
index cb0656aec3..07e4851aa4 100644
@@ -2736,6 +2736,7 @@ Yank feature
 M: Lukas Straub <[email protected]>
 S: Odd fixes
 F: util/yank.c
+F: stubs/yank.c
 F: include/qemu/yank.h
 F: qapi/yank.json
 
stubs/meson.build +1 -0
index 80b1d81a31..1a656cd070 100644
@@ -47,6 +47,7 @@ stub_ss.add(files('vm-stop.c'))
 stub_ss.add(files('win32-kbd-hook.c'))
 stub_ss.add(files('cpu-synchronize-state.c'))
 if have_block
+  stub_ss.add(files('yank.c'))
   stub_ss.add(files('replay-tools.c'))
 endif
 if have_system
Signature · 1 line
2.20.1
Reviewed-by on v2 10/12
#27 lore raw

Re: [PATCH v2 10/12] Fix build with new yank feature by adding stubs

Quoted 2 lines · Alex Bennée

From: Lukas Straub <[email protected]>

Again:

Fixes 50186051f42 ("Introduce yank feature")
Quoted 71 lines
[AJB: tweak MAINTAINERS]

Message-Id: <[email protected]>

---
 stubs/yank.c      | 29 +++++++++++++++++++++++++++++
 MAINTAINERS       |  1 +
 stubs/meson.build |  1 +
 3 files changed, 31 insertions(+)
 create mode 100644 stubs/yank.c
stubs/yank.c new file +29 -0
new file mode 100644
index 0000000000..6090416065
@@ -0,0 +1,29 @@
+#include "qemu/osdep.h"
+#include "qemu/yank.h"
+
+bool yank_register_instance(const YankInstance *instance, Error **errp)
+{
+    return true;
+}
+
+void yank_unregister_instance(const YankInstance *instance)
+{
+}
+
+void yank_register_function(const YankInstance *instance,
+                            YankFn *func,
+                            void *opaque)
+{
+}
+
+void yank_unregister_function(const YankInstance *instance,
+                              YankFn *func,
+                              void *opaque)
+{
+}
+
+void yank_generic_iochannel(void *opaque)
+{
+}
+
+
MAINTAINERS +1 -0
index cb0656aec3..07e4851aa4 100644
@@ -2736,6 +2736,7 @@ Yank feature
 M: Lukas Straub <[email protected]>
 S: Odd fixes
 F: util/yank.c
+F: stubs/yank.c
 F: include/qemu/yank.h
 F: qapi/yank.json
 
stubs/meson.build +1 -0
index 80b1d81a31..1a656cd070 100644
@@ -47,6 +47,7 @@ stub_ss.add(files('vm-stop.c'))
 stub_ss.add(files('win32-kbd-hook.c'))
 stub_ss.add(files('cpu-synchronize-state.c'))
 if have_block
+  stub_ss.add(files('yank.c'))
   stub_ss.add(files('replay-tools.c'))
 endif
 if have_system
#28 lore raw

Re: [PATCH v2 10/12] Fix build with new yank feature by adding stubs

Quoted 9 lines · Philippe Mathieu-Daudé
Quoted 2 lines · Alex Bennée

From: Lukas Straub <[email protected]>

Again:

Fixes 50186051f42 ("Introduce yank feature")

Hmm I need to improve my tooling to pick up the Fixes and add a TODO.

Quoted 72 lines
Quoted 72 lines
[AJB: tweak MAINTAINERS]

Message-Id: <[email protected]>

---
 stubs/yank.c      | 29 +++++++++++++++++++++++++++++
 MAINTAINERS       |  1 +
 stubs/meson.build |  1 +
 3 files changed, 31 insertions(+)
 create mode 100644 stubs/yank.c
stubs/yank.c new file +29 -0
new file mode 100644
index 0000000000..6090416065
@@ -0,0 +1,29 @@
+#include "qemu/osdep.h"
+#include "qemu/yank.h"
+
+bool yank_register_instance(const YankInstance *instance, Error **errp)
+{
+    return true;
+}
+
+void yank_unregister_instance(const YankInstance *instance)
+{
+}
+
+void yank_register_function(const YankInstance *instance,
+                            YankFn *func,
+                            void *opaque)
+{
+}
+
+void yank_unregister_function(const YankInstance *instance,
+                              YankFn *func,
+                              void *opaque)
+{
+}
+
+void yank_generic_iochannel(void *opaque)
+{
+}
+
+
MAINTAINERS +1 -0
index cb0656aec3..07e4851aa4 100644
@@ -2736,6 +2736,7 @@ Yank feature
 M: Lukas Straub <[email protected]>
 S: Odd fixes
 F: util/yank.c
+F: stubs/yank.c
 F: include/qemu/yank.h
 F: qapi/yank.json
 
stubs/meson.build +1 -0
index 80b1d81a31..1a656cd070 100644
@@ -47,6 +47,7 @@ stub_ss.add(files('vm-stop.c'))
 stub_ss.add(files('win32-kbd-hook.c'))
 stub_ss.add(files('cpu-synchronize-state.c'))
 if have_block
+  stub_ss.add(files('yank.c'))
   stub_ss.add(files('replay-tools.c'))
 endif
 if have_system
Signature · 1 line
Alex Bennée
#29 lore raw

PATCH v2 11/12 gitlab: migrate the minimal tools and unit tests from Travis

In reply to Alex Bennée

These tests are good at shaking out missing stubs which otherwise work if we have built targets. Rather than create a new job just add the checks to the existing tools-and-docs build.

---
 .gitlab-ci.yml | 4 +++-
 .travis.yml    | 9 ---------
 2 files changed, 3 insertions(+), 10 deletions(-)
.gitlab-ci.yml +3 -1
index bd60f3e741..a686bc40cf 100644
@@ -124,11 +124,13 @@ check-system-debian:
     IMAGE: debian-amd64
     MAKE_CHECK_ARGS: check
 
+# No targets are built here, just tools and docs. This also feeds into
+# the eventual documentation deployment steps later
 build-tools-and-docs-debian:
   <<: *native_build_job_definition
   variables:
     IMAGE: debian-amd64
-    MAKE_CHECK_ARGS: ctags TAGS cscope
+    MAKE_CHECK_ARGS: check-unit check-softfloat ctags TAGS cscope
     CONFIGURE_ARGS: --disable-system --disable-user --enable-docs --enable-tools
   artifacts:
     expire_in: 2 days
.travis.yml +0 -9
index 3b574a5968..5f1dea873e 100644
@@ -119,15 +119,6 @@ after_script:
 
 jobs:
   include:
-    # Just build tools and run minimal unit and softfloat checks
-    - name: "GCC check-unit and check-softfloat"
-      env:
-        - BASE_CONFIG="--enable-tools"
-        - CONFIG="--disable-user --disable-system"
-        - TEST_CMD="make check-unit check-softfloat -j${JOBS}"
-        - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
-
-
     # --enable-debug implies --enable-debug-tcg, also runs quite a bit slower
     - name: "GCC debug (main-softmmu)"
       env:
Signature · 1 line
2.20.1
Reviewed-by on v2 11/12
#30 lore raw

Re: [PATCH v2 11/12] gitlab: migrate the minimal tools and unit tests from Travis

Quoted 15 lines · Alex Bennée

These tests are good at shaking out missing stubs which otherwise work if we have built targets. Rather than create a new job just add the checks to the existing tools-and-docs build.

---
 .gitlab-ci.yml | 4 +++-
 .travis.yml    | 9 ---------
 2 files changed, 3 insertions(+), 10 deletions(-)
.gitlab-ci.yml +0 -0
index bd60f3e741..a686bc40cf 100644

.gitlab-ci.yml check-system-debian: · line 128

Quoted 5 lines
.gitlab-ci.yml +2 -0
@@ -124,11 +124,13 @@ check-system-debian:
     IMAGE: debian-amd64
     MAKE_CHECK_ARGS: check
 
+# No targets are built here, just tools and docs. This also feeds into
+# the eventual documentation deployment steps later

Correcting with "just tools, docs [and softfloat checks]":

Quoted 30 lines
.gitlab-ci.yml +1 -1
 build-tools-and-docs-debian:
   <<: *native_build_job_definition
   variables:
     IMAGE: debian-amd64
-    MAKE_CHECK_ARGS: ctags TAGS cscope
+    MAKE_CHECK_ARGS: check-unit check-softfloat ctags TAGS cscope
     CONFIGURE_ARGS: --disable-system --disable-user --enable-docs --enable-tools
   artifacts:
     expire_in: 2 days
.travis.yml +0 -9
index 3b574a5968..5f1dea873e 100644
@@ -119,15 +119,6 @@ after_script:
 
 jobs:
   include:
-    # Just build tools and run minimal unit and softfloat checks
-    - name: "GCC check-unit and check-softfloat"
-      env:
-        - BASE_CONFIG="--enable-tools"
-        - CONFIG="--disable-user --disable-system"
-        - TEST_CMD="make check-unit check-softfloat -j${JOBS}"
-        - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
-
-
     # --enable-debug implies --enable-debug-tcg, also runs quite a bit slower
     - name: "GCC debug (main-softmmu)"
       env:
Reviewed-by on v2 11/12
#31 lore raw

Re: [PATCH v2 11/12] gitlab: migrate the minimal tools and unit tests from Travis

In reply to Alex Bennée
Quoted 40 lines · Alex Bennée

These tests are good at shaking out missing stubs which otherwise work if we have built targets. Rather than create a new job just add the checks to the existing tools-and-docs build.

---
  .gitlab-ci.yml | 4 +++-
  .travis.yml    | 9 ---------
  2 files changed, 3 insertions(+), 10 deletions(-)
.gitlab-ci.yml +3 -1
index bd60f3e741..a686bc40cf 100644
@@ -124,11 +124,13 @@ check-system-debian:
      IMAGE: debian-amd64
      MAKE_CHECK_ARGS: check
 
+# No targets are built here, just tools and docs. This also feeds into
+# the eventual documentation deployment steps later
  build-tools-and-docs-debian:
    <<: *native_build_job_definition
    variables:
      IMAGE: debian-amd64
-    MAKE_CHECK_ARGS: ctags TAGS cscope
+    MAKE_CHECK_ARGS: check-unit check-softfloat ctags TAGS cscope
      CONFIGURE_ARGS: --disable-system --disable-user --enable-docs --enable-tools
    artifacts:
      expire_in: 2 days
.travis.yml +0 -2
index 3b574a5968..5f1dea873e 100644
@@ -119,15 +119,6 @@ after_script:
 
  jobs:
    include:
-    # Just build tools and run minimal unit and softfloat checks
-    - name: "GCC check-unit and check-softfloat"

.travis.yml after_script: · line 124

Quoted 10 lines
.travis.yml +0 -7
-      env:
-        - BASE_CONFIG="--enable-tools"
-        - CONFIG="--disable-user --disable-system"
-        - TEST_CMD="make check-unit check-softfloat -j${JOBS}"
-        - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
-
-
      # --enable-debug implies --enable-debug-tcg, also runs quite a bit slower
      - name: "GCC debug (main-softmmu)"
        env:
Reviewed-by on v2 11/12
#32 lore raw

Re: [PATCH v2 11/12] gitlab: migrate the minimal tools and unit tests from Travis

In reply to Alex Bennée
Quoted 11 lines · Alex Bennée

These tests are good at shaking out missing stubs which otherwise work if we have built targets. Rather than create a new job just add the checks to the existing tools-and-docs build.

---
 .gitlab-ci.yml | 4 +++-
 .travis.yml    | 9 ---------
 2 files changed, 3 insertions(+), 10 deletions(-)

And, it helps moving out of Travis.

#33 lore raw

PATCH v2 12/12 scripts/checkpatch.pl: fix git-show invocation to include diffstat

In reply to Alex Bennée

Without this checkpatch keeps complaining about new/changed files even when MAINTAINERS has been updated. Normal invocations of checkpatch on patch files rather than commit IDs are unaffected.

---
 scripts/checkpatch.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/checkpatch.pl +1 -1
index 88c858f67c..e47ad878d8 100755
@@ -399,7 +399,7 @@ if ($chk_branch) {
 	my $num_patches = @patches;
 	for my $hash (@patches) {
 		my $FILE;
-		open($FILE, '-|', "git", "show", $hash) ||
+		open($FILE, '-|', "git", "show", "--patch-with-stat", $hash) ||
 			die "$P: git show $hash - $!\n";
 		while (<$FILE>) {
 			chomp;
Signature · 1 line
2.20.1
Reviewed-by Tested-by on v2 12/12
#34 lore raw

Re: [PATCH v2 12/12] scripts/checkpatch.pl: fix git-show invocation to include diffstat

Quoted 4 lines · Alex Bennée

Without this checkpatch keeps complaining about new/changed files even when MAINTAINERS has been updated. Normal invocations of checkpatch on patch files rather than commit IDs are unaffected.

Nice!

(with Lukas's path and yours)

Quoted 4 lines
---
 scripts/checkpatch.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by on v2 12/12
#35 lore raw

Re: [PATCH v2 12/12] scripts/checkpatch.pl: fix git-show invocation to include diffstat

In reply to Alex Bennée
Quoted 10 lines · Alex Bennée

Without this checkpatch keeps complaining about new/changed files even when MAINTAINERS has been updated. Normal invocations of checkpatch on patch files rather than commit IDs are unaffected.

---
 scripts/checkpatch.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)