* [PULL 00/11] testing patches (+ 1 deprecation patch)
@ 2023-10-27 9:36 Thomas Huth
2023-10-27 9:37 ` [PULL 01/11] system/qtest: Clean up global variable shadowing in qtest_server_init() Thomas Huth
` (11 more replies)
0 siblings, 12 replies; 13+ messages in thread
From: Thomas Huth @ 2023-10-27 9:36 UTC (permalink / raw)
To: qemu-devel; +Cc: Stefan Hajnoczi
Hi Stefan!
The following changes since commit a95260486aa7e78d7c7194eba65cf03311ad94ad:
Merge tag 'pull-tcg-20231023' of https://gitlab.com/rth7680/qemu into staging (2023-10-23 14:45:46 -0700)
are available in the Git repository at:
https://gitlab.com/thuth/qemu.git tags/pull-request-2023-10-27
for you to fetch changes up to 1aa84a4b6e2cd3f0969101f1e608415e5381d9a2:
ipmi-bt-test: force ipv4 (2023-10-27 10:13:17 +0200)
----------------------------------------------------------------
* Fix global variable shadowing in test code
* Avoid recompiling libfdt in the FreeBSD VM
* Mark old pc machine types as deprecated
* Force IPv4 in the ipmi-bt-test
----------------------------------------------------------------
Philippe Mathieu-Daudé (8):
system/qtest: Clean up global variable shadowing in qtest_server_init()
tests/throttle: Clean up global variable shadowing
tests/virtio-scsi: Clean up global variable shadowing
tests/cdrom-test: Clean up global variable shadowing in prepare_image()
tests/rtl8139: Clean up global variable shadowing
tests/npcm7xx_adc: Clean up global variable shadowing
tests/aio: Clean up global variable shadowing
tests/coroutine: Clean up global variable shadowing
Thomas Huth (2):
docs/about: Mark the old pc-i440fx-2.0 - 2.3 machine types as deprecated
tests/vm/freebsd: Add additional library paths for libfdt
Vladimir Sementsov-Ogievskiy (1):
ipmi-bt-test: force ipv4
docs/about/deprecated.rst | 8 ++++++++
hw/i386/pc_piix.c | 1 +
system/qtest.c | 16 ++++++++--------
tests/qtest/cdrom-test.c | 6 +++---
tests/qtest/ipmi-bt-test.c | 2 +-
tests/qtest/npcm7xx_adc-test.c | 14 +++++++-------
tests/qtest/rtl8139-test.c | 12 ++++++------
tests/qtest/virtio-scsi-test.c | 2 +-
tests/unit/test-aio.c | 4 ++--
tests/unit/test-coroutine.c | 12 ++++++------
tests/unit/test-throttle.c | 1 -
tests/vm/freebsd | 5 +++--
12 files changed, 46 insertions(+), 37 deletions(-)
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PULL 01/11] system/qtest: Clean up global variable shadowing in qtest_server_init()
2023-10-27 9:36 [PULL 00/11] testing patches (+ 1 deprecation patch) Thomas Huth
@ 2023-10-27 9:37 ` Thomas Huth
2023-10-27 9:37 ` [PULL 02/11] tests/throttle: Clean up global variable shadowing Thomas Huth
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Thomas Huth @ 2023-10-27 9:37 UTC (permalink / raw)
To: qemu-devel; +Cc: Stefan Hajnoczi, Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé <philmd@linaro.org>
Rename the variable to fix:
softmmu/qtest.c:869:13: error: declaration shadows a variable in the global scope [-Werror,-Wshadow]
Object *qtest;
^
softmmu/qtest.c:53:15: note: previous declaration is here
static QTest *qtest;
^
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20231009100251.56019-2-philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
system/qtest.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/system/qtest.c b/system/qtest.c
index 35b643a274..7964f0b248 100644
--- a/system/qtest.c
+++ b/system/qtest.c
@@ -866,7 +866,7 @@ void qtest_server_init(const char *qtest_chrdev, const char *qtest_log, Error **
{
ERRP_GUARD();
Chardev *chr;
- Object *qtest;
+ Object *qobj;
chr = qemu_chr_new("qtest", qtest_chrdev, NULL);
if (chr == NULL) {
@@ -875,18 +875,18 @@ void qtest_server_init(const char *qtest_chrdev, const char *qtest_log, Error **
return;
}
- qtest = object_new(TYPE_QTEST);
- object_property_set_str(qtest, "chardev", chr->label, &error_abort);
+ qobj = object_new(TYPE_QTEST);
+ object_property_set_str(qobj, "chardev", chr->label, &error_abort);
if (qtest_log) {
- object_property_set_str(qtest, "log", qtest_log, &error_abort);
+ object_property_set_str(qobj, "log", qtest_log, &error_abort);
}
- object_property_add_child(qdev_get_machine(), "qtest", qtest);
- user_creatable_complete(USER_CREATABLE(qtest), errp);
+ object_property_add_child(qdev_get_machine(), "qtest", qobj);
+ user_creatable_complete(USER_CREATABLE(qobj), errp);
if (*errp) {
- object_unparent(qtest);
+ object_unparent(qobj);
}
object_unref(OBJECT(chr));
- object_unref(qtest);
+ object_unref(qobj);
}
static bool qtest_server_start(QTest *q, Error **errp)
--
2.41.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PULL 02/11] tests/throttle: Clean up global variable shadowing
2023-10-27 9:36 [PULL 00/11] testing patches (+ 1 deprecation patch) Thomas Huth
2023-10-27 9:37 ` [PULL 01/11] system/qtest: Clean up global variable shadowing in qtest_server_init() Thomas Huth
@ 2023-10-27 9:37 ` Thomas Huth
2023-10-27 9:37 ` [PULL 03/11] tests/virtio-scsi: " Thomas Huth
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Thomas Huth @ 2023-10-27 9:37 UTC (permalink / raw)
To: qemu-devel; +Cc: Stefan Hajnoczi, Philippe Mathieu-Daudé, Alberto Garcia
From: Philippe Mathieu-Daudé <philmd@linaro.org>
Follow all other tests pattern from this file, use the
global 'cfg' variable to fix:
tests/unit/test-throttle.c:621:20: error: declaration shadows a variable in the global scope [-Werror,-Wshadow]
ThrottleConfig cfg;
^
tests/unit/test-throttle.c:28:23: note: previous declaration is here
static ThrottleConfig cfg;
^
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Acked-by: Alberto Garcia <berto@igalia.com>
Message-ID: <20231009100251.56019-3-philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/unit/test-throttle.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/tests/unit/test-throttle.c b/tests/unit/test-throttle.c
index ac35d65d19..2146cfacd3 100644
--- a/tests/unit/test-throttle.c
+++ b/tests/unit/test-throttle.c
@@ -618,7 +618,6 @@ static bool do_test_accounting(bool is_ops, /* are we testing bps or ops */
{ THROTTLE_OPS_TOTAL,
THROTTLE_OPS_READ,
THROTTLE_OPS_WRITE, } };
- ThrottleConfig cfg;
BucketType index;
int i;
--
2.41.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PULL 03/11] tests/virtio-scsi: Clean up global variable shadowing
2023-10-27 9:36 [PULL 00/11] testing patches (+ 1 deprecation patch) Thomas Huth
2023-10-27 9:37 ` [PULL 01/11] system/qtest: Clean up global variable shadowing in qtest_server_init() Thomas Huth
2023-10-27 9:37 ` [PULL 02/11] tests/throttle: Clean up global variable shadowing Thomas Huth
@ 2023-10-27 9:37 ` Thomas Huth
2023-10-27 9:37 ` [PULL 04/11] tests/cdrom-test: Clean up global variable shadowing in prepare_image() Thomas Huth
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Thomas Huth @ 2023-10-27 9:37 UTC (permalink / raw)
To: qemu-devel
Cc: Stefan Hajnoczi, Philippe Mathieu-Daudé,
Emmanouil Pitsidianakis
From: Philippe Mathieu-Daudé <philmd@linaro.org>
Rename the (unused) 'allow' argument, following the pattern
used by the other tests in this file. This fixes:
tests/qtest/virtio-scsi-test.c:159:61: error: declaration shadows a variable in the global scope [-Werror,-Wshadow]
static void hotplug(void *obj, void *data, QGuestAllocator *alloc)
^
tests/qtest/virtio-scsi-test.c:37:25: note: previous declaration is here
static QGuestAllocator *alloc;
^
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-By: Emmanouil Pitsidianakis <manos.pitsidianakis@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20231009100251.56019-4-philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/qtest/virtio-scsi-test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/qtest/virtio-scsi-test.c b/tests/qtest/virtio-scsi-test.c
index ceaa7f2415..db10d572d0 100644
--- a/tests/qtest/virtio-scsi-test.c
+++ b/tests/qtest/virtio-scsi-test.c
@@ -156,7 +156,7 @@ static QVirtioSCSIQueues *qvirtio_scsi_init(QVirtioDevice *dev)
return vs;
}
-static void hotplug(void *obj, void *data, QGuestAllocator *alloc)
+static void hotplug(void *obj, void *data, QGuestAllocator *t_alloc)
{
QTestState *qts = global_qtest;
--
2.41.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PULL 04/11] tests/cdrom-test: Clean up global variable shadowing in prepare_image()
2023-10-27 9:36 [PULL 00/11] testing patches (+ 1 deprecation patch) Thomas Huth
` (2 preceding siblings ...)
2023-10-27 9:37 ` [PULL 03/11] tests/virtio-scsi: " Thomas Huth
@ 2023-10-27 9:37 ` Thomas Huth
2023-10-27 9:37 ` [PULL 05/11] tests/rtl8139: Clean up global variable shadowing Thomas Huth
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Thomas Huth @ 2023-10-27 9:37 UTC (permalink / raw)
To: qemu-devel; +Cc: Stefan Hajnoczi, Philippe Mathieu-Daudé, John Snow
From: Philippe Mathieu-Daudé <philmd@linaro.org>
Rename the variable to fix:
tests/qtest/cdrom-test.c:40:50: error: declaration shadows a variable in the global scope [-Werror,-Wshadow]
static int prepare_image(const char *arch, char *isoimage)
^
tests/qtest/cdrom-test.c:18:13: note: previous declaration is here
static char isoimage[] = "cdrom-boot-iso-XXXXXX";
^
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: John Snow <jsnow@redhat.com>
Message-ID: <20231009100251.56019-5-philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/qtest/cdrom-test.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/qtest/cdrom-test.c b/tests/qtest/cdrom-test.c
index f2a8d91929..0945383789 100644
--- a/tests/qtest/cdrom-test.c
+++ b/tests/qtest/cdrom-test.c
@@ -37,17 +37,17 @@ static int exec_xorrisofs(const char **args)
return exit_status;
}
-static int prepare_image(const char *arch, char *isoimage)
+static int prepare_image(const char *arch, char *isoimagepath)
{
char srcdir[] = "cdrom-test-dir-XXXXXX";
char *codefile = NULL;
int ifh, ret = -1;
const char *args[] = {
"xorrisofs", "-quiet", "-l", "-no-emul-boot",
- "-b", NULL, "-o", isoimage, srcdir, NULL
+ "-b", NULL, "-o", isoimagepath, srcdir, NULL
};
- ifh = mkstemp(isoimage);
+ ifh = mkstemp(isoimagepath);
if (ifh < 0) {
perror("Error creating temporary iso image file");
return -1;
--
2.41.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PULL 05/11] tests/rtl8139: Clean up global variable shadowing
2023-10-27 9:36 [PULL 00/11] testing patches (+ 1 deprecation patch) Thomas Huth
` (3 preceding siblings ...)
2023-10-27 9:37 ` [PULL 04/11] tests/cdrom-test: Clean up global variable shadowing in prepare_image() Thomas Huth
@ 2023-10-27 9:37 ` Thomas Huth
2023-10-27 9:37 ` [PULL 06/11] tests/npcm7xx_adc: " Thomas Huth
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Thomas Huth @ 2023-10-27 9:37 UTC (permalink / raw)
To: qemu-devel; +Cc: Stefan Hajnoczi, Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé <philmd@linaro.org>
Rename the variable to fix:
tests/qtest/rtl8139-test.c:28:33: error: declaration shadows a variable in the global scope [-Werror,-Wshadow]
static void save_fn(QPCIDevice *dev, int devfn, void *data)
^
tests/qtest/rtl8139-test.c:37:17: error: declaration shadows a variable in the global scope [-Werror,-Wshadow]
QPCIDevice *dev;
^
tests/qtest/rtl8139-test.c:25:20: note: previous declaration is here
static QPCIDevice *dev;
^
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20231009100251.56019-7-philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/qtest/rtl8139-test.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tests/qtest/rtl8139-test.c b/tests/qtest/rtl8139-test.c
index 4dc0a0d22e..eedf90f65a 100644
--- a/tests/qtest/rtl8139-test.c
+++ b/tests/qtest/rtl8139-test.c
@@ -22,7 +22,7 @@ static void nop(void)
#define CLK 33333333
static QPCIBus *pcibus;
-static QPCIDevice *dev;
+static QPCIDevice *pcidev;
static QPCIBar dev_bar;
static void save_fn(QPCIDevice *dev, int devfn, void *data)
@@ -46,7 +46,7 @@ static QPCIDevice *get_device(void)
#define PORT(name, len, val) \
static unsigned __attribute__((unused)) in_##name(void) \
{ \
- unsigned res = qpci_io_read##len(dev, dev_bar, (val)); \
+ unsigned res = qpci_io_read##len(pcidev, dev_bar, (val)); \
if (verbosity_level >= 2) { \
g_test_message("*%s -> %x", #name, res); \
} \
@@ -57,7 +57,7 @@ static void out_##name(unsigned v) \
if (verbosity_level >= 2) { \
g_test_message("%x -> *%s", v, #name); \
} \
- qpci_io_write##len(dev, dev_bar, (val), v); \
+ qpci_io_write##len(pcidev, dev_bar, (val), v); \
}
PORT(Timer, l, 0x48)
@@ -189,11 +189,11 @@ static void test_init(void)
{
uint64_t barsize;
- dev = get_device();
+ pcidev = get_device();
- dev_bar = qpci_iomap(dev, 0, &barsize);
+ dev_bar = qpci_iomap(pcidev, 0, &barsize);
- qpci_device_enable(dev);
+ qpci_device_enable(pcidev);
test_timer();
}
--
2.41.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PULL 06/11] tests/npcm7xx_adc: Clean up global variable shadowing
2023-10-27 9:36 [PULL 00/11] testing patches (+ 1 deprecation patch) Thomas Huth
` (4 preceding siblings ...)
2023-10-27 9:37 ` [PULL 05/11] tests/rtl8139: Clean up global variable shadowing Thomas Huth
@ 2023-10-27 9:37 ` Thomas Huth
2023-10-27 9:37 ` [PULL 07/11] tests/aio: " Thomas Huth
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Thomas Huth @ 2023-10-27 9:37 UTC (permalink / raw)
To: qemu-devel; +Cc: Stefan Hajnoczi, Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé <philmd@linaro.org>
Rename the global 'adc' variable in order to avoid:
tests/qtest/npcm7xx_adc-test.c:98:58: error: declaration shadows a variable in the global scope [-Werror,-Wshadow]
static uint32_t adc_read_con(QTestState *qts, const ADC *adc)
^
tests/qtest/npcm7xx_adc-test.c:103:55: error: declaration shadows a variable in the global scope [-Werror,-Wshadow]
static void adc_write_con(QTestState *qts, const ADC *adc, uint32_t value)
^
tests/qtest/npcm7xx_adc-test.c:108:59: error: declaration shadows a variable in the global scope [-Werror,-Wshadow]
static uint32_t adc_read_data(QTestState *qts, const ADC *adc)
^
tests/qtest/npcm7xx_adc-test.c:119:53: error: declaration shadows a variable in the global scope [-Werror,-Wshadow]
static void adc_qom_set(QTestState *qts, const ADC *adc,
^
tests/qtest/npcm7xx_adc-test.c:135:57: error: declaration shadows a variable in the global scope [-Werror,-Wshadow]
static void adc_write_input(QTestState *qts, const ADC *adc,
^
tests/qtest/npcm7xx_adc-test.c:144:56: error: declaration shadows a variable in the global scope [-Werror,-Wshadow]
static void adc_write_vref(QTestState *qts, const ADC *adc, uint32_t value)
^
tests/qtest/npcm7xx_adc-test.c:162:59: error: declaration shadows a variable in the global scope [-Werror,-Wshadow]
static uint32_t adc_prescaler(QTestState *qts, const ADC *adc)
^
tests/qtest/npcm7xx_adc-test.c:175:64: error: declaration shadows a variable in the global scope [-Werror,-Wshadow]
static void adc_wait_conv_finished(QTestState *qts, const ADC *adc,
^
tests/qtest/npcm7xx_adc-test.c:196:16: error: declaration shadows a variable in the global scope [-Werror,-Wshadow]
const ADC *adc = adc_p;
^
tests/qtest/npcm7xx_adc-test.c:207:16: error: declaration shadows a variable in the global scope [-Werror,-Wshadow]
const ADC *adc = adc_p;
^
tests/qtest/npcm7xx_adc-test.c:235:16: error: declaration shadows a variable in the global scope [-Werror,-Wshadow]
const ADC *adc = adc_p;
^
tests/qtest/npcm7xx_adc-test.c:267:16: error: declaration shadows a variable in the global scope [-Werror,-Wshadow]
const ADC *adc = adc_p;
^
tests/qtest/npcm7xx_adc-test.c:293:16: error: declaration shadows a variable in the global scope [-Werror,-Wshadow]
const ADC *adc = adc_p;
^
tests/qtest/npcm7xx_adc-test.c:311:16: error: declaration shadows a variable in the global scope [-Werror,-Wshadow]
const ADC *adc = adc_p;
^
tests/qtest/npcm7xx_adc-test.c:93:5: note: previous declaration is here
ADC adc = {
^
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20231009100251.56019-8-philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/qtest/npcm7xx_adc-test.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/tests/qtest/npcm7xx_adc-test.c b/tests/qtest/npcm7xx_adc-test.c
index 8048044d28..e751a72e36 100644
--- a/tests/qtest/npcm7xx_adc-test.c
+++ b/tests/qtest/npcm7xx_adc-test.c
@@ -90,7 +90,7 @@ typedef struct ADC {
uint64_t base_addr;
} ADC;
-ADC adc = {
+ADC adc_defs = {
.irq = 0,
.base_addr = 0xf000c000
};
@@ -367,12 +367,12 @@ int main(int argc, char **argv)
{
g_test_init(&argc, &argv, NULL);
- add_test(init, &adc);
- add_test(convert_internal, &adc);
- add_test(convert_external, &adc);
- add_test(interrupt, &adc);
- add_test(reset, &adc);
- add_test(calibrate, &adc);
+ add_test(init, &adc_defs);
+ add_test(convert_internal, &adc_defs);
+ add_test(convert_external, &adc_defs);
+ add_test(interrupt, &adc_defs);
+ add_test(reset, &adc_defs);
+ add_test(calibrate, &adc_defs);
return g_test_run();
}
--
2.41.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PULL 07/11] tests/aio: Clean up global variable shadowing
2023-10-27 9:36 [PULL 00/11] testing patches (+ 1 deprecation patch) Thomas Huth
` (5 preceding siblings ...)
2023-10-27 9:37 ` [PULL 06/11] tests/npcm7xx_adc: " Thomas Huth
@ 2023-10-27 9:37 ` Thomas Huth
2023-10-27 9:37 ` [PULL 08/11] tests/coroutine: " Thomas Huth
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Thomas Huth @ 2023-10-27 9:37 UTC (permalink / raw)
To: qemu-devel; +Cc: Stefan Hajnoczi, Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé <philmd@linaro.org>
Rename the argument to fix:
tests/unit/test-aio.c:130:44: error: declaration shadows a variable in the global scope [-Werror,-Wshadow]
static void set_event_notifier(AioContext *ctx, EventNotifier *notifier,
^
tests/unit/test-aio.c:22:20: note: previous declaration is here
static AioContext *ctx;
^
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20231009100251.56019-9-philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/unit/test-aio.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/unit/test-aio.c b/tests/unit/test-aio.c
index 71ed31a4db..337b6e4ea7 100644
--- a/tests/unit/test-aio.c
+++ b/tests/unit/test-aio.c
@@ -127,10 +127,10 @@ static void *test_acquire_thread(void *opaque)
return NULL;
}
-static void set_event_notifier(AioContext *ctx, EventNotifier *notifier,
+static void set_event_notifier(AioContext *nctx, EventNotifier *notifier,
EventNotifierHandler *handler)
{
- aio_set_event_notifier(ctx, notifier, handler, NULL, NULL);
+ aio_set_event_notifier(nctx, notifier, handler, NULL, NULL);
}
static void dummy_notifier_read(EventNotifier *n)
--
2.41.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PULL 08/11] tests/coroutine: Clean up global variable shadowing
2023-10-27 9:36 [PULL 00/11] testing patches (+ 1 deprecation patch) Thomas Huth
` (6 preceding siblings ...)
2023-10-27 9:37 ` [PULL 07/11] tests/aio: " Thomas Huth
@ 2023-10-27 9:37 ` Thomas Huth
2023-10-27 9:37 ` [PULL 09/11] docs/about: Mark the old pc-i440fx-2.0 - 2.3 machine types as deprecated Thomas Huth
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Thomas Huth @ 2023-10-27 9:37 UTC (permalink / raw)
To: qemu-devel; +Cc: Stefan Hajnoczi, Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé <philmd@linaro.org>
Rename the global variable to avoid:
tests/unit/test-coroutine.c:430:11: error: declaration shadows a variable in the global scope [-Werror,-Wshadow]
bool *done = opaque;
^
tests/unit/test-coroutine.c:438:10: error: declaration shadows a variable in the global scope [-Werror,-Wshadow]
bool done = false;
^
tests/unit/test-coroutine.c:198:12: note: previous declaration is here
static int done;
^
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20231009100251.56019-11-philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/unit/test-coroutine.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tests/unit/test-coroutine.c b/tests/unit/test-coroutine.c
index a2563647e7..49d4d9b251 100644
--- a/tests/unit/test-coroutine.c
+++ b/tests/unit/test-coroutine.c
@@ -195,7 +195,7 @@ static void test_no_dangling_access(void)
}
static bool locked;
-static int done;
+static int done_count;
static void coroutine_fn mutex_fn(void *opaque)
{
@@ -206,7 +206,7 @@ static void coroutine_fn mutex_fn(void *opaque)
qemu_coroutine_yield();
locked = false;
qemu_co_mutex_unlock(m);
- done++;
+ done_count++;
}
static void coroutine_fn lockable_fn(void *opaque)
@@ -218,7 +218,7 @@ static void coroutine_fn lockable_fn(void *opaque)
qemu_coroutine_yield();
locked = false;
qemu_lockable_unlock(x);
- done++;
+ done_count++;
}
static void do_test_co_mutex(CoroutineEntry *entry, void *opaque)
@@ -226,7 +226,7 @@ static void do_test_co_mutex(CoroutineEntry *entry, void *opaque)
Coroutine *c1 = qemu_coroutine_create(entry, opaque);
Coroutine *c2 = qemu_coroutine_create(entry, opaque);
- done = 0;
+ done_count = 0;
qemu_coroutine_enter(c1);
g_assert(locked);
qemu_coroutine_enter(c2);
@@ -235,11 +235,11 @@ static void do_test_co_mutex(CoroutineEntry *entry, void *opaque)
* terminates.
*/
qemu_coroutine_enter(c1);
- g_assert_cmpint(done, ==, 1);
+ g_assert_cmpint(done_count, ==, 1);
g_assert(locked);
qemu_coroutine_enter(c2);
- g_assert_cmpint(done, ==, 2);
+ g_assert_cmpint(done_count, ==, 2);
g_assert(!locked);
}
--
2.41.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PULL 09/11] docs/about: Mark the old pc-i440fx-2.0 - 2.3 machine types as deprecated
2023-10-27 9:36 [PULL 00/11] testing patches (+ 1 deprecation patch) Thomas Huth
` (7 preceding siblings ...)
2023-10-27 9:37 ` [PULL 08/11] tests/coroutine: " Thomas Huth
@ 2023-10-27 9:37 ` Thomas Huth
2023-10-27 9:37 ` [PULL 10/11] tests/vm/freebsd: Add additional library paths for libfdt Thomas Huth
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Thomas Huth @ 2023-10-27 9:37 UTC (permalink / raw)
To: qemu-devel; +Cc: Stefan Hajnoczi, Philippe Mathieu-Daudé
As we've seen in the past, it's useful for deprecating old machine
types to finally be able to get of legacy code or do other clean-ups
(see e.g. commit ea985d235b868047 that was used to drop the PCI code in
the 128k bios binaries to free some precious space in those binaries).
So let's continue deprecating the oldest pc machine types. QEMU 2.3
has been released 8 years ago, so that's plenty of time since such
machine types have been used by default, thus deprecating pc-i440fx-2.0
up to pc-i440fx-2.3 should be fine nowadays.
Message-ID: <20231006075247.403364-1-thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
docs/about/deprecated.rst | 8 ++++++++
hw/i386/pc_piix.c | 1 +
2 files changed, 9 insertions(+)
diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
index 2febd2d12f..4e0eb2fe02 100644
--- a/docs/about/deprecated.rst
+++ b/docs/about/deprecated.rst
@@ -247,6 +247,14 @@ deprecated; use the new name ``dtb-randomness`` instead. The new name
better reflects the way this property affects all random data within
the device tree blob, not just the ``kaslr-seed`` node.
+``pc-i440fx-2.0`` up to ``pc-i440fx-2.3`` (since 8.2)
+'''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+These old machine types are quite neglected nowadays and thus might have
+various pitfalls with regards to live migration. Use a newer machine type
+instead.
+
+
Backend options
---------------
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 334d9a0299..26e161beb9 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -849,6 +849,7 @@ static void pc_i440fx_2_3_machine_options(MachineClass *m)
{
pc_i440fx_2_4_machine_options(m);
m->hw_version = "2.3.0";
+ m->deprecation_reason = "old and unattended - use a newer version instead";
compat_props_add(m->compat_props, hw_compat_2_3, hw_compat_2_3_len);
compat_props_add(m->compat_props, pc_compat_2_3, pc_compat_2_3_len);
}
--
2.41.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PULL 10/11] tests/vm/freebsd: Add additional library paths for libfdt
2023-10-27 9:36 [PULL 00/11] testing patches (+ 1 deprecation patch) Thomas Huth
` (8 preceding siblings ...)
2023-10-27 9:37 ` [PULL 09/11] docs/about: Mark the old pc-i440fx-2.0 - 2.3 machine types as deprecated Thomas Huth
@ 2023-10-27 9:37 ` Thomas Huth
2023-10-27 9:37 ` [PULL 11/11] ipmi-bt-test: force ipv4 Thomas Huth
2023-10-30 4:39 ` [PULL 00/11] testing patches (+ 1 deprecation patch) Stefan Hajnoczi
11 siblings, 0 replies; 13+ messages in thread
From: Thomas Huth @ 2023-10-27 9:37 UTC (permalink / raw)
To: qemu-devel; +Cc: Stefan Hajnoczi, Warner Losh
libfdt is installed in /usr/local on FreeBSD, and since this
library does not have a pkg-config file, we have to specify the
paths manually. This way we can avoid that Meson has to recompile
the dtc subproject each time.
Message-ID: <20231016161053.39150-1-thuth@redhat.com>
Reviewed-by: Warner Losh <imp@bsdimp.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/vm/freebsd | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tests/vm/freebsd b/tests/vm/freebsd
index ac51376c82..b581bd17fb 100755
--- a/tests/vm/freebsd
+++ b/tests/vm/freebsd
@@ -38,8 +38,9 @@ class FreeBSDVM(basevm.BaseVM):
cd $(mktemp -d /home/qemu/qemu-test.XXXXXX);
mkdir src build; cd src;
tar -xf /dev/vtbd1;
- cd ../build
- ../src/configure --python=python3.9 {configure_opts};
+ cd ../build;
+ ../src/configure --python=python3.9 --extra-ldflags=-L/usr/local/lib \
+ --extra-cflags=-I/usr/local/include {configure_opts};
gmake --output-sync -j{jobs} {target} {verbose};
"""
--
2.41.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PULL 11/11] ipmi-bt-test: force ipv4
2023-10-27 9:36 [PULL 00/11] testing patches (+ 1 deprecation patch) Thomas Huth
` (9 preceding siblings ...)
2023-10-27 9:37 ` [PULL 10/11] tests/vm/freebsd: Add additional library paths for libfdt Thomas Huth
@ 2023-10-27 9:37 ` Thomas Huth
2023-10-30 4:39 ` [PULL 00/11] testing patches (+ 1 deprecation patch) Stefan Hajnoczi
11 siblings, 0 replies; 13+ messages in thread
From: Thomas Huth @ 2023-10-27 9:37 UTC (permalink / raw)
To: qemu-devel; +Cc: Stefan Hajnoczi, Vladimir Sementsov-Ogievskiy, Corey Minyard
From: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
We open ipv4 listening socket. But "localhost" in qemu parameters may
load to Qemu trying to connect with ipv6 and fail with "Connection
refused". Force ipv4 by using ipv4 ip address.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Message-ID: <20231018191123.1176602-1-vsementsov@yandex-team.ru>
Acked-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/qtest/ipmi-bt-test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/qtest/ipmi-bt-test.c b/tests/qtest/ipmi-bt-test.c
index ed431e34e6..383239bcd4 100644
--- a/tests/qtest/ipmi-bt-test.c
+++ b/tests/qtest/ipmi-bt-test.c
@@ -411,7 +411,7 @@ int main(int argc, char **argv)
g_test_init(&argc, &argv, NULL);
global_qtest = qtest_initf(
- " -chardev socket,id=ipmi0,host=localhost,port=%d,reconnect=10"
+ " -chardev socket,id=ipmi0,host=127.0.0.1,port=%d,reconnect=10"
" -device ipmi-bmc-extern,chardev=ipmi0,id=bmc0"
" -device isa-ipmi-bt,bmc=bmc0", emu_port);
qtest_irq_intercept_in(global_qtest, "ioapic");
--
2.41.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PULL 00/11] testing patches (+ 1 deprecation patch)
2023-10-27 9:36 [PULL 00/11] testing patches (+ 1 deprecation patch) Thomas Huth
` (10 preceding siblings ...)
2023-10-27 9:37 ` [PULL 11/11] ipmi-bt-test: force ipv4 Thomas Huth
@ 2023-10-30 4:39 ` Stefan Hajnoczi
11 siblings, 0 replies; 13+ messages in thread
From: Stefan Hajnoczi @ 2023-10-30 4:39 UTC (permalink / raw)
To: Thomas Huth; +Cc: qemu-devel, Stefan Hajnoczi
[-- Attachment #1: Type: text/plain, Size: 115 bytes --]
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any user-visible changes.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2023-10-30 6:10 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-27 9:36 [PULL 00/11] testing patches (+ 1 deprecation patch) Thomas Huth
2023-10-27 9:37 ` [PULL 01/11] system/qtest: Clean up global variable shadowing in qtest_server_init() Thomas Huth
2023-10-27 9:37 ` [PULL 02/11] tests/throttle: Clean up global variable shadowing Thomas Huth
2023-10-27 9:37 ` [PULL 03/11] tests/virtio-scsi: " Thomas Huth
2023-10-27 9:37 ` [PULL 04/11] tests/cdrom-test: Clean up global variable shadowing in prepare_image() Thomas Huth
2023-10-27 9:37 ` [PULL 05/11] tests/rtl8139: Clean up global variable shadowing Thomas Huth
2023-10-27 9:37 ` [PULL 06/11] tests/npcm7xx_adc: " Thomas Huth
2023-10-27 9:37 ` [PULL 07/11] tests/aio: " Thomas Huth
2023-10-27 9:37 ` [PULL 08/11] tests/coroutine: " Thomas Huth
2023-10-27 9:37 ` [PULL 09/11] docs/about: Mark the old pc-i440fx-2.0 - 2.3 machine types as deprecated Thomas Huth
2023-10-27 9:37 ` [PULL 10/11] tests/vm/freebsd: Add additional library paths for libfdt Thomas Huth
2023-10-27 9:37 ` [PULL 11/11] ipmi-bt-test: force ipv4 Thomas Huth
2023-10-30 4:39 ` [PULL 00/11] testing patches (+ 1 deprecation patch) Stefan Hajnoczi
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).