Skip to contentSkip to conversation

: QMP/Monitor stable branch fixes

PATCH In review Luiz Capitulino 2 participants 7 messages Sep 16, 2011

lore
Share & tools
lore
#0 lore raw

cover : QMP/Monitor stable branch fixes

Hi Justin,

Here goes some fixes already applied to master that are also needed in -stable.

Thanks.

Jamie Iles (1):
monitor: fix build breakage for !CONFIG_VNC

Jan Kiszka (1):
Fix qjson test of solidus encoding

Luiz Capitulino (1):
configure: Copy test data to build directory

TeLeMan (1):
monitor: fix build breakage with --disable-vnc

 check-qjson.c |    3 ++-
 configure     |    2 +-
 monitor.c     |    4 +++-
 3 files changed, 6 insertions(+), 3 deletions(-)
#1 lore raw

PATCH 1/4 configure: Copy test data to build directory

The QDict unit-tests (check-qdict) will fail when ran on a different build directory. That's, it only works when ran on the source dir.

This happens because its data file (qdict-test-data.txt) is not copied to the build dir. Fix it.

(cherry picked from commit 70371cfbf1b5bac6471928f5e30356cb6f7d1187)

Conflicts:

configure

---
 configure |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
configure +1 -1
index 3d39d1b..c55be36 100755
@@ -3566,7 +3566,7 @@ DIRS="$DIRS roms/seabios roms/vgabios"
 DIRS="$DIRS fsdev ui"
 DIRS="$DIRS qapi"
 DIRS="$DIRS qga"
-FILES="Makefile tests/Makefile"
+FILES="Makefile tests/Makefile qdict-test-data.txt"
 FILES="$FILES tests/cris/Makefile tests/cris/.gdbinit"
 FILES="$FILES pc-bios/optionrom/Makefile pc-bios/keymaps"
 FILES="$FILES pc-bios/spapr-rtas/Makefile"
Signature · 1 line
1.7.7.rc0.72.g4b5ea
#2 lore raw

PATCH 2/4 Fix qjson test of solidus encoding

In reply to Luiz Capitulino

From: Jan Kiszka <[email protected]>

"\/" is supposed to be decoded as "/", but there is no need to encode "/" via escape. Fix the existing test and add a second one expressing this.

(cherry picked from commit 69faeee12aee8f54870dbea78d9d1e98e30bd773)
---
 check-qjson.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
check-qjson.c +2 -1
index 64fcdcb..36d4ac2 100644
@@ -33,7 +33,8 @@ START_TEST(escaped_string)
         { "\"\\n\"", "\n" },
         { "\"\\r\"", "\r" },
         { "\"\\t\"", "\t" },
-        { "\"\\/\"", "\\/" },
+        { "\"/\"", "/" },
+        { "\"\\/\"", "/", .skip = 1 },
         { "\"\\\\\"", "\\" },
         { "\"\\\"\"", "\"" },
         { "\"hello world \\\"embedded string\\\"\"",
Signature · 1 line
1.7.7.rc0.72.g4b5ea
#3 lore raw

PATCH 3/4 monitor: fix build breakage with --disable-vnc

In reply to Luiz Capitulino

From: TeLeMan <[email protected]>

The breakage was introduced by the commit 13661089810d3e59931f3e80d7cb541b99af7071

(cherry picked from commit c62f6d1d76aea587556c85b6b7b5c44167006264)
---
 monitor.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
monitor.c +2 -0
index 718935b..1b8ba2c 100644
@@ -1200,10 +1200,12 @@ static int add_graphics_client(Monitor *mon, const QDict *qdict, QObject **ret_d
         }
 	qerror_report(QERR_ADD_CLIENT_FAILED);
 	return -1;
+#ifdef CONFIG_VNC
     } else if (strcmp(protocol, "vnc") == 0) {
 	int fd = monitor_get_fd(mon, fdname);
 	vnc_display_add_client(NULL, fd, skipauth);
 	return 0;
+#endif
     } else if ((s = qemu_chr_find(protocol)) != NULL) {
 	int fd = monitor_get_fd(mon, fdname);
 	if (qemu_chr_add_client(s, fd) < 0) {
Signature · 1 line
1.7.7.rc0.72.g4b5ea
#4 lore raw

Re: [Qemu-devel] [STABLE 3/4] monitor: fix build breakage with --disable-vnc

Quoted 3 lines · Luiz Capitulino

From: TeLeMan <[email protected]>

The breakage was introduced by the commit 13661089810d3e59931f3e80d7cb541b99af7071

This patch, as well as the next "monitor: fix build breakage for ! CONFIG_VNC" are already in stable, and have been for a few weeks.

Justin

#5 lore raw

Re: [Qemu-devel] [STABLE 3/4] monitor: fix build breakage with --disable-vnc

Quoted 7 lines · On Fri, 16 Sep 2011 12:40:40 -0500 "Justin M. Forbes" <[email protected]>…
Quoted 3 lines · Luiz Capitulino

From: TeLeMan <[email protected]>

The breakage was introduced by the commit 13661089810d3e59931f3e80d7cb541b99af7071

This patch, as well as the next "monitor: fix build breakage for ! CONFIG_VNC" are already in stable, and have been for a few weeks.

Ah, ok. Someone has submitted them to the list and I thought they weren't applied...

#6 lore raw

PATCH 4/4 monitor: fix build breakage for !CONFIG_VNC

In reply to Luiz Capitulino

From: Jamie Iles <[email protected]>

Commit c62f6d1 (monitor: fix build breakage with --disable-vnc) conditionalised some VNC setup code but left an unused variable. Move the variable into the conditional code to fix the build breakage.

Cc Luiz Capitulino <[email protected]>
Cc Markus Armbruster <[email protected]>
(cherry picked from commit 860341f60582959698d2e1d839a5b7a004a2d76f)
---
 monitor.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
monitor.c +1 -1
index 1b8ba2c..fee572c 100644
@@ -1189,7 +1189,6 @@ static int add_graphics_client(Monitor *mon, const QDict *qdict, QObject **ret_d
 {
     const char *protocol  = qdict_get_str(qdict, "protocol");
     const char *fdname = qdict_get_str(qdict, "fdname");
-    int skipauth = qdict_get_try_bool(qdict, "skipauth", 0);
     CharDriverState *s;
 
     if (strcmp(protocol, "spice") == 0) {
@@ -1203,6 +1202,7 @@ static int add_graphics_client(Monitor *mon, const QDict *qdict, QObject **ret_d
 #ifdef CONFIG_VNC
     } else if (strcmp(protocol, "vnc") == 0) {
 	int fd = monitor_get_fd(mon, fdname);
+        int skipauth = qdict_get_try_bool(qdict, "skipauth", 0);
 	vnc_display_add_client(NULL, fd, skipauth);
 	return 0;
 #endif
Signature · 1 line
1.7.7.rc0.72.g4b5ea