1. 24 6月, 2016 2 次提交
  2. 23 6月, 2016 1 次提交
  3. 22 6月, 2016 1 次提交
    • J
      test-wrap-argv: add --check parameter · c9c03ea2
      Ján Tomko 提交于
      This script can already operate on a list of files.
      Add a --check parameter to check if multiple files are wrapped
      correctly with a single invocation of the script.
      c9c03ea2
  4. 16 6月, 2016 1 次提交
    • J
      syntax-check: drop prohibit_undesirable_word_seq · 3a9d1f37
      Ján Tomko 提交于
      This checks forbids using "can not" and checks the placement
      of some texinfo tags.
      
      Drop it since we do not use texinfo and the check takes almost
      twice as much as the rest of the checks.
      3a9d1f37
  5. 15 6月, 2016 2 次提交
    • J
      Rename bracket-spacing.pl to check-spacing.pl · 4e1a7dbb
      Ján Tomko 提交于
      We test whitespace with lots of other characters now.
      4e1a7dbb
    • J
      cfg.mk: use a single regex for all non-reentrant functions · e26098a1
      Ján Tomko 提交于
      The prohibit_nonreentrant syntax-check rule spawns a new shell
      for every non-reentrant function we know, to make it easier
      to mention the function name in the error message, with the _r
      appended.
      
      Since the line with the offending function is already printed
      and some of the functions on our list do not have a _r counterpart,
      compile them into one big regex and use a more generic error message
      to save time.
      e26098a1
  6. 10 6月, 2016 1 次提交
  7. 24 5月, 2016 1 次提交
    • P
      maint: fix syntax-check sc_prohibit_int_ijk exclude rule · a94efa50
      Pavel Hrdina 提交于
      Fix the regex for excluding files for this syntax-rule.  The rule "include/"
      will not work, because we are matching the whole line like this
      "^(...|include/|...)$ so we need to use "include/libvirt/libvirt.+".  The second
      issue is that we are using only one '$' but there should be two of those at the
      end.  The last small adjustment is to escape dots '.' so it match only dot.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      a94efa50
  8. 20 5月, 2016 1 次提交
    • M
      virtestmock: Mock stat() properly · 49c1a078
      Michal Privoznik 提交于
      There is a lot to explain, but I try to make it as short as
      possible. I'd start by pasting some parts of sys/stat.h:
      
      extern int stat (const char *__restrict __file,
      		 struct stat *__restrict __buf) __THROW __nonnull ((1, 2));
      
      extern int __REDIRECT_NTH (stat, (const char *__restrict __file,
      				  struct stat *__restrict __buf), stat64)
           __nonnull ((1, 2));
      
      __extern_inline int
      __NTH (stat (const char *__path, struct stat *__statbuf))
      {
        return __xstat (_STAT_VER, __path, __statbuf);
      }
      
      Only one of these is effective at once, due to some usage of
      the mess we are dealing with in here. So, basically, while
      compiling or linking stat() in our code can be transformed into
      some other func. Or a dragon.
      Now, if you read stat(2) manpage, esp. "C library/kernel
      differences" section, you'll learn that glibc uses some tricks
      for older applications to work. I haven't gotten around actual
      code that does this, but based on my observations, if 'stat'
      symbol is found, glibc assumes it's dealing with ancient
      application. Unfortunately, it can be just ours stat coming from
      our mock. Therefore, calling stat() from a test will end up in
      our mock. But since glibc is not exposing the symbol anymore, our
      call of real_stat() will SIGSEGV immediately as the pointer to
      function is NULL. Therefore, we should expose only those symbols
      we know glibc has.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      49c1a078
  9. 14 5月, 2016 1 次提交
  10. 25 4月, 2016 1 次提交
    • A
      syntax-check: Enforce <code> inside <dt> elements · 1f29f3da
      Andrea Bolognani 提交于
      Commit 61b070cf cleaned up a number of cases where the <dt>
      element was used to document symbols, but the symbol itself was
      not inside a <code> element.
      
      To make sure we don't end up having to clean up again a few
      months from now, introduce a syntax-check rule that can spot
      such mistakes.
      
      All existing exceptions are marked as such, with either file
      or line granularity depending on the case.
      1f29f3da
  11. 22 4月, 2016 2 次提交
    • C
      tests: rename test_conf -> virconftest · 4839822f
      Cole Robinson 提交于
      And confdata to virconfdata, since 'conf' can mean a few different
      things in libvirt
      4839822f
    • C
      virconf: Handle conf file without ending newline · 3cc2a9e0
      Cole Robinson 提交于
      $ echo -n 'log_level=1' > ~/.config/libvirt/libvirtd.conf
      $ libvirtd --timeout=10
      2014-10-10 10:30:56.394+0000: 6626: info : libvirt version: 1.1.3.6, package: 1.fc20 (Fedora Project, 2014-09-08-17:50:42, buildvm-05.phx2.fedoraproject.org)
      2014-10-10 10:30:56.394+0000: 6626: error : main:1261 : Can't load config file: configuration file syntax error: /home/rjones/.config/libvirt/libvirtd.conf:1: expecting a value: /home/rjones/.config/libvirt/libvirtd.conf
      
      Rather than try to fix this in the depths of the parser, just catch
      the case when a config file doesn't end in a newline, and manually
      append a newline to the content before parsing
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1151409
      3cc2a9e0
  12. 18 4月, 2016 1 次提交
  13. 15 4月, 2016 2 次提交
  14. 12 4月, 2016 2 次提交
  15. 29 3月, 2016 1 次提交
  16. 24 3月, 2016 1 次提交
  17. 19 3月, 2016 1 次提交
  18. 12 2月, 2016 1 次提交
  19. 11 2月, 2016 1 次提交
    • J
      Prohibit verbose strcat · 28e5655d
      Ján Tomko 提交于
      Using strcat directly is more readable than passing strlen
      of the copied string to strncat.
      28e5655d
  20. 03 2月, 2016 1 次提交
    • E
      cfg.mk: Adjust sc_prohibit_int_ijk to support 'exempt from syntax-check' · 1fe6d8bf
      Erik Skultety 提交于
      There might be cases, like with typed params, where triggering this check isn't
      desirable. But including the whole module in the exception regex is not always
      to right way of doing things. By adding an option to manually disable this check
      on a specific occurrence, the module itself will still be checked against the
      rule.
      1fe6d8bf
  21. 10 1月, 2016 1 次提交
  22. 30 11月, 2015 1 次提交
    • E
      libvirt: introduce libvirt/libvirt-common.h.in · a20b6237
      Erik Skultety 提交于
      As it turned out, we need to share some enums and declarations between
      libvirt.h and libvirt-admin.h, but since our policy forbids direct includes of
      libvirt*.h, there has to be some header exempt from this rule. This patch moves
      the relevant part of code from libvirt.h.in to libvirt-common.h.in. Moreover,
      since there is no need to have libvirt.h generated anymore, introduce a new
      header libvirt.h which was previosly ignored from git and make the common
      header ignored and generated instead.
      a20b6237
  23. 26 11月, 2015 2 次提交
    • D
      qemu: add support for sending QEMU stdout/stderr to virtlogd · 0d968ad7
      Daniel P. Berrange 提交于
      Currently the QEMU stdout/stderr streams are written directly to
      a regular file (eg /var/log/libvirt/qemu/$GUEST.log). While those
      can be rotated by logrotate (using copytruncate option) this is
      not very efficient. It also leaves open a window of opportunity
      for a compromised/broken QEMU to DOS the host filesystem by
      writing lots of text to stdout/stderr.
      
      This makes it possible to connect the stdout/stderr file handles
      to a pipe that is provided by virtlogd. The virtlogd daemon will
      read from this pipe and write data to the log file, performing
      file rotation whenever a pre-determined size limit is reached.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      0d968ad7
    • D
      Import stripped down virtlockd code as basis of virtlogd · 323a329b
      Daniel P. Berrange 提交于
      Copy the virtlockd codebase across to form the initial virlogd
      code. Simple search & replace of s/lock/log/ and gut the remote
      protocol & dispatcher. This gives us a daemon that starts up
      and listens for connections, but does nothing with them.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      323a329b
  24. 17 11月, 2015 1 次提交
  25. 09 11月, 2015 1 次提交
    • D
      tests: redo test argv file line wrapping · 8afd34f2
      Daniel P. Berrange 提交于
      Back in
      
        commit bd6c46fa
        Author: Juerg Haefliger <juerg.haefliger@hp.com>
        Date:   Mon Jan 31 06:42:57 2011 -0500
      
          tests: handle backspace-newline pairs in test input files
      
      all the test argv files were line wrapped so that the args
      were less than 80 characters.
      
      The way the line wrapping was done turns out to be quite
      undesirable, because it often leaves multiple parameters
      on the same line. If we later need to add or remove
      individual parameters, then it leaves us having to redo
      line wrapping.
      
      This commit changes the line wrapping so that every
      single "-param value" is one its own new line. If the
      "value" is still too long, then we break on ',' or ':'
      or ' ' as needed.
      
      This means that when we come to add / remove parameters
      from the test files line, the patch diffs will only
      ever show a single line added/removed which will greatly
      simplify review work.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      8afd34f2
  26. 21 10月, 2015 1 次提交
  27. 20 10月, 2015 1 次提交
  28. 14 8月, 2015 1 次提交
    • E
      tools: Introduce new client generic module vsh · 834c5720
      Erik Skultety 提交于
      In order to share as much virsh' logic as possible with upcomming
      virt-admin client we need to split virsh logic into virsh specific and
      client generic features.
      
      Since majority of virsh methods should be generic enough to be used by
      other clients, it's much easier to rename virsh specific data to virshX
      than doing this vice versa. It moved generic virsh commands (including info
      and opts structures) to generic module vsh.c.
      
      Besides renaming methods and structures, this patch also involves introduction
      of a client specific control structure being referenced as private data in the
      original control structure, introduction of a new global vsh Initializer,
      which currently doesn't do much, but there is a potential for added
      functionality in the future.
      Lastly it introduced client hooks which are especially necessary during
      client connecting phase.
      834c5720
  29. 16 6月, 2015 3 次提交
  30. 13 5月, 2015 1 次提交
    • M
      Fix build --without-network · 564dd537
      Martin Kletzander 提交于
      In order not to bring in any link dependencies, bridge driver doesn't
      use the usual stubs as other conditionally-built code does.  However,
      having the function as a macro imposes a problem with possibly unused
      variables if just defined as "0".  This was worked around by using
      (dom=dom, iface=iface, 0) which should act like a 0 if used in a
      condition.  However, gcc still bugs about that, so I came up with
      another way how to fix that.
      
      Using static inline functions in the header won't collide with anything,
      it fixes the bug and does one thing that the macro didn't do.  It checks
      whenther passed variables are pointers of compatible type.  It has only
      one downside, and that is that we need to either a) define it with
      ATTRIBUTE_UNUSED, which needs an exception in cfg.mk or b) do something
      like ignore_value(variable); in the function body.  I went with the
      first variant.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      564dd537
  31. 14 4月, 2015 1 次提交
  32. 01 4月, 2015 1 次提交