cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

Blame SOURCES/kvm-tests-vmstate-static-checker-add-substructure-for-us.patch

958e1b
From a2686d53c032a75e66f3be389671c9f07359c53d Mon Sep 17 00:00:00 2001
958e1b
From: Amit Shah <amit.shah@redhat.com>
958e1b
Date: Fri, 11 Jul 2014 10:09:14 -0500
958e1b
Subject: [CHANGE 18/29] tests: vmstate static checker: add substructure for
958e1b
 usb-kbd for hid section
958e1b
To: rhvirt-patches@redhat.com,
958e1b
    jen@redhat.com
958e1b
958e1b
RH-Author: Amit Shah <amit.shah@redhat.com>
958e1b
Message-id: <d3eac003786fcaf7cb878ad5e750aabe9cf8d99f.1405072585.git.amit.shah@redhat.com>
958e1b
Patchwork-id: 59798
958e1b
O-Subject: [RHEL7.1 qemu-kvm PATCH 17/18] tests: vmstate static checker: add substructure for usb-kbd for hid section
958e1b
Bugzilla: 1118707
958e1b
RH-Acked-by: Juan Quintela <quintela@redhat.com>
958e1b
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
958e1b
RH-Acked-by: Dr. David Alan Gilbert (git) <dgilbert@redhat.com>
958e1b
958e1b
This shows how the script deals with substructures added to vmstate
958e1b
descriptions that don't change the on-wire format.
958e1b
958e1b
Signed-off-by: Amit Shah <amit.shah@redhat.com>
958e1b
Reviewed-by: Juan Quintela <quintela@redhat.com>
958e1b
Signed-off-by: Juan Quintela <quintela@redhat.com>
958e1b
(cherry picked from commit af3713f6b9eaef52ae0eef2f95c5df1987e8f0a4)
958e1b
Signed-off-by: Amit Shah <amit.shah@redhat.com>
958e1b
Signed-off-by: jen <jen@redhat.com>
958e1b
---
958e1b
 tests/vmstate-static-checker-data/dump2.json | 115 +++++++++++++++------------
958e1b
 1 file changed, 64 insertions(+), 51 deletions(-)
958e1b
958e1b
diff --git a/tests/vmstate-static-checker-data/dump2.json b/tests/vmstate-static-checker-data/dump2.json
958e1b
index b5cb1aa..45cccaf 100644
958e1b
--- a/tests/vmstate-static-checker-data/dump2.json
958e1b
+++ b/tests/vmstate-static-checker-data/dump2.json
958e1b
@@ -844,7 +844,7 @@
958e1b
           "field": "dev",
958e1b
           "version_id": 0,
958e1b
           "field_exists": false,
958e1b
-          "size": 4352,
958e1b
+          "size": 5832,
958e1b
           "Description": {
958e1b
             "name": "USBDevice",
958e1b
             "version_id": 1,
958e1b
@@ -896,58 +896,71 @@
958e1b
           }
958e1b
         },
958e1b
         {
958e1b
-          "field": "kbd.keycodes",
958e1b
+          "field": "hid",
958e1b
           "version_id": 0,
958e1b
           "field_exists": false,
958e1b
-          "size": 4
958e1b
-        },
958e1b
-        {
958e1b
-          "field": "head",
958e1b
-          "version_id": 0,
958e1b
-          "field_exists": false,
958e1b
-          "size": 4
958e1b
-        },
958e1b
-        {
958e1b
-          "field": "n",
958e1b
-          "version_id": 0,
958e1b
-          "field_exists": false,
958e1b
-          "size": 4
958e1b
-        },
958e1b
-        {
958e1b
-          "field": "kbd.modifiers",
958e1b
-          "version_id": 0,
958e1b
-          "field_exists": false,
958e1b
-          "size": 2
958e1b
-        },
958e1b
-        {
958e1b
-          "field": "kbd.leds",
958e1b
-          "version_id": 0,
958e1b
-          "field_exists": false,
958e1b
-          "size": 1
958e1b
-        },
958e1b
-        {
958e1b
-          "field": "kbd.key",
958e1b
-          "version_id": 0,
958e1b
-          "field_exists": false,
958e1b
-          "size": 1
958e1b
-        },
958e1b
-        {
958e1b
-          "field": "kbd.keys",
958e1b
-          "version_id": 0,
958e1b
-          "field_exists": false,
958e1b
-          "size": 4
958e1b
-        },
958e1b
-        {
958e1b
-          "field": "protocol",
958e1b
-          "version_id": 0,
958e1b
-          "field_exists": false,
958e1b
-          "size": 4
958e1b
-        },
958e1b
-        {
958e1b
-          "field": "idle",
958e1b
-          "version_id": 0,
958e1b
-          "field_exists": false,
958e1b
-          "size": 1
958e1b
+          "size": 312,
958e1b
+          "Description": {
958e1b
+            "name": "HIDKeyboardDevice",
958e1b
+            "version_id": 1,
958e1b
+            "minimum_version_id": 1,
958e1b
+            "Fields": [
958e1b
+              {
958e1b
+                "field": "kbd.keycodes",
958e1b
+                "version_id": 0,
958e1b
+                "field_exists": false,
958e1b
+                "size": 4
958e1b
+              },
958e1b
+              {
958e1b
+                "field": "head",
958e1b
+                "version_id": 0,
958e1b
+                "field_exists": false,
958e1b
+                "size": 4
958e1b
+              },
958e1b
+              {
958e1b
+                "field": "n",
958e1b
+                "version_id": 0,
958e1b
+                "field_exists": false,
958e1b
+                "size": 4
958e1b
+              },
958e1b
+              {
958e1b
+                "field": "kbd.modifiers",
958e1b
+                "version_id": 0,
958e1b
+                "field_exists": false,
958e1b
+                "size": 2
958e1b
+              },
958e1b
+              {
958e1b
+                "field": "kbd.leds",
958e1b
+                "version_id": 0,
958e1b
+                "field_exists": false,
958e1b
+                "size": 1
958e1b
+              },
958e1b
+              {
958e1b
+                "field": "kbd.key",
958e1b
+                "version_id": 0,
958e1b
+                "field_exists": false,
958e1b
+                "size": 1
958e1b
+              },
958e1b
+              {
958e1b
+                "field": "kbd.keys",
958e1b
+                "version_id": 0,
958e1b
+                "field_exists": false,
958e1b
+                "size": 4
958e1b
+              },
958e1b
+              {
958e1b
+                "field": "protocol",
958e1b
+                "version_id": 0,
958e1b
+                "field_exists": false,
958e1b
+                "size": 4
958e1b
+              },
958e1b
+              {
958e1b
+                "field": "idle",
958e1b
+                "version_id": 0,
958e1b
+                "field_exists": false,
958e1b
+                "size": 1
958e1b
+              }
958e1b
+            ]
958e1b
+          }
958e1b
         }
958e1b
       ]
958e1b
     }
958e1b
-- 
958e1b
1.9.3
958e1b