qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] A few more fixes for 9.1
@ 2024-08-07 11:40 Alex Bennée
  2024-08-07 11:40 ` [PATCH 1/6] tests/avocado: Re-enable gdbsim-r5f562n8 testing U-Boot Alex Bennée
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Alex Bennée @ 2024-08-07 11:40 UTC (permalink / raw)
  To: qemu-devel
  Cc: Wainer dos Santos Moschetta, Philippe Mathieu-Daudé,
	Thomas Huth, Beraldo Leal, Yoshinori Sato, Alex Bennée,
	Paolo Bonzini, Cleber Rosa

Nothing major here.

We have a tweak to the Makefile to properly trigger re-configure with
new python dependencies. A number of tweaks to the GDB version
detection for MTE and an update to checkpatch.

I'll collect any other misc patches if they are pointed out to me.

Alex Bennée (1):
  Makefile: trigger re-configure on updated pythondeps

Gustavo Romero (3):
  configure: Fix arch detection for GDB_HAS_MTE
  configure: Avoid use of param. expansion when using gdb_version
  configure: Fix GDB version detection for GDB_HAS_MTE

Philippe Mathieu-Daudé (1):
  tests/avocado: Re-enable gdbsim-r5f562n8 testing U-Boot

Stefano Garzarella (1):
  scripts/checkpatch: more checks on files imported from Linux

 configure                          |  8 +++++---
 Makefile                           |  3 ++-
 scripts/checkpatch.pl              | 24 ++++++++++++++++++++++++
 tests/avocado/machine_rx_gdbsim.py |  2 --
 4 files changed, 31 insertions(+), 6 deletions(-)

-- 
2.39.2



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

* [PATCH 1/6] tests/avocado: Re-enable gdbsim-r5f562n8 testing U-Boot
  2024-08-07 11:40 [PATCH 0/6] A few more fixes for 9.1 Alex Bennée
@ 2024-08-07 11:40 ` Alex Bennée
  2024-08-07 11:40 ` [PATCH 2/6] Makefile: trigger re-configure on updated pythondeps Alex Bennée
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Alex Bennée @ 2024-08-07 11:40 UTC (permalink / raw)
  To: qemu-devel
  Cc: Wainer dos Santos Moschetta, Philippe Mathieu-Daudé,
	Thomas Huth, Beraldo Leal, Yoshinori Sato, Alex Bennée,
	Paolo Bonzini, Cleber Rosa

From: Philippe Mathieu-Daudé <philmd@linaro.org>

We disabled all RX tests on commit 9b45cc9931 ("docs/devel:
rationalise unstable gitlab tests under FLAKY_TESTS") for
being flaky. However I don't recall the U-Boot test to fail
(the problematic line checking the 'version' string is already
commented out), and I'm running this test reliably, so re-enable
it.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Message-Id: <20240801172332.65701-1-philmd@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/avocado/machine_rx_gdbsim.py | 2 --
 1 file changed, 2 deletions(-)

diff --git a/tests/avocado/machine_rx_gdbsim.py b/tests/avocado/machine_rx_gdbsim.py
index 412a7a5089..a83873b738 100644
--- a/tests/avocado/machine_rx_gdbsim.py
+++ b/tests/avocado/machine_rx_gdbsim.py
@@ -22,8 +22,6 @@ class RxGdbSimMachine(QemuSystemTest):
     timeout = 30
     KERNEL_COMMON_COMMAND_LINE = 'printk.time=0 '
 
-    @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab')
-
     def test_uboot(self):
         """
         U-Boot and checks that the console is operational.
-- 
2.39.2



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

* [PATCH 2/6] Makefile: trigger re-configure on updated pythondeps
  2024-08-07 11:40 [PATCH 0/6] A few more fixes for 9.1 Alex Bennée
  2024-08-07 11:40 ` [PATCH 1/6] tests/avocado: Re-enable gdbsim-r5f562n8 testing U-Boot Alex Bennée
