1. 20 9月, 2018 2 次提交
  2. 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
  3. 20 5月, 2016 1 次提交
  4. 14 5月, 2016 2 次提交
    • M
      virmock.h: Introduce VIR_MOCK_CALL_STAT · 86d1705a
      Michal Privoznik 提交于
      There is some magic going on when it comes to stat() or lstat().
      Basically, stat() can either be a regular function, an inline
      function that calls __xstat(_STAT_VER, ...) or a macro that does
      the same as the inline func. Don't ask why is that, just read the
      documentation in sys/stat.h and make sure you have a bucket next
      to you. Anyway, currently there will not be both stat and __xstat
      symbols at the same time, as one of them gets overwritten to the
      other one during compilation. But this is not true anymore once
      we start chaining our mocking libraries. Therefore we need a
      wrapper that calls desired function from glibc.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      86d1705a
    • M
      virpcimock: Adapt to virmock.h · 57c484db
      Michal Privoznik 提交于
      Instead of introducing our own wrapper for dlsym()
      we can use the one provided by virmock.h.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      57c484db
  5. 27 11月, 2014 1 次提交
  6. 12 9月, 2014 1 次提交
  7. 25 4月, 2014 1 次提交
  8. 08 4月, 2014 1 次提交
    • D
      Introduce a new set of helper macros for mocking symbols · 442ba493
      Daniel P. Berrange 提交于
      Introduce virmock.h which provides some macros to assist in
      creation of LD_PRELOAD overrides. When these are used, the
      LD_PRELOAD code simply has some stubs which forward to a
      wrapper function inside the main test case. This means that
      logic for the test no longer has to be split between the
      virXXXtest.c and virXXXmock.c files. It will also make it
      possible to provide some common reusable modules for mocking
      code like DBus.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      442ba493