1. 05 4月, 2011 2 次提交
    • D
      Enable use of -Wold-style-definition compiler flag · a4e37ff1
      Daniel P. Berrange 提交于
      A couple of functions were declared using the old style foo()
      for no-parameters, instead of foo(void)
      
      * src/xen/xen_hypervisor.c, tests/testutils.c: Replace () with (void)
        in some function declarations
      * m4/virt-compile-warnings.m4: Enable -Wold-style-definition
      a4e37ff1
    • D
      Enable -Wmissing-format-attribute warning · 7d76d5d5
      Daniel P. Berrange 提交于
      Add a couple of missing ATTRIBUTE_FMT_PRINTF annotations
      
      * tools/virsh.c, tests/testutils.c: Add printf format attribute
      * m4/virt-compile-warnings.m4: Enable -Wmissing-format-attribute
      7d76d5d5
  2. 01 2月, 2011 1 次提交
    • J
      tests: handle backspace-newline pairs in test input files · bd6c46fa
      Juerg Haefliger 提交于
      This patch teaches testutil how to read multi-line input files with
      backspace-newline line continuation markers.
      
      The patch also breaks up all the single-line arguments test input files into
      multi-line files with lines shorter than 80 characters.
      bd6c46fa
  3. 24 11月, 2010 1 次提交
  4. 17 11月, 2010 1 次提交
    • S
      deprecate fclose() and introduce VIR_{FORCE_}FCLOSE() · 7b7cb1ec
      Stefan Berger 提交于
      Similarly to deprecating close(), I am now deprecating fclose() and
      introduce VIR_FORCE_FCLOSE() and VIR_FCLOSE(). Also, fdopen() is replaced with
      VIR_FDOPEN().
      
      Most of the files are opened in read-only mode, so usage of
      VIR_FORCE_CLOSE() seemed appropriate. Others that are opened in write
      mode already had the fclose()<  0 check and I converted those to
      VIR_FCLOSE()<  0.
      
      I did not find occurrences of possible double-closed files on the way.
      7b7cb1ec
  5. 10 11月, 2010 1 次提交
    • S
      bye to close(), welcome to VIR_(FORCE_)CLOSE() · 60ae1c34
      Stefan Berger 提交于
      Using automated replacement with sed and editing I have now replaced all
      occurrences of close() with VIR_(FORCE_)CLOSE() except for one, of
      course. Some replacements were straight forward, others I needed to pay
      attention. I hope I payed attention in all the right places... Please
      have a look. This should have at least solved one more double-close
      error.
      60ae1c34
  6. 14 10月, 2010 1 次提交
  7. 13 10月, 2010 1 次提交
    • D
      Improve error reporting in test suites · 80aa7660
      Daniel P. Berrange 提交于
      Before running each test case clear the thread local error
      indicator. After running each test case, dispatch any error
      that was reported
      
      * tests/testutils.c: Fix error reporting in test suites
      80aa7660
  8. 17 9月, 2010 1 次提交
    • E
      tests: silence qemuargv2xmltest noise · 9e3525df
      Eric Blake 提交于
      Before this patch, the testsuite was noisy:
      
      TEST: qemuargv2xmltest
            ........................................ 40
            ................20:41:28.046: warning : qemuParseCommandLine:6565 : unknown QEMU argument '-unknown', adding to the qemu namespace
      20:41:28.046: warning : qemuParseCommandLine:6565 : unknown QEMU argument 'parameter', adding to the qemu namespace
      .                        57  OK
      PASS: qemuargv2xmltest
      
      It's not a real failure (which is why the test was completing
      successfully), so much as an intentional warning to the user that use
      of the qemu namespace has the potential for undefined effects that
      leaked through the default logging behavior.  After this patch series,
      all tests can access any logged data, and this particular test can
      explicitly check for the presence or absence of the warning, such that
      the test output becomes:
      
      TEST: qemuargv2xmltest
            ........................................ 40
            .................                        57  OK
      PASS: qemuargv2xmltest
      
      * tests/testutils.h (virtTestLogContentAndReset): New prototype.
      * tests/testutils.c (struct virtTestLogData): New struct.
      (virtTestLogOutput, virtTestLogClose, virtTestLogContentAndReset):
      New functions.
      (virtTestMain): Always capture log data emitted during tests.
      * tests/qemuargv2xmltest.c (testCompareXMLToArgvHelper, mymain):
      Use flag to mark which tests expect noisy stderr.
      (testCompareXMLToArgvFiles): Add parameter to test whether stderr
      was appropriately silent.
      9e3525df
  9. 24 3月, 2010 1 次提交
    • M
      tests: Don't add extra padding if counter mod 40 is 0 · 8a7783c1
      Matthias Bolte 提交于
      This change only affects the output of tests that have an exact
      multiple of 40 test cases. For example the domainschematest currently:
      
      TEST: domainschematest
            ........................................ 40
            ........................................ 80
            ........................................ 120
            ........................................ 160
            ........................................                                         200 OK
      PASS: domainschematest
      
      It outputs additional 40 spaces on the last line.
      
      The domainschematest output is fixed by the change in test-lib.sh. The
      change in testutils.c fixes this for tests written in C. Currently no
      C test has an exact multiple of 40 test cases, but I checked it and
      the same problem exists there.
      
      This patch stops that in both cases.
      8a7783c1
  10. 23 3月, 2010 1 次提交
  11. 10 3月, 2010 1 次提交
  12. 16 1月, 2010 1 次提交
    • D
      Make test suite output less verbose · e8ac4a79
      Daniel P. Berrange 提交于
      Only print out '.' for each test case, full test output can be
      re-enabled with VIR_TEST_VERBOSE=1, or VIR_TEST_DEBUG=XXXX
      
      Sample output now looks like
      
        TEST: statstest
              ........................................ 40
              ...................................      75  OK
        PASS: statstest
        TEST: qparamtest
              ................................         32  OK
        PASS: qparamtest
        TEST:
              ............                             12  OK
      e8ac4a79
  13. 21 10月, 2009 2 次提交
  14. 10 9月, 2009 1 次提交
  15. 03 9月, 2009 1 次提交
    • D
      Fix misc OOM bugs · 8eacfd4c
      Daniel P. Berrange 提交于
      * tests/testutils.c: Run test function twice, once to prime it for
        static allocations, once to count the non-static allocations.
      * tests/testutilsqemu.c: Initialize variable correctl
      * src/capabilities.c: Don't free machines variable upon failure
        since caller must do that
      * src/xm_internal.c: Add missing check for OOM in building VIF
        config param
      8eacfd4c
  16. 08 7月, 2009 1 次提交
  17. 29 5月, 2009 1 次提交
  18. 21 5月, 2009 1 次提交
  19. 01 4月, 2009 1 次提交
  20. 03 2月, 2009 1 次提交
    • J
      tests: diagnose more open failures · d26c3387
      Jim Meyering 提交于
      * tests/qemuxml2argvtest.c: Revert the change,
      "tests: diagnose open failure" of 2009-01-30.
      * tests/testutils.c (virtTestLoadFile): Diagnose failure here.
      d26c3387
  21. 29 1月, 2009 1 次提交
  22. 18 12月, 2008 1 次提交
  23. 12 12月, 2008 1 次提交
    • J
      remove cvs $Id$ strings · 9c5470d2
      Jim Meyering 提交于
      * po/id.po: Likewise.
      * qemud/remote_generate_stubs.pl: Likewise.
      * src/virsh.c: Likewise.
      * tests/testutils.c: Likewise.
      * tests/testutils.h: Likewise.
      * RENAMES: Likewise.
      9c5470d2
  24. 21 11月, 2008 1 次提交
  25. 09 7月, 2008 1 次提交
  26. 07 7月, 2008 2 次提交
  27. 26 6月, 2008 1 次提交
  28. 12 6月, 2008 1 次提交
  29. 30 5月, 2008 2 次提交
  30. 29 5月, 2008 1 次提交
  31. 30 4月, 2008 1 次提交
  32. 18 4月, 2008 1 次提交
  33. 11 4月, 2008 1 次提交
  34. 30 1月, 2008 2 次提交
    • 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
  35. 07 12月, 2007 1 次提交
    • J
      Include "config.h" in remaining non-generated files. · 4a2f8fc6
      Jim Meyering 提交于
      * proxy/libvirt_proxy.c: Likewise.
      * python/libvir.c: Likewise.
      * python/types.c: Likewise.
      * src/event.c: Likewise.
      * src/xm_internal.c: Likewise.
      * tests/reconnect.c: Likewise.
      * tests/testutils.c: Likewise.
      4a2f8fc6