cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
Blob Blame History Raw
From a2686d53c032a75e66f3be389671c9f07359c53d Mon Sep 17 00:00:00 2001
From: Amit Shah <amit.shah@redhat.com>
Date: Fri, 11 Jul 2014 10:09:14 -0500
Subject: [CHANGE 18/29] tests: vmstate static checker: add substructure for
 usb-kbd for hid section
To: rhvirt-patches@redhat.com,
    jen@redhat.com

RH-Author: Amit Shah <amit.shah@redhat.com>
Message-id: <d3eac003786fcaf7cb878ad5e750aabe9cf8d99f.1405072585.git.amit.shah@redhat.com>
Patchwork-id: 59798
O-Subject: [RHEL7.1 qemu-kvm PATCH 17/18] tests: vmstate static checker: add substructure for usb-kbd for hid section
Bugzilla: 1118707
RH-Acked-by: Juan Quintela <quintela@redhat.com>
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
RH-Acked-by: Dr. David Alan Gilbert (git) <dgilbert@redhat.com>

This shows how the script deals with substructures added to vmstate
descriptions that don't change the on-wire format.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
(cherry picked from commit af3713f6b9eaef52ae0eef2f95c5df1987e8f0a4)
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: jen <jen@redhat.com>
---
 tests/vmstate-static-checker-data/dump2.json | 115 +++++++++++++++------------
 1 file changed, 64 insertions(+), 51 deletions(-)

diff --git a/tests/vmstate-static-checker-data/dump2.json b/tests/vmstate-static-checker-data/dump2.json
index b5cb1aa..45cccaf 100644
--- a/tests/vmstate-static-checker-data/dump2.json
+++ b/tests/vmstate-static-checker-data/dump2.json
@@ -844,7 +844,7 @@
           "field": "dev",
           "version_id": 0,
           "field_exists": false,
-          "size": 4352,
+          "size": 5832,
           "Description": {
             "name": "USBDevice",
             "version_id": 1,
@@ -896,58 +896,71 @@
           }
         },
         {
-          "field": "kbd.keycodes",
+          "field": "hid",
           "version_id": 0,
           "field_exists": false,
-          "size": 4
-        },
-        {
-          "field": "head",
-          "version_id": 0,
-          "field_exists": false,
-          "size": 4
-        },
-        {
-          "field": "n",
-          "version_id": 0,
-          "field_exists": false,
-          "size": 4
-        },
-        {
-          "field": "kbd.modifiers",
-          "version_id": 0,
-          "field_exists": false,
-          "size": 2
-        },
-        {
-          "field": "kbd.leds",
-          "version_id": 0,
-          "field_exists": false,
-          "size": 1
-        },
-        {
-          "field": "kbd.key",
-          "version_id": 0,
-          "field_exists": false,
-          "size": 1
-        },
-        {
-          "field": "kbd.keys",
-          "version_id": 0,
-          "field_exists": false,
-          "size": 4
-        },
-        {
-          "field": "protocol",
-          "version_id": 0,
-          "field_exists": false,
-          "size": 4
-        },
-        {
-          "field": "idle",
-          "version_id": 0,
-          "field_exists": false,
-          "size": 1
+          "size": 312,
+          "Description": {
+            "name": "HIDKeyboardDevice",
+            "version_id": 1,
+            "minimum_version_id": 1,
+            "Fields": [
+              {
+                "field": "kbd.keycodes",
+                "version_id": 0,
+                "field_exists": false,
+                "size": 4
+              },
+              {
+                "field": "head",
+                "version_id": 0,
+                "field_exists": false,
+                "size": 4
+              },
+              {
+                "field": "n",
+                "version_id": 0,
+                "field_exists": false,
+                "size": 4
+              },
+              {
+                "field": "kbd.modifiers",
+                "version_id": 0,
+                "field_exists": false,
+                "size": 2
+              },
+              {
+                "field": "kbd.leds",
+                "version_id": 0,
+                "field_exists": false,
+                "size": 1
+              },
+              {
+                "field": "kbd.key",
+                "version_id": 0,
+                "field_exists": false,
+                "size": 1
+              },
+              {
+                "field": "kbd.keys",
+                "version_id": 0,
+                "field_exists": false,
+                "size": 4
+              },
+              {
+                "field": "protocol",
+                "version_id": 0,
+                "field_exists": false,
+                "size": 4
+              },
+              {
+                "field": "idle",
+                "version_id": 0,
+                "field_exists": false,
+                "size": 1
+              }
+            ]
+          }
         }
       ]
     }
-- 
1.9.3