1. 23 8月, 2019 1 次提交
    • R
      tests: Add lib- prefix to all mocks · fde36108
      Roman Bolshakov 提交于
      In preparation libtool "-module" flag removal, add lib prefix to all
      mock shared objects.
      
      While at it, introduce VIR_TEST_MOCK macros that makes path out of mock
      name to be used with VIR_TEST_PRELOAD or VIR_TEST_MAIN_PRELOAD.  That,
      hopefully, improves readability, reduces line length and allows to
      tailor VIR_TEST_MOCK for specific platform if it has shared library
      suffix different from ".so".
      Signed-off-by: NRoman Bolshakov <r.bolshakov@yadro.com>
      fde36108
  2. 14 12月, 2018 2 次提交
    • D
      Enforce a standard header file guard symbol name · 568a4172
      Daniel P. Berrangé 提交于
      Require that all headers are guarded by a symbol named
      
        LIBVIRT_$FILENAME
      
      where $FILENAME is the uppercased filename, with all characters
      outside a-z changed into '_'.
      
      Note we do not use a leading __ because that is technically a
      namespace reserved for the toolchain.
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      568a4172
    • D
      Remove all Author(s): lines from source file headers · 60046283
      Daniel P. Berrangé 提交于
      In many files there are header comments that contain an Author:
      statement, supposedly reflecting who originally wrote the code.
      In a large collaborative project like libvirt, any non-trivial
      file will have been modified by a large number of different
      contributors. IOW, the Author: comments are quickly out of date,
      omitting people who have made significant contribitions.
      
      In some places Author: lines have been added despite the person
      merely being responsible for creating the file by moving existing
      code out of another file. IOW, the Author: lines give an incorrect
      record of authorship.
      
      With this all in mind, the comments are useless as a means to identify
      who to talk to about code in a particular file. Contributors will always
      be better off using 'git log' and 'git blame' if they need to  find the
      author of a particular bit of code.
      
      This commit thus deletes all Author: comments from the source and adds
      a rule to prevent them reappearing.
      
      The Copyright headers are similarly misleading and inaccurate, however,
      we cannot delete these as they have legal meaning, despite being largely
      inaccurate. In addition only the copyright holder is permitted to change
      their respective copyright statement.
      Reviewed-by: NErik Skultety <eskultet@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      60046283
  3. 15 11月, 2018 1 次提交
  4. 08 11月, 2018 1 次提交
  5. 05 10月, 2018 7 次提交
  6. 25 9月, 2018 5 次提交
  7. 20 9月, 2018 1 次提交
  8. 30 7月, 2018 1 次提交
  9. 27 7月, 2018 1 次提交
  10. 03 11月, 2017 1 次提交
    • A
      Remove backslash alignment attempts · 3e7db8d3
      Andrea Bolognani 提交于
      Right-aligning backslashes when defining macros or using complex
      commands in Makefiles looks cute, but as soon as any changes is
      required to the code you end up with either distractingly broken
      alignment or unnecessarily big diffs where most of the changes
      are just pushing all backslashes a few characters to one side.
      
      Generated using
      
        $ git grep -El '[[:blank:]][[:blank:]]\\$' | \
          grep -E '*\.([chx]|am|mk)$$' | \
          while read f; do \
            sed -Ei 's/[[:blank:]]*[[:blank:]]\\$/ \\/g' "$f"; \
          done
      Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
      3e7db8d3
  11. 10 8月, 2017 1 次提交
  12. 13 7月, 2017 1 次提交
    • J
      Avoid hidden cgroup mount points · dacd160d
      Juan Hernandez 提交于
      Currently the scan of the /proc/mounts file used to find cgroup mount
      points doesn't take into account that mount points may hidden by other
      mount points. For, example in certain Kubernetes environments the
      /proc/mounts contains the following lines:
      
        cgroup /sys/fs/cgroup/net_prio,net_cls cgroup ...
        tmpfs /sys/fs/cgroup tmpfs ...
        cgroup /sys/fs/cgroup/net_cls,net_prio cgroup ...
      
      In this particular environment the first mount point is hidden by the
      second one. The correct mount point is the third one, but libvirt will
      never process it because it only checks the first mount point for each
      controller (net_cls in this case). So libvirt will try to use the first
      mount point, which doesn't actually exist, and the complete detection
      process will fail.
      
      To avoid that issue this patch changes the virCgroupDetectMountsFromFile
      function so that when there are duplicates it takes the information from
      the last line in /proc/mounts. This requires removing the previous
      explicit condition to skip duplicates, and adding code to free the
      memory used by the processing of duplicated lines.
      
      Related-To: https://bugzilla.redhat.com/1468214
      Related-To: https://github.com/kubevirt/libvirt/issues/4Signed-off-by: NJuan Hernandez <jhernand@redhat.com>
      dacd160d
  13. 04 4月, 2017 1 次提交
  14. 10 6月, 2016 3 次提交
  15. 08 6月, 2016 2 次提交
  16. 08 2月, 2016 1 次提交
  17. 09 12月, 2015 1 次提交
  18. 21 10月, 2015 1 次提交
  19. 14 7月, 2015 1 次提交
  20. 24 4月, 2015 1 次提交
  21. 16 4月, 2015 1 次提交
    • E
      tests: fix build on old 32-bit platforms · 9289c858
      Eric Blake 提交于
      gcc 4.1.2 (hello RHEL 5) on 32-bit platforms complains:
      
      vircgrouptest.c: In function 'testCgroupGetPercpuStats':
      vircgrouptest.c:627: warning: integer constant is too large for 'long' type
      vircgrouptest.c:628: warning: this decimal constant is unsigned only in ISO C90
      vircgrouptest.c:634: warning: integer constant is too large for 'long' type
      vircgrouptest.c:635: warning: this decimal constant is unsigned only in ISO C90
      vircgrouptest.c:636: warning: this decimal constant is unsigned only in ISO C90
      vircgrouptest.c:644: warning: integer constant is too large for 'long' type
      
      * tests/vircgrouptest.c (testCgroupGetPercpuStats): Use ULL suffix.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      9289c858
  22. 08 4月, 2015 1 次提交
  23. 18 3月, 2015 1 次提交
  24. 26 1月, 2015 1 次提交
  25. 23 1月, 2015 2 次提交
    • J
      Fix build with older gcc · d66e136b
      Ján Tomko 提交于
      My commit af1c98e4 broke the build on RHEL-6:
      vircgrouptest.c: In function 'testCgroupGetPercpuStats':
      vircgrouptest.c:566: error: nested extern declaration of
      '_gl_verify_function2' [-Wnested-externs]
      
      The only thing that needs checking is that the array size
      is at least EXPECTED_NCPUS, to prevent access beyond the array.
      
      We can ensure the minimum size also by specifying the array
      size upfront.
      d66e136b
    • J
      Fix virCgroupGetPercpuStats with non-continuous present CPUs · af1c98e4
      Ján Tomko 提交于
      Per-cpu stats are only shown for present CPUs in the cgroups,
      but we were only parsing the largest CPU number from
      /sys/devices/system/cpu/present and looking for stats even for
      non-present CPUs.
      This resulted in:
      internal error: cpuacct parse error
      af1c98e4