[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL for-2.0-rc0 13/31] qdev-monitor-test: Don't test huma

From: Andreas Färber
Subject: [Qemu-devel] [PULL for-2.0-rc0 13/31] qdev-monitor-test: Don't test human-readable error message
Date: Wed, 12 Mar 2014 22:09:45 +0100

From: Markus Armbruster <address@hidden>

Test the error class instead.  Expecting a specific message is
fragile.  In fact, it broke once already, in commit 75884af.  Restore
the test of error member "class" dropped there, and drop the test of
error member "desc".

There are no other tests of "desc" as far as I can tell.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Andreas Färber <address@hidden>
 tests/qdev-monitor-test.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/tests/qdev-monitor-test.c b/tests/qdev-monitor-test.c
index eefaab8..e20ffd6 100644
--- a/tests/qdev-monitor-test.c
+++ b/tests/qdev-monitor-test.c
@@ -32,9 +32,7 @@ static void test_device_add(void)
     error = qdict_get_qdict(response, "error");
-    g_assert_cmpstr(qdict_get_try_str(error, "desc"),
-                    ==,
-                    "Device needs media, but drive is empty");
+    g_assert_cmpstr(qdict_get_try_str(error, "class"), ==, "GenericError");
     /* Delete the drive */

reply via email to

[Prev in Thread] Current Thread [Next in Thread]