Skip to contentSkip to conversation

modules-test: fix const cast

PATCH In review Paolo Bonzini 5 participants 13 messages Aug 22, 2019 – Aug 27, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 modules-test: fix const cast

---
 tests/modules-test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/modules-test.c +1 -1
index 3aef0e5..a8118e9 100644
@@ -4,7 +4,7 @@
 static void test_modules_load(const void *data)
 {
     QTestState *qts;
-    const char **args = data;
+    const char **args = (const char **)data;
 
     qts = qtest_init(NULL);
     qtest_module_load(qts, args[0], args[1]);
Signature · 1 line
1.8.3.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 2 lines · Paolo Bonzini
Quoted 21 lines
---
 tests/modules-test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/modules-test.c +1 -2
index 3aef0e5..a8118e9 100644
@@ -4,7 +4,7 @@
 static void test_modules_load(const void *data)
 {
     QTestState *qts;
-    const char **args = data;
+    const char **args = (const char **)data;
 
     qts = qtest_init(NULL);
     qtest_module_load(qts, args[0], args[1]);
--

1.8.3.1

Signature · 1 line
Marc-André Lureau
Reviewed-by on v1 1/1
#2 lore raw
In reply to Paolo Bonzini
Quoted 10 lines · Paolo Bonzini
---
 tests/modules-test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/modules-test.c +0 -0
index 3aef0e5..a8118e9 100644

tests/modules-test.c line 10

Quoted 8 lines
tests/modules-test.c +1 -1
@@ -4,7 +4,7 @@
 static void test_modules_load(const void *data)
 {
     QTestState *qts;
-    const char **args = data;
+    const char **args = (const char **)data;
 
     qts = qtest_init(NULL);
     qtest_module_load(qts, args[0], args[1]);

Why did nobody notice this before? ... some additional words in the patch description would be fine.

Anyway:

#3 lore raw
Quoted 18 lines · Thomas Huth
Quoted 16 lines · Paolo Bonzini
---
 tests/modules-test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/modules-test.c +1 -1
index 3aef0e5..a8118e9 100644
@@ -4,7 +4,7 @@
 static void test_modules_load(const void *data)
 {
     QTestState *qts;
-    const char **args = data;
+    const char **args = (const char **)data;
 
Quoted 5 lines

tests/modules-test.c line 10

Quoted 2 lines
tests/modules-test.c +0 -0
     qts = qtest_init(NULL);
     qtest_module_load(qts, args[0], args[1]);

Why did nobody notice this before? ... some additional words in the patch description would be fine.

It got into the tree because I don't have an --enable-modules config in my set of things I run before merging. It's in the Travis build set, but that only runs after the fact.

thanks
-- PMM

#4 lore raw
Quoted 25 lines · Peter Maydell
Quoted 18 lines · Thomas Huth
Quoted 16 lines · Paolo Bonzini
---
 tests/modules-test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/modules-test.c +1 -1
index 3aef0e5..a8118e9 100644
@@ -4,7 +4,7 @@
 static void test_modules_load(const void *data)
 {
     QTestState *qts;
-    const char **args = data;
+    const char **args = (const char **)data;
 
Quoted 5 lines

tests/modules-test.c line 10

Quoted 2 lines
tests/modules-test.c +0 -0
     qts = qtest_init(NULL);
     qtest_module_load(qts, args[0], args[1]);

Why did nobody notice this before? ... some additional words in the patch description would be fine.

Quoted 3 lines

It got into the tree because I don't have an --enable-modules config in my set of things I run before merging. It's in the Travis build set, but that only runs after the fact.

Are you going to apply this and "[PATCH] modules-test: ui-spice-app is not built as module" to qemu.git directly?

Thanks in advance,

Paolo

#5 lore raw
Quoted 27 lines · Paolo Bonzini
Quoted 25 lines · Peter Maydell
Quoted 23 lines · Thomas Huth
Quoted 10 lines · Paolo Bonzini
---
 tests/modules-test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/modules-test.c +0 -0
index 3aef0e5..a8118e9 100644

tests/modules-test.c line 10

Quoted 8 lines
tests/modules-test.c +1 -1
@@ -4,7 +4,7 @@
 static void test_modules_load(const void *data)
 {
     QTestState *qts;
-    const char **args = data;
+    const char **args = (const char **)data;
 
     qts = qtest_init(NULL);
     qtest_module_load(qts, args[0], args[1]);

Why did nobody notice this before? ... some additional words in the patch description would be fine.

Quoted 6 lines
Quoted 3 lines

It got into the tree because I don't have an --enable-modules config in my set of things I run before merging. It's in the Travis build set, but that only runs after the fact.

Are you going to apply this and "[PATCH] modules-test: ui-spice-app is not built as module" to qemu.git directly?

Is the other one also needed as a build fix ?

I was planning to apply this one directly, yes, but I was waiting to see if you and Thomas wanted to agree any change to the commit message.

thanks
-- PMM

#6 lore raw
Quoted 3 lines · Peter Maydell
Quoted 2 lines

Are you going to apply this and "[PATCH] modules-test: ui-spice-app is not built as module" to qemu.git directly?

Is the other one also needed as a build fix ?

Yes, otherwise the test fails (it didn't fail in the meson tree).

Quoted 3 lines

I was planning to apply this one directly, yes, but I was waiting to see if you and Thomas wanted to agree any change to the commit message.

Just "Fix build failure with --enable-modules" would be as verbose as it needs to be, I guess.

Paolo

#7 lore raw
Quoted 5 lines · Paolo Bonzini
Quoted 3 lines · Peter Maydell
Quoted 2 lines

Are you going to apply this and "[PATCH] modules-test: ui-spice-app is not built as module" to qemu.git directly?

Is the other one also needed as a build fix ?

Quoted 8 lines

Yes, otherwise the test fails (it didn't fail in the meson tree).

Quoted 3 lines

I was planning to apply this one directly, yes, but I was waiting to see if you and Thomas wanted to agree any change to the commit message.

Just "Fix build failure with --enable-modules" would be as verbose as it needs to be, I guess.

Fine for me.

Thomas

#8 lore raw
In reply to Paolo Bonzini
Quoted 7 lines · Paolo Bonzini
Quoted 3 lines · Peter Maydell
Quoted 2 lines

Are you going to apply this and "[PATCH] modules-test: ui-spice-app is not built as module" to qemu.git directly?

Is the other one also needed as a build fix ?

Yes, otherwise the test fails (it didn't fail in the meson tree).

Both this fix and the ui-spice-app one are now in master, but the 'enable-modules' Travis build still seems to be consistently failing -- could somebody take a look, please?

thanks
-- PMM

#9 lore raw

Hi

Quoted 6 lines · Peter Maydell
Quoted 4 lines · Paolo Bonzini
Quoted 2 lines · Peter Maydell
Quoted 2 lines

Are you going to apply this and "[PATCH] modules-test: ui-spice-app is not built as module" to qemu.git directly?

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

Is the other one also needed as a build fix ?

Yes, otherwise the test fails (it didn't fail in the meson tree).

Both this fix and the ui-spice-app one are now in master, but the 'enable-modules' Travis build still seems to be consistently failing -- could somebody take a look, please?

I am looking at, it seems to be related to default machine

MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))} QTEST_QEMU_BINARY=aarch64-softmmu/qemu-system-aarch64 QTEST_QEMU_IMG=qemu-img tests/modules-test -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="modules-test"

qemu-system-aarch64: -machine accel=qtest: No machine specified, and there is no default

Use -machine help to list supported machines

TEST iotest-qcow2: 159

socket_accept failed: Resource temporarily unavailable

**

ERROR:tests/libqtest.c:268:qtest_init_without_qmp_handshake: assertion
failed: (s->fd >= 0 && s->qmp_fd >= 0)

tests/libqtest.c:137: kill_qemu() tried to terminate QEMU process but encountered exit status 1

Aborted (core dumped)

ERROR - too few tests run (expected 9, got 0)

/home/travis/build/elmarco/qemu/tests/Makefile.include:900: recipe for target 'check-qtest-arm' failed

Signature · 1 line
Marc-André Lureau
#10 lore raw
Quoted 26 lines · Marc-André Lureau

Hi

Quoted 6 lines · Peter Maydell
Quoted 4 lines · Paolo Bonzini
Quoted 2 lines · Peter Maydell
Quoted 2 lines

Are you going to apply this and "[PATCH] modules-test: ui-spice-app is not built as module" to qemu.git directly?

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

Is the other one also needed as a build fix ?

Yes, otherwise the test fails (it didn't fail in the meson tree).

Both this fix and the ui-spice-app one are now in master, but the 'enable-modules' Travis build still seems to be consistently failing -- could somebody take a look, please?

I am looking at, it seems to be related to default machine

MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))} QTEST_QEMU_BINARY=aarch64-softmmu/qemu-system-aarch64 QTEST_QEMU_IMG=qemu-img tests/modules-test -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="modules-test"

Quoted 4 lines

qemu-system-aarch64: -machine accel=qtest: No machine specified, and there is no default

Use -machine help to list supported machines

Yeah, you need a machine type. If you need to run code on the QEMU instance you need to know what machine type you're expecting; if you aren't and you're just doing qtest stuff then -machine none may be appropriate.

thanks
-- PMM

Reviewed-by on v1 1/1
#11 lore raw
In reply to Paolo Bonzini
Quoted 22 lines · Paolo Bonzini
---
 tests/modules-test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/modules-test.c +1 -1
index 3aef0e5..a8118e9 100644
@@ -4,7 +4,7 @@
 static void test_modules_load(const void *data)
 {
     QTestState *qts;
-    const char **args = data;
+    const char **args = (const char **)data;
 
     qts = qtest_init(NULL);
     qtest_module_load(qts, args[0], args[1]);
Signature · 1 line
1.8.3.1
#12 lore raw
In reply to Paolo Bonzini
Quoted 20 lines · Paolo Bonzini
---
 tests/modules-test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/modules-test.c +1 -2
index 3aef0e5..a8118e9 100644
@@ -4,7 +4,7 @@
 static void test_modules_load(const void *data)
 {
     QTestState *qts;
-    const char **args = data;
+    const char **args = (const char **)data;
 
     qts = qtest_init(NULL);
     qtest_module_load(qts, args[0], args[1]);
--
Quoted 1 line

1.8.3.1

Applied to master as a build fix, thanks.

-- PMM