1. 10 4月, 2019 2 次提交
  2. 03 4月, 2019 1 次提交
  3. 07 3月, 2019 3 次提交
  4. 26 2月, 2019 1 次提交
  5. 08 2月, 2019 1 次提交
  6. 28 1月, 2019 1 次提交
  7. 19 12月, 2018 2 次提交
  8. 14 12月, 2018 2 次提交
  9. 20 9月, 2018 1 次提交
  10. 12 9月, 2018 1 次提交
  11. 14 7月, 2018 1 次提交
  12. 08 6月, 2018 1 次提交
  13. 07 6月, 2018 1 次提交
  14. 06 6月, 2018 1 次提交
  15. 07 5月, 2018 1 次提交
  16. 04 5月, 2018 1 次提交
  17. 04 1月, 2018 1 次提交
  18. 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
  19. 19 10月, 2017 1 次提交
    • E
      util: Introduce virFileWaitForExists · caf26412
      Erik Skultety 提交于
      Since we have a number of places where we workaround timing issues with
      devices, attributes (files in general) not being available at the time
      of processing them by calling usleep in a loop for a fixed number of
      tries, we could as well have a utility function that would do that.
      Therefore we won't have to duplicate this ugly workaround even more.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      caf26412
  20. 27 9月, 2017 1 次提交
    • J
      use virFileAllocate in virStorageFileResize · 5463d959
      Ján Tomko 提交于
      Introduce a new function virFileAllocate that will call the
      non-destructive variants of safezero, essentially reverting
      my commit 1390c268
          safezero: fall back to writing zeroes even when resizing
      back to the state as of commit 18f03166
          virstoragefile: Have virStorageFileResize use safezero
      
      This means that _ALLOCATE flag will no longer work on platforms
      without the allocate syscalls, but it will not overwrite data
      either.
      5463d959
  21. 13 7月, 2017 1 次提交
    • D
      Revert "Prevent more compiler optimization of mockable functions" · 407a281a
      Daniel P. Berrange 提交于
      This reverts commit e4b980c8.
      
      When a binary links against a .a archive (as opposed to a shared library),
      any symbols which are marked as 'weak' get silently dropped. As a result
      when the binary later runs, those 'weak' functions have an address of
      0x0 and thus crash when run.
      
      This happened with virtlogd and virtlockd because they don't link to
      libvirt.so, but instead just libvirt_util.a and libvirt_rpc.a. The
      virRandomBits symbols was weak and so left out of the virtlogd &
      virtlockd binaries, despite being required by virHashTable functions.
      
      Various other binaries like libvirt_lxc, libvirt_iohelper, etc also
      link directly to .a files instead of libvirt.so, so are potentially
      at risk of dropping symbols leading to a later runtime crash.
      
      This is normal linker behaviour because a weak symbol is not treated
      as undefined, so nothing forces it to be pulled in from the .a You
      have to force the linker to pull in weak symbols using -u$SYMNAME
      which is not a practical approach.
      
      This risk is silent bad linkage that affects runtime behaviour is
      not acceptable for a fix that was merely trying to fix the test
      suite. So stop using __weak__ again.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      407a281a
  22. 11 7月, 2017 1 次提交
    • D
      Prevent more compiler optimization of mockable functions · e4b980c8
      Daniel P. Berrange 提交于
      Currently all mockable functions are annotated with the 'noinline'
      attribute. This is insufficient to guarantee that a function can
      be reliably mocked with an LD_PRELOAD. The C language spec allows
      the compiler to assume there is only a single implementation of
      each function. It can thus do things like propagating constant
      return values into the caller at compile time, or creating
      multiple specialized copies of the function body each optimized
      for a different caller. To prevent these optimizations we must
      also set the 'noclone' and 'weak' attributes.
      
      This fixes the test suite when libvirt.so is built with CLang
      with optimization enabled.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      e4b980c8
  23. 18 5月, 2017 1 次提交
  24. 09 5月, 2017 1 次提交
  25. 19 4月, 2017 1 次提交
    • D
      annotate all mocked functions with noinline · 728cacc8
      Daniel P. Berrange 提交于
      CLang's optimizer is more aggressive at inlining functions than
      gcc and so will often inline functions that our tests want to
      mock-override. This causes the test to fail in bizarre ways.
      
      We don't want to disable inlining completely, but we must at
      least prevent inlining of mocked functions. Fortunately there
      is a 'noinline' attribute that lets us control this per function.
      
      A syntax check rule is added that parses tests/*mock.c to extract
      the list of functions that are mocked (restricted to names starting
      with 'vir' prefix). It then checks that src/*.h header file to
      ensure it has a 'ATTRIBUTE_NOINLINE' annotation. This should prevent
      use from bit-rotting in future.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      728cacc8
  26. 27 3月, 2017 1 次提交
  27. 16 3月, 2017 1 次提交
    • J
      util: Rename virFileWaitForDevices · 97e0d3c3
      John Ferlan 提交于
      The function is actually in virutil.c, but prototyped in virfile.h.
      This patch fixes that by renaming the function to virWaitForDevices,
      adding the prototype in virutil.h and libvirt_private.syms, and then
      changing the callers to use the new name.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      97e0d3c3
  28. 11 2月, 2017 1 次提交
    • E
      util: Introduce virFileComparePaths · 87589424
      Erik Skultety 提交于
      So rather than comparing 2 paths (strings) as they are, which can very
      easily lead to unnecessary errors (e.g. in storage driver) that the paths
      are not the same when in fact they'd be e.g. just symlinks to the same
      location, we should put our best effort into resolving any symlinks and
      canonicalizing the path and only then compare the 2 paths for equality.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      87589424
  29. 07 2月, 2017 1 次提交
  30. 12 1月, 2017 1 次提交
  31. 15 12月, 2016 2 次提交
  32. 06 12月, 2016 1 次提交
    • M
      util: Introduce virFileRewriteStr · b9b664c5
      Michal Privoznik 提交于
      There are couple of places where we have a string and want to
      save it to a file. Atomically. In all those places we use
      virFileRewrite() but also implement the very same callback which
      takes the string and write it into temp file. This makes no
      sense. Unify the callbacks and move them to one place.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      b9b664c5
  33. 01 12月, 2016 1 次提交
    • L
      util: new function virFileLength() · e026563f
      Laine Stump 提交于
      This new function just calls fstat() (if provided with a valid fd) or
      stat() (if fd is -1) and returns st_size (or -1 if there is an
      error). We may decide we want this function to be more complex, and
      handle things like block devices - this is a placeholder (that works)
      for any more complicated function.
      e026563f
  34. 24 6月, 2016 1 次提交