@ 2024-08-07 11:40 ` Alex Bennée
  2024-08-07 11:40 ` [PATCH 3/6] configure: Fix arch detection for GDB_HAS_MTE Alex Bennée
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Alex Bennée @ 2024-08-07 11:40 UTC (permalink / raw)
  To: qemu-devel
  Cc: Wainer dos Santos Moschetta, Philippe Mathieu-Daudé,
	Thomas Huth, Beraldo Leal, Yoshinori Sato, Alex Bennée,
	Paolo Bonzini, Cleber Rosa, Richard Henderson

If we add additional deps for meson we need to ensure we trigger a
reconfigure to make sure everything is set up.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20240731140232.22193-1-alex.bennee@linaro.org>

---
v2
  - split line with continuation
---
 Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 02a257584b..917c9a34d1 100644
--- a/Makefile
+++ b/Makefile
@@ -78,7 +78,8 @@ x := $(shell rm -rf meson-private meson-info meson-logs)
 endif
 
 # 1. ensure config-host.mak is up-to-date
-config-host.mak: $(SRC_PATH)/configure $(SRC_PATH)/scripts/meson-buildoptions.sh $(SRC_PATH)/VERSION
+config-host.mak: $(SRC_PATH)/configure $(SRC_PATH)/scripts/meson-buildoptions.sh \
+		$(SRC_PATH)/pythondeps.toml $(SRC_PATH)/VERSION
 	@echo config-host.mak is out-of-date, running configure
 	@if test -f meson-private/coredata.dat; then \
 	  ./config.status --skip-meson; \
-- 
2.39.2



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

* [PATCH 3/6] configure: Fix arch detection for GDB_HAS_MTE
  2024-08-07 11:40 [PATCH 0/6] A few more fixes for 9.1 Alex Bennée
  2024-08-07 11:40 ` [PATCH 1/6] tests/avocado: Re-enable gdbsim-r5f562n8 testing U-Boot Alex Bennée
  2024-08-07 11:40 ` [PATCH 2/6] Makefile: trigger re-configure on updated pythondeps Alex Bennée
@ 2024-08-07 11:40 ` Alex Bennée
  2024-08-07 11:40 ` [PATCH 4/6] configure: Avoid use of param. expansion when using gdb_version Alex Bennée
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Alex Bennée @ 2024-08-07 11:40 UTC (permalink / raw)
  To: qemu-devel
  Cc: Wainer dos Santos Moschetta, Philippe Mathieu-Daudé,
	Thomas Huth, Beraldo Leal, Yoshinori Sato, Alex Bennée,
	Paolo Bonzini, Cleber Rosa, Gustavo Romero

From: Gustavo Romero <gustavo.romero@linaro.org>

GDB_HAS_MTE must only be set if GDB supports the aarch64 arch, so the
test if "aarch64" string is present must be against GDB-related
'$gdb_arches' variable and not against '$arch' variable.

Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Message-Id: <20240804161850.2646299-2-gustavo.romero@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index 019fcbd0ef..a3aa257fd3 100755
--- a/configure
+++ b/configure
@@ -1673,7 +1673,7 @@ for target in $target_list; do
           echo "GDB=$gdb_bin" >> $config_target_mak
       fi
 
