)]}'
{
  "commit": "1976708321f21ed51d0a374db6b28a6cd1bd5d66",
  "tree": "f4efb5465024870b169fcab8a53582d2f706630c",
  "parents": [
    "2ea1793bd90f04c34fbb75a1b84d71cb5b1f9c08"
  ],
  "author": {
    "name": "Eric Blake",
    "email": "eblake@redhat.com",
    "time": "Mon Oct 26 16:34:40 2015 -0600"
  },
  "committer": {
    "name": "Markus Armbruster",
    "email": "armbru@redhat.com",
    "time": "Mon Nov 02 08:30:25 2015 +0100"
  },
  "message": "tests/qapi-schema: Test for reserved names, empty struct\n\nAdd some testsuite coverage to ensure future patches are on\nthe right track:\n\nOur current C representation of qapi arrays is done by appending\n\u0027List\u0027 to the element name; but we are not preventing the\ncreation of an object type with the same name.  Add\nreserved-type-list.json to test this.  Then rename\nenum-union-clash.json to reserved-type-kind.json to cover the\nreservation that we DO detect, and shorten it to match the fact\nthat the name is reserved even if there is no clash.\n\nWe are failing to detect a collision between a dictionary member\nand the implicit \u0027has_*\u0027 flag for another optional member. The\neasiest fix would be for a future patch to reserve the entire\n\"has[-_]\" namespace for member names (the collision is also\npossible for branch names within flat unions, but only as long as\nbranch names can collide with (non-variant) members; however,\nsince future patches are about to remove that, it is not worth\ntesting here). Add reserved-member-has.json to test this.\n\nA similar collision exists between a dictionary member where\nc_name() munges what might otherwise be a reserved name to start\nwith \u0027q_\u0027, and another member explicitly starts with \"q[-_]\".\nAgain, the easiest solution for a future patch will be reserving\nthe entire namespace, but here for commands as well as members.\nAdd reserved-member-q.json and reserved-command-q.json to test\nthis; separate tests since arguably our munging of command \u0027unix\u0027\nto \u0027qmp_q_unix()\u0027 could be done without a q_, which is different\nthan the munging of a member \u0027unix\u0027 to \u0027foo.q_unix\u0027.\n\nFinally, our testsuite does not have any compilation coverage\nof struct inheritance with empty qapi structs.  Update\nqapi-schema-test.json to test this.\n\nNote that there is currently no technical reason to forbid type\nname patterns from member names, or member name patterns from\ntypes, since the two are not in the same namespace in C and\nwon\u0027t collide; but it\u0027s not worth adding positive tests of these\ncorner cases at this time, especially while there is other churn\npending in patches that rearrange which collisions actually\nhappen.\n\nSigned-off-by: Eric Blake \u003ceblake@redhat.com\u003e\nMessage-Id: \u003c1445898903-12082-2-git-send-email-eblake@redhat.com\u003e\n[Commit message tweaked slightly]\nSigned-off-by: Markus Armbruster \u003carmbru@redhat.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "0739bfe1bf868094c548d12668806e130ebfa5d0",
      "old_mode": 33188,
      "old_path": "tests/Makefile",
      "new_id": "652294cccd67bb2997b7131656e78578dae7ea25",
      "new_mode": 33188,
      "new_path": "tests/Makefile"
    },
    {
      "type": "delete",
      "old_id": "c04e1a8064b433d3fdc9604eb8da2b5b8a7488a1",
      "old_mode": 33188,
      "old_path": "tests/qapi-schema/enum-union-clash.err",
      "new_id": "0000000000000000000000000000000000000000",
      "new_mode": 0,
      "new_path": "/dev/null"
    },
    {
      "type": "modify",
      "old_id": "4e2d7c20630f6a76f3568672ecbab25a1d9b7c2d",
      "old_mode": 33188,
      "old_path": "tests/qapi-schema/qapi-schema-test.json",
      "new_id": "48e104ba13543b64d91b448df2f3b6e95ea504fc",
      "new_mode": 33188,
      "new_path": "tests/qapi-schema/qapi-schema-test.json"
    },
    {
      "type": "modify",
      "old_id": "a6c80e04d7a6a4121536585d39ae2ef18b7cf00b",
      "old_mode": 33188,
      "old_path": "tests/qapi-schema/qapi-schema-test.out",
      "new_id": "a7e9aabec013c3e4fd7bf086b7ac3091cd178e0f",
      "new_mode": 33188,
      "new_path": "tests/qapi-schema/qapi-schema-test.out"
    },
    {
      "type": "copy",
      "old_id": "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
      "old_mode": 33188,
      "old_path": "tests/qapi-schema/enum-union-clash.out",
      "new_id": "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
      "new_mode": 33188,
      "new_path": "tests/qapi-schema/reserved-command-q.err",
      "score": 100
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "573541ac9702dd3969c9bc859d2b91ec1f7e6e56",
      "new_mode": 33188,
      "new_path": "tests/qapi-schema/reserved-command-q.exit"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "be9944c68af7097a42b67fa9ffebae6d6eaa788c",
      "new_mode": 33188,
      "new_path": "tests/qapi-schema/reserved-command-q.json"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "b31b38ff0d1c501d6624a41a7ed5df4789b1ff3d",
      "new_mode": 33188,
      "new_path": "tests/qapi-schema/reserved-command-q.out"
    },
    {
      "type": "copy",
      "old_id": "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
      "old_mode": 33188,
      "old_path": "tests/qapi-schema/enum-union-clash.out",
      "new_id": "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
      "new_mode": 33188,
      "new_path": "tests/qapi-schema/reserved-member-has.err",
      "score": 100
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "573541ac9702dd3969c9bc859d2b91ec1f7e6e56",
      "new_mode": 33188,
      "new_path": "tests/qapi-schema/reserved-member-has.exit"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "a2197de6b51fe789f0945d71c1e84375308dcdd1",
      "new_mode": 33188,
      "new_path": "tests/qapi-schema/reserved-member-has.json"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "5a18b6be8c313148ca348abd507894c6e8dc6255",
      "new_mode": 33188,
      "new_path": "tests/qapi-schema/reserved-member-has.out"
    },
    {
      "type": "copy",
      "old_id": "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
      "old_mode": 33188,
      "old_path": "tests/qapi-schema/enum-union-clash.out",
      "new_id": "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
      "new_mode": 33188,
      "new_path": "tests/qapi-schema/reserved-member-q.err",
      "score": 100
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "573541ac9702dd3969c9bc859d2b91ec1f7e6e56",
      "new_mode": 33188,
      "new_path": "tests/qapi-schema/reserved-member-q.exit"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "1602ed3281f1a7b02e53a0bb9c34383dabb5efca",
      "new_mode": 33188,
      "new_path": "tests/qapi-schema/reserved-member-q.json"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "0d8685aeb00ca2e6152de548590e168601a1e10e",
      "new_mode": 33188,
      "new_path": "tests/qapi-schema/reserved-member-q.out"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "0a38efaad8d8df6331a8d9431c5613bd18986068",
      "new_mode": 33188,
      "new_path": "tests/qapi-schema/reserved-type-kind.err"
    },
    {
      "type": "rename",
      "old_id": "d00491fd7e5bb6fa28c517a0bb32b8b506539d4d",
      "old_mode": 33188,
      "old_path": "tests/qapi-schema/enum-union-clash.exit",
      "new_id": "d00491fd7e5bb6fa28c517a0bb32b8b506539d4d",
      "new_mode": 33188,
      "new_path": "tests/qapi-schema/reserved-type-kind.exit",
      "score": 100
    },
    {
      "type": "rename",
      "old_id": "593282b6cff69dc02e4c923af52fc8aa3325daa8",
      "old_mode": 33188,
      "old_path": "tests/qapi-schema/enum-union-clash.json",
      "new_id": "9ecaba12bc1bad7a30916a614451190a01ae8c9e",
      "new_mode": 33188,
      "new_path": "tests/qapi-schema/reserved-type-kind.json",
      "score": 69
    },
    {
      "type": "rename",
      "old_id": "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
      "old_mode": 33188,
      "old_path": "tests/qapi-schema/enum-union-clash.out",
      "new_id": "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
      "new_mode": 33188,
      "new_path": "tests/qapi-schema/reserved-type-kind.out",
      "score": 100
    },
    {
      "type": "copy",
      "old_id": "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
      "old_mode": 33188,
      "old_path": "tests/qapi-schema/enum-union-clash.out",
      "new_id": "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
      "new_mode": 33188,
      "new_path": "tests/qapi-schema/reserved-type-list.err",
      "score": 100
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "573541ac9702dd3969c9bc859d2b91ec1f7e6e56",
      "new_mode": 33188,
      "new_path": "tests/qapi-schema/reserved-type-list.exit"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "5b7d0f995f456f821f124d5ce6f628b62aae470c",
      "new_mode": 33188,
      "new_path": "tests/qapi-schema/reserved-type-list.json"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "0406bfe3198b4a691e639dbbd6517250c444be64",
      "new_mode": 33188,
      "new_path": "tests/qapi-schema/reserved-type-list.out"
    }
  ]
}
