1. 30 4月, 2008 1 次提交
  2. 28 4月, 2008 3 次提交
  3. 26 4月, 2008 2 次提交
  4. 18 4月, 2008 2 次提交
  5. 11 4月, 2008 2 次提交
  6. 08 4月, 2008 1 次提交
    • J
      Don't fail to read a file because it's non-seekable (e.g., a pipe). · 3ce465f8
      Jim Meyering 提交于
      * src/util.c (fread_file_lim): New function.
      (__virFileReadAll): Use fread_file_lim, rather than requiring
      that stat.st_size provide a usable file size.
      * tests/read-non-seekable: New test, for the above.
      * tests/Makefile.am (test_scripts): Add read-non-seekable.
      * tests/test-lib.sh (mkfifo_or_skip_): New helper function.
      3ce465f8
  7. 07 4月, 2008 1 次提交
  8. 24 3月, 2008 2 次提交
    • J
      Add new testing framework and the first test to use it. · f15efcdf
      Jim Meyering 提交于
      * tests/Makefile.am (test_scripts): Add vcpupin.
      (EXTRA_DIST): Add test-lib.sh.
      * tests/test-lib.sh: Testing framework, from coreutils.
      * tests/vcpupin: New file.
      * build-aux/mktempd: New file, from gnulib.
      * bootstrap: Add posix-shell and mktempd to the list of imported modules.
      * gnulib/m4/posix-shell.m4: New file, from gnulib.
      f15efcdf
    • J
      Fix bugs in tests/Makefile.am. · 870dba07
      Jim Meyering 提交于
      * tests/Makefile.am (TESTS_ENVIRONMENT): Correct invalid
      settings of abs_top_builddir and abs_top_srcdir.
      Also prepend src/ to PATH, so we test the just-built virsh,
      not whatever happens to be in the original $PATH.
      870dba07
  9. 17 3月, 2008 1 次提交
  10. 29 2月, 2008 1 次提交
    • J
      Avoid link errors with "configure --disable-shared". · 9262d88e
      Jim Meyering 提交于
      * src/Makefile.am: Create a convenience library, libvirt_test.la,
      and don't restrict access to *its* symbols.
      * tests/Makefile.am (LDADDS): Add ../src/libvirt_test.la, so that
      "configure --disable-shared" no longer provokes link errors.
      (LIBVIRT): Remove definition.
      (LDADDS): Remove use.
      ($(LIBVIRT)): Remove rule.
      (LDADDS): Use the new convenience library instead.
      (CLEANFILES): Define.
      * docs/examples/index.py (dump_Makefile): Append $(COVERAGE_LDFLAGS),
      to the LDADDS definition, to avoid link error with the combination of
      --enable-test-coverage and --disable-shared.
      * docs/examples/Makefile.am: Regenerate.
      * docs/examples/index.html: Likewise.
      * qemud/Makefile.am (libvirtd_LDFLAGS): Append $(COVERAGE_LDFLAGS).
      * src/libvirt_sym.version: Remove some SP-before-TAB.
      9262d88e
  11. 27 2月, 2008 1 次提交
  12. 22 2月, 2008 1 次提交
  13. 20 2月, 2008 1 次提交
  14. 08 2月, 2008 1 次提交
    • J
      Remove more useless if tests before "free"-like functions. · e8ff93b4
      Jim Meyering 提交于
      * build-aux/useless-if-before-free: Rename from ...
      * build-aux/find-unnecessary-if-before-free: ... this.  Remove file.
      Also changed it so that new names are no longer hard-coded in the
      script.  Instead, they're supplied via options:
      * Makefile.cfg (useless_free_options): Define.
      Add xmlXPathFreeObject to the list of free-like functions it detects.
      * Makefile.maint (sc_avoid_if_before_free): Reflect script renaming.
      * .x-sc_avoid_if_before_free: Likewise.
      * src/openvz_conf.c (openvzParseXML): Remove useless "if"-before-free.
      * src/qemu_conf.c (qemudParseXML, qemudParseNetworkXML): Likewise.
      * src/virsh.c (cmdVNCDisplay, cmdTTYConsole, cmdDetachInterface):
      (cmdDetachDisk): Likewise.
      * src/xm_internal.c (xenXMConfigSetIntFromXPath): Likewise.
      (xenXMConfigSetStringFromXPath, xenXMParseXMLToConfig): Likewise.
      (xenXMDomainAttachDevice, xenXMAttachDisk, xenXMAttachInterface):
      (xenXMDomainDetachDevice): Likewise.
      * src/xml.c (virXPathString): Likewise.
      * tests/xmlrpctest.c (checkRequestValue): Likewise.
      e8ff93b4
  15. 06 2月, 2008 2 次提交
  16. 01 2月, 2008 1 次提交
  17. 31 1月, 2008 1 次提交
  18. 30 1月, 2008 5 次提交
    • J
      Arrange for "make syntax-check" to pass. · 51dd1d9e
      Jim Meyering 提交于
      * .x-sc_avoid_if_before_free: Exempt ChangeLog.
      * tests/statstest.c: Include <config.h>, not "config.h".
      51dd1d9e
    • D
      21416a47
    • J
      Also detect and remove unnecessary if-before-xmlXPathFreeContext. · 2367caa3
      Jim Meyering 提交于
      * build-aux/find-unnecessary-if-before-free: Update regexp.
      * src/openvz_conf.c: Remove unnecessary "if (P)"-before xmlXPathFreeContext.
      * src/qemu_conf.c: Likewise.
      * src/virsh.c: Likewise.
      * src/xm_internal.c: Likewise.
      * src/xml.c: Likewise.
      * tests/xmlrpctest.c: Likewise.
      2367caa3
    • J
      Enable the <config.h>-requiring test; fix violations · a3781881
      Jim Meyering 提交于
      Use <config.h>, not "config.h", per autoconf documentation.
      * Makefile.cfg (local-checks-to-skip) [sc_require_config_h]: Enable.
      * .x-sc_require_config_h: New file, to list exempted files.
      * Makefile.am (EXTRA_DIST): Add .x-sc_require_config_h.
      a3781881
    • J
      Given code like if (foo) free (foo); remove the useless "if (foo) " part. · acff2d11
      Jim Meyering 提交于
      Likewise, given if (foo != NULL) free (foo); remove the useless "if" test.
      
      * proxy/libvirt_proxy.c: Remove unnecessary "if" test before free.
      * python/generator.py: Likewise.
      * qemud/qemud.c: Likewise.
      * src/buf.c: Likewise.
      * src/conf.c: Likewise.
      * src/hash.c: Likewise.
      * src/iptables.c: Likewise.
      * src/libvirt.c: Likewise.
      * src/openvz_conf.c: Likewise.
      * src/qemu_conf.c: Likewise.
      * src/qemu_driver.c: Likewise.
      * src/remote_internal.c: Likewise.
      * src/test.c: Likewise.
      * src/virsh.c: Likewise.
      * src/virterror.c: Likewise.
      * src/xen_internal.c: Likewise.
      * src/xen_unified.c: Likewise.
      * src/xend_internal.c: Likewise.
      * src/xm_internal.c: Likewise.
      * src/xml.c: Likewise.
      * src/xmlrpc.c: Likewise.
      * src/xs_internal.c: Likewise.
      * tests/testutils.c: Likewise.
      * tests/xencapstest.c: Likewise.
      * tests/xmconfigtest.c: Likewise.
      acff2d11
  19. 22 1月, 2008 1 次提交
  20. 14 1月, 2008 1 次提交
    • J
      Clean up global name space in examples and tests. · f510a612
      Jim Meyering 提交于
      * docs/examples/suspend.c: Declare global "conn" to be static.
      * tests/qemuxml2argvtest.c: Declare global "driver" to be static.
      * tests/qemuxml2xmltest.c: Likewise.
      
      
      Author: Jim Meyering <meyering@redhat.com>
      f510a612
  21. 07 1月, 2008 1 次提交
  22. 12 12月, 2007 3 次提交
    • J
      Accommodate automake-1.9. · 9e188e11
      Jim Meyering 提交于
      * tests/Makefile.am (TESTS_ENVIRONMENT): Adjust PATH setting
      to work also with automake-1.9.  Can't use $(abs_top_builddir).
      
      
      Author: Jim Meyering <meyering@redhat.com>
      9e188e11
    • J
      Use a variable name as sizeof argument, not a type name. · 49230350
      Jim Meyering 提交于
      Given code like: T *var = calloc (n, sizeof (T));
      Convert to this: T *var = calloc (n, sizeof (*var));
      This first-cut change adjusts all malloc, calloc, and
      realloc statements.
      
      The only binary differences are in remote_internal.c
      (due to the bug fix) and in xmlrpc.c (due to factorization).
      
      * python/libvir.c: As above.
      * qemud/event.c: Likewise.
      * qemud/mdns.c: Likewise.
      * qemud/qemud.c: Likewise.
      * qemud/remote.c: Likewise.
      * src/bridge.c: Likewise.
      * src/buf.c: Likewise.
      * src/conf.c: Likewise.
      * src/hash.c: Likewise.
      * src/iptables.c: Likewise.
      * src/openvz_conf.c: Likewise.
      * src/qemu_conf.c: Likewise.
      * src/qemu_driver.c: Likewise.
      * src/test.c: Likewise.
      * src/xen_internal.c: Likewise.
      * src/xen_unified.c: Likewise.
      * src/xm_internal.c: Likewise.
      * src/xml.c: Likewise.
      * tests/qemuxml2argvtest.c: Likewise.
      * src/xmlrpc.c (xmlRpcValuePtr): Likewise, and minor factorization.
      * src/remote_internal.c (remoteAuthMakeCredentials): Use the right
      type when allocating space for an array of cred _pointers_.
      49230350
    • J
      Test libvirtd's config-processing code. · 5a190594
      Jim Meyering 提交于
      And remove a minor diagnostic inconsistency.
      * tests/daemon-conf: New test.
      * tests/Makefile.am (TESTS_ENVIRONMENT): Prepend qemud/ to PATH,
      so we can invoke libvirtd without an absolute name.
      (test_scripts): Add daemon-conf.
      * qemud/qemud.c (remoteConfigGetAuth): Use checkType,
      rather than open-coding it with a different diagnostic.
      5a190594
  23. 07 12月, 2007 2 次提交
  24. 06 12月, 2007 3 次提交
    • J
      Include "config.h". · 87396257
      Jim Meyering 提交于
      * qemud/event.c: Likewise.
      * src/buf.c: Likewise.
      * src/hash.c: Likewise.
      * src/nodeinfo.c: Likewise.
      * src/openvz_conf.c: Likewise.
      * src/proxy_internal.c: Likewise.
      * src/virterror.c: Likewise.
      * src/xmlrpc.c: Likewise.
      * src/xs_internal.c: Likewise.
      * tests/conftest.c: Likewise.
      * tests/xmlrpctest.c: Likewise.
      This fixes a mingw build failure reported by Rich Jones.
      
      Author: Jim Meyering <meyering@redhat.com>
      87396257
    • J
      Use gnulib, starting with its physmem and getaddrinfo modules. · 261e7581
      Jim Meyering 提交于
      New files go into these directories:
        gnulib/lib
        gnulib/m4
        gnulib/tests
      
      * bootstrap: A wrapper around gnulib-tool.
      * configure.in: Invoke gl_EARLY and gl_INIT, being careful to put gl_EARLY
      before any macro that uses AC_COMPILE_IFELSE.
      (AC_OUTPUT): Add lib/Makefile and gl-tests/Makefile.  Remove m4/Makefile.
      * Makefile.am (SUBDIRS): Add gnulib/lib and remove m4.  Add gnulib/tests
      early enough that those tests run before any libvirt unit tests.
      * m4/Makefile.am: Remove file.  Not needed.
      * src/Makefile.am (INCLUDES): Add -I$(top_srcdir)/gnulib/lib -I../gnulib/lib.
      (LDADDS, libvirt_la_LIBADD): Add ../gnulib/lib/libgnu.la.
      * src/nodeinfo.c: Include "physmem.h".
      * qemud/qemud.c, src/remote_internal.c: Include "getaddrinfo.h".
      (MEMINFO_PATH, linuxNodeInfoMemPopulate): Remove definitions.
      (virNodeInfoPopulate): Use physmem_total, not linuxNodeInfoMemPopulate.
      * tests/Makefile.am (INCLUDES): Add -I$(top_srcdir)/gnulib/lib -I../gnulib/lib.
      (LDADDS): Add ../gnulib/lib/libgnu.la.
      * qemud/Makefile.am (libvirtd_LDADD): Add ../gnulib/lib/libgnu.la.
      * tests/nodeinfotest.c (linuxTestCompareFiles): No longer read total
      memory from a file.
      Update expected output not to include "Memory: NNNN"
      * tests/nodeinfodata/linux-nodeinfo-1.txt:
      * tests/nodeinfodata/linux-nodeinfo-2.txt:
      * tests/nodeinfodata/linux-nodeinfo-3.txt:
      * tests/nodeinfodata/linux-nodeinfo-4.txt:
      * tests/nodeinfodata/linux-nodeinfo-5.txt:
      * tests/nodeinfodata/linux-nodeinfo-6.txt:
      * src/test.c [WITH_TEST]: Remove definition of _GNU_SOURCE that
      would conflict with the one now in "config.h".
      * autogen.sh: Add -I gnulib/m4.
      * src/conf.c, src/sexpr.c: Don't define _GNU_SOURCE.
      Instead, include "config.h".
      * qemud/qemud.c: Remove definition of _GNU_SOURCE.
      * src/openvz_driver.c: Likewise.
      * src/qemu_driver.c: Likewise.
      * src/remote_internal.c: Likewise.
      
      * configure.in: Use AC_CONFIG_AUX_DIR(build-aux), so that a bunch
      of gettextize-generated files go into build-aux/, rather than in
      the top-level directory.
      * .cvsignore: Adjust.
      * build-aux/.cvsignore: New file.
      
      
      Author: Jim Meyering <meyering@redhat.com>
      261e7581
    • R
      Wed Dec 5 18:00:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com> · ffdbb903
      Richard W.M. Jones 提交于
              * src/Makefile.am, tests/Makefile.am: Remove LIBOBJS/LTLIBOBJS
                which were incorrectly committed earlier.
      ffdbb903