Skip to content
Snippets Groups Projects
  1. Apr 20, 2023
  2. Apr 04, 2023
    • Alex Bennée's avatar
      scripts/coverage: initial coverage comparison script · 899c3fc2
      Alex Bennée authored
      
      This is a very rough and ready first pass at comparing gcovr's json
      output between two different runs. At the moment it will give you a
      file level diff between two runs but hopefully it wont be too hard to
      extend to give better insight.
      
      After generating the coverage results you run with something like:
      
        ./scripts/coverage/compare_gcov_json.py \
          -a ./builds/gcov.config1/coverage.json \
          -b ./builds/gcov.config2/coverage.json
      
      My hope is we can use this to remove some redundancy from testing as
      well as evaluate if new tests are actually providing additional
      coverage or just burning our precious CI time.
      
      Signed-off-by: default avatarAlex Bennée <alex.bennee@linaro.org>
      Cc: Kautuk Consul <kconsul@linux.vnet.ibm.com>
      Acked-by: default avatarThomas Huth <thuth@redhat.com>
      Message-Id: <20230403134920.2132362-2-alex.bennee@linaro.org>
      899c3fc2
  3. Mar 22, 2023
  4. Mar 10, 2023
  5. Mar 07, 2023
  6. Mar 05, 2023
  7. Feb 27, 2023
  8. Feb 23, 2023
    • John Snow's avatar
      qapi: remove JSON value FIXME · c7b7a7de
      John Snow authored
      
      With the two major JSON-ish type hierarchies clarified for distinct
      purposes; QAPIExpression for parsed expressions and JSONValue for
      introspection data, remove this FIXME as no longer an action item.
      
      A third JSON-y data type, _ExprValue, is not meant to represent JSON in
      the abstract but rather only the possible legal return values from a
      single function, get_expr(). It isn't appropriate to attempt to merge it
      with either of the above two types.
      
      In theory, it may be possible to define a completely agnostic
      one-size-fits-all JSON type hierarchy that any other user could borrow -
      in practice, it's tough to wrangle the differences between invariant,
      covariant and contravariant types: input and output parameters demand
      different properties of such a structure.
      
      However, QAPIExpression serves to authoritatively type user input to the
      QAPI parser, while JSONValue serves to authoritatively type qapi
      generator *output* to be served back to client users at runtime via
      QMP. The AST for these two types are different and cannot be wholly
      merged into a unified syntax.
      
      They could, in theory, share some JSON primitive definitions. In
      practice, this is currently more trouble than it's worth with mypy's
      current expressive power. As such, declare this "done enough for now".
      
      Signed-off-by: default avatarJohn Snow <jsnow@redhat.com>
      Message-Id: <20230215000011.1725012-7-jsnow@redhat.com>
      Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
      c7b7a7de
    • John Snow's avatar
      qapi: remove _JSONObject · 67a81f9f
      John Snow authored
      
      We can remove this alias as it only has two usages now, and no longer
      pays for the confusion of "yet another type".
      
      Signed-off-by: default avatarJohn Snow <jsnow@redhat.com>
      Message-Id: <20230215000011.1725012-6-jsnow@redhat.com>
      Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
      67a81f9f
    • John Snow's avatar
      qapi/parser: add QAPIExpression type · 42011059
      John Snow authored
      
      This patch creates a new type, QAPIExpression, which represents a parsed
      expression complete with QAPIDoc and QAPISourceInfo.
      
      This patch turns parser.exprs into a list of QAPIExpression instead,
      and adjusts expr.py to match.
      
      This allows the types we specify in parser.py to be "remembered" all the
      way through expr.py and into schema.py. Several assertions around
      packing and unpacking this data can be removed as a result.
      
      It also corrects a harmless typing error.  Before the patch,
      check_exprs() allegedly takes a List[_JSONObject].  It actually takes
      a list of dicts of the form
      
          {'expr': E, 'info': I, 'doc': D}
      
      where E is of type _ExprValue, I is of type QAPISourceInfo, and D is
      of type QAPIDoc.  Key 'doc' is optional.  This is not a _JSONObject!
      Passes type checking anyway, because _JSONObject is Dict[str, object].
      
      Signed-off-by: default avatarJohn Snow <jsnow@redhat.com>
      Message-Id: <20230215000011.1725012-5-jsnow@redhat.com>
      Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
      [Commit message amended to point out the typing fix]
      42011059
    • John Snow's avatar
      qapi: Add minor typing workaround for 3.6 · c60caf80
      John Snow authored
      Pylint under 3.6 does not believe that Collection is subscriptable at
      runtime. It is, making this a Pylint
      bug. https://github.com/PyCQA/pylint/issues/2377
      
      
      
      They closed it as fixed, but that doesn't seem to be true as of Pylint
      2.13.9, the latest version you can install under Python 3.6. 2.13.9 was
      released 2022-05-13, about seven months after the bug was closed.
      
      The least-annoying fix here is to just use the concret type.
      
      Signed-off-by: default avatarJohn Snow <jsnow@redhat.com>
      Message-Id: <20230215000011.1725012-4-jsnow@redhat.com>
      [Dumbed down from Sequence[str] to List[str], commit message adjusted]
      Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
      c60caf80
    • John Snow's avatar
      qapi: update pylint configuration · 885ecdbe
      John Snow authored
      
      Newer versions of pylint disable the "no-self-use" message by
      default. Older versions don't, though. If we leave the suppressions in,
      pylint yelps about useless options. Just tell pylint to shush.
      
      Signed-off-by: default avatarJohn Snow <jsnow@redhat.com>
      Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20230215000011.1725012-3-jsnow@redhat.com>
      885ecdbe
    • John Snow's avatar
      qapi: Update flake8 config · 6f2ddcde
      John Snow authored
      
      New versions of flake8 don't like same-line comments. (It's a version
      newer than what fc37 ships, but it still makes my life easier to fix it
      now.)
      
      Signed-off-by: default avatarJohn Snow <jsnow@redhat.com>
      Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20230215000011.1725012-2-jsnow@redhat.com>
      6f2ddcde
  9. Feb 17, 2023
  10. Feb 16, 2023
  11. Feb 14, 2023
  12. Feb 11, 2023
  13. Feb 10, 2023
    • Paolo Bonzini's avatar
      build: make meson-buildoptions.sh stable · 808d15b3
      Paolo Bonzini authored
      
      The library directory can change depending on the multilib setup of the host.
      It would be even better to detect it in configure with the same algorithm
      that Meson uses, but the important thing to avoid confusing developers is
      to have identical contents of scripts/meson-buildoptions.sh, independent
      of the distro and architecture on which it was created.
      
      So, for now just give a custom default value to libdir.
      
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      808d15b3
  14. Feb 08, 2023
  15. Feb 06, 2023
  16. Feb 02, 2023
  17. Feb 01, 2023
  18. Jan 20, 2023
    • Markus Armbruster's avatar
      include/block: Untangle inclusion loops · e2c1c34f
      Markus Armbruster authored
      
      We have two inclusion loops:
      
             block/block.h
          -> block/block-global-state.h
          -> block/block-common.h
          -> block/blockjob.h
          -> block/block.h
      
             block/block.h
          -> block/block-io.h
          -> block/block-common.h
          -> block/blockjob.h
          -> block/block.h
      
      I believe these go back to Emanuele's reorganization of the block API,
      merged a few months ago in commit d7e2fe4a.
      
      Fortunately, breaking them is merely a matter of deleting unnecessary
      includes from headers, and adding them back in places where they are
      now missing.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20221221133551.3967339-2-armbru@redhat.com>
      e2c1c34f
Loading