-      if test "${arch}" = "aarch64" && version_ge ${gdb_version##* } 15.0; then
+      if test "${gdb_arches#*aarch64}" != "$gdb_arches" && version_ge ${gdb_version##* } 15.0; then
           echo "GDB_HAS_MTE=y" >> $config_target_mak
       fi
 
-- 
2.39.2



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

* [PATCH 4/6] configure: Avoid use of param. expansion when using gdb_version
  2024-08-07 11:40 [PATCH 0/6] A few more fixes for 9.1 Alex Bennée
                   ` (2 preceding siblings ...)
  2024-08-07 11:40 ` [PATCH 3/6] configure: Fix arch detection for GDB_HAS_MTE Alex Bennée
@ 2024-08-07 11:40 ` Alex Bennée
  2024-08-07 11:40 ` [PATCH 5/6] configure: Fix GDB version detection for GDB_HAS_MTE Alex Bennée
  2024-08-07 11:40 ` [PATCH 6/6] scripts/checkpatch: more checks on files imported from Linux Alex Bennée
  5 siblings, 0 replies; 7+ messages in thread
From: Alex Bennée @ 2024-08-07 11:40 UTC (permalink / raw)
  To: qemu-devel
  Cc: Wainer dos Santos Moschetta, Philippe Mathieu-Daudé,
	Thomas Huth, Beraldo Leal, Yoshinori Sato, Alex Bennée,
	Paolo Bonzini, Cleber Rosa, Gustavo Romero

From: Gustavo Romero <gustavo.romero@linaro.org>

$gdb_version is now used in more than one conditional case and its usage
in such cases may increase in the future. Therefore, avoid using shell
parameter expansion when using it by setting gdb_version to its final
form.

Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Message-Id: <20240804161850.2646299-3-gustavo.romero@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 configure | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/configure b/configure
index a3aa257fd3..97de85d710 100755
--- a/configure
+++ b/configure
@@ -1103,8 +1103,10 @@ fi
 # gdb test
 
 if test -n "$gdb_bin"; then
-    gdb_version=$($gdb_bin --version | head -n 1)
-    if version_ge ${gdb_version##* } 9.1; then
+    gdb_version_string=$($gdb_bin --version | head -n 1)
+    # Extract last field in the version string
+    gdb_version=${gdb_version_string##* }
+    if version_ge $gdb_version 9.1; then
         gdb_arches=$($python "$source_path/scripts/probe-gdb-support.py" $gdb_bin)
     else
         gdb_bin=""
@@ -1673,7 +1675,7 @@ for target in $target_list; do
           echo "GDB=$gdb_bin" >> $config_target_mak
       fi
 
-      if test "${gdb_arches#*aarch64}" != "$gdb_arches" && version_ge ${gdb_version##* } 15.0; then
+      if test "${gdb_arches#*aarch64}" != "$gdb_arches" && version_ge $gdb_version 15.0; then
           echo "GDB_HAS_MTE=y" >> $config_target_mak
       fi
 
-- 
2.39.2



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

* [PATCH 5/6] configure: Fix GDB version detection for GDB_HAS_MTE
  2024-08-07 11:40 [PATCH 0/6] A few more fixes for 9.1 Alex Bennée
                   ` (3 preceding siblings ...)
  2024-08-07 11:40 ` [PATCH 4/6] configure: Avoid use of param. expansion when using gdb_version Alex Bennée
@ 2024-08-07 11:40 ` Alex Bennée
  2024-08-07 11:40 ` [PATCH 6/6] scripts/checkpatch: more checks on files imported from Linux Alex Bennée
  5 siblings, 0 replies; 7+ messages in thread
From: Alex Bennée @ 2024-08-07 11:40 UTC (permalink / raw)
  To: qemu-devel
  Cc: Wainer dos Santos Moschetta, Philippe Mathieu-Daudé,
	Thomas Huth, Beraldo Leal, Yoshinori Sato, Alex Bennée,
	Paolo Bonzini, Cleber Rosa, Gustavo Romero

From: Gustavo Romero <gustavo.romero@linaro.org>

The test gdbstub/test-mte.py requires a GDB version that supports the
qIsAddressTagged packet. According to GDB NEWS [0], this packet was
first made available in the GDB 15.1 release, not in 15.0, so this
commit fixes it in configure.

[0] https://www.sourceware.org/gdb/news/

Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2477
Message-Id: <20240804161850.2646299-4-gustavo.romero@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index 97de85d710..d08b71f14b 100755
--- a/configure
+++ b/configure
@@ -1675,7 +1675,7 @@ for target in $target_list; do
           echo "GDB=$gdb_bin" >> $config_target_mak
       fi
 
-      if test "${gdb_arches#*aarch64}" != "$gdb_arches" && version_ge $gdb_version 15.0; then
+      if test "${gdb_arches#*aarch64}" != "$gdb_arches" && version_ge $gdb_version 15.1; then
           echo "GDB_HAS_MTE=y" >> $config_target_mak
       fi
 
-- 
2.39.2



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

* [PATCH 6/6] scripts/checkpatch: more checks on files imported from Linux
  2024-08-07 11:40 [PATCH 0/6] A few more fixes for 9.1 Alex Bennée
                   ` (4 preceding siblings ...)
  2024-08-07 11:40 ` [PATCH 5/6] configure: Fix GDB version detection for GDB_HAS_MTE Alex Bennée
@ 2024-08-07 11:40 ` Alex Bennée
  5 siblings, 0 replies; 7+ messages in thread
From: Alex Bennée @ 2024-08-07 11:40 UTC (permalink / raw)
  To: qemu-devel
  Cc: Wainer dos Santos Moschetta, Philippe Mathieu-Daudé,
	Thomas Huth, Beraldo Leal, Yoshinori Sato, Alex Bennée,
	Paolo Bonzini, Cleber Rosa, Stefano Garzarella, Cornelia Huck,
	Daniel P . Berrangé

From: Stefano Garzarella <sgarzare@redhat.com>

If a file imported from Linux is touched, emit a warning and suggest
using scripts/update-linux-headers.sh.

Also check that updating imported files from Linux are not mixed with
other changes, in which case emit an error.

Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20240718072050.9503-1-sgarzare@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 scripts/checkpatch.pl | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index ff373a7083..65b6f46f90 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1374,6 +1374,9 @@ sub process {
 	my $in_header_lines = $file ? 0 : 1;
 	my $in_commit_log = 0;		#Scanning lines before patch
 	my $reported_maintainer_file = 0;
+	my $reported_mixing_imported_file = 0;
+	my $in_imported_file = 0;
+	my $in_no_imported_file = 0;
 	my $non_utf8_charset = 0;
 
 	our @report = ();
@@ -1673,6 +1676,27 @@ sub process {
 # ignore non-hunk lines and lines being removed
 		next if (!$hunk_line || $line =~ /^-/);
 
+# Check that updating imported files from Linux are not mixed with other changes
+		if ($realfile =~ /^(linux-headers|include\/standard-headers)\//) {
+			if (!$in_imported_file) {
+				WARN("added, moved or deleted file(s) " .
+				     "imported from Linux, are you using " .
+				     "scripts/update-linux-headers.sh?\n" .
+				     $herecurr);
+			}
+			$in_imported_file = 1;
+		} else {
+			$in_no_imported_file = 1;
+		}
+
+		if (!$reported_mixing_imported_file &&
+		    $in_imported_file && $in_no_imported_file) {
+			ERROR("headers imported from Linux should be self-" .
+			      "contained in a patch with no other changes\n" .
+			      $herecurr);
+			$reported_mixing_imported_file = 1;
+		}
+
 # ignore files that are being periodically imported from Linux
 		next if ($realfile =~ /^(linux-headers|include\/standard-headers)\//);
 
-- 
2.39.2



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

end of thread, other threads:[~2024-08-07 11:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-07 11:40 [PATCH 0/6] A few more fixes for 9.1 Alex Bennée
2024-08-07 11:40 ` [PATCH 1/6] tests/avocado: Re-enable gdbsim-r5f562n8 testing U-Boot Alex Bennée
2024-08-07 11:40 ` [PATCH 2/6] Makefile: trigger re-configure on updated pythondeps Alex Bennée
2024-08-07 11:40 ` [PATCH 3/6] configure: Fix arch detection for GDB_HAS_MTE Alex Bennée
2024-08-07 11:40 ` [PATCH 4/6] configure: Avoid use of param. expansion when using gdb_version Alex Bennée
2024-08-07 11:40 ` [PATCH 5/6] configure: Fix GDB version detection for GDB_HAS_MTE Alex Bennée
2024-08-07 11:40 ` [PATCH 6/6] scripts/checkpatch: more checks on files imported from Linux Alex Bennée

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).