1. 05 4月, 2013 1 次提交
  2. 26 2月, 2013 1 次提交
    • E
      tests: uniformly report test failures · dce95297
      Eric Blake 提交于
      testutils.c likes to print summaries after a test completes,
      including if it failed.  But if the test outright exit()s,
      this summary is skipped.  Enforce that we return instead of exit.
      
      * cfg.mk (sc_prohibit_exit_in_tests): New syntax check.
      * tests/commandhelper.c (main): Fix offenders.
      * tests/qemumonitorjsontest.c (mymain): Likewise.
      * tests/seclabeltest.c (main): Likewise.
      * tests/securityselinuxlabeltest.c (mymain): Likewise.
      * tests/securityselinuxtest.c (mymain): Likewise.
      * tests/testutils.h (VIRT_TEST_MAIN_PRELOAD): Likewise.
      * tests/testutils.c (virtTestMain): Likewise.
      (virtTestCaptureProgramOutput): Use symbolic name.
      dce95297
  3. 21 12月, 2012 1 次提交
  4. 21 9月, 2012 1 次提交
  5. 21 8月, 2012 1 次提交
    • D
      Add test case for SELinux label generation · 9136032a
      Daniel P. Berrange 提交于
      This test case validates the correct generation of SELinux labels
      for VMs, wrt the current process label. Since we can't actually
      change the label of the test program process, we create a shared
      library libsecurityselinuxhelper.so which overrides the getcon()
      and setcon() libselinux.so functions. When started the test case
      will check to see if LD_PRELOAD is set, and if not, it will
      re-exec() itself setting LD_PRELOAD=libsecurityselinuxhelper.so
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      9136032a
  6. 27 7月, 2012 1 次提交
    • O
      maint: Use consistent copyright. · a4bcefbc
      Osier Yang 提交于
      This is a follow up patch of commit f9ce7dad, it modifies all
      the files which declare the copyright like "See COPYING.LIB for
      the License of this software" to use the detailed/consistent one.
      
      And deserts the outdated comments like:
      
       * libvirt-qemu.h:
       * Summary: qemu specific interfaces
       * Description: Provides the interfaces of the libvirt library to handle
       *              qemu specific methods
       *
       * Copy:  Copyright (C) 2010, 2012 Red Hat, Inc.
      
      Uses the more compact style like:
      
       * libvirt-qemu.h: Interfaces specific for QEMU/KVM driver
       *
       * Copyright (C) 2010, 2012 Red Hat, Inc.
      a4bcefbc
  7. 04 4月, 2012 1 次提交
    • D
      Fix format specifiers in test cases on Win32 · f48de0f1
      Daniel P. Berrange 提交于
      Some of the test suites use fprintf with format specifiers
      that are not supported on Win32 and are not fixed by gnulib.
      
      The mingw32 compiler also has trouble detecting ssize_t
      correctly, complaining that 'ssize_t' does not match
      'signed size_t' (which it expects for %zd). Force the
      cast to size_t to avoid this problem
      
      * tests/testutils.c, tests/testutils.h: Fix printf
        annotation on virTestResult. Use virVasprintf
        instead of vfprintf
      * tests/virhashtest.c: Use VIR_WARN instead of fprintf(stderr).
        Cast to size_t to avoid mingw32 compiler bug
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      f48de0f1
  8. 04 2月, 2012 1 次提交
    • E
      build: expand rule to cover testsuite · 8fe454ce
      Eric Blake 提交于
      The bulk of this patch was done with:
      
      sed -i 's/\(\bfree *(/VIR_FREE(/g' tests/*.c
      
      followed by fixing the few compile errors that resulted.
      
      * cfg.mk (exclude_file_name_regexp--sc_prohibit_raw_allocation):
      Remove tests from exemption.
      * tests/testutils.h: Add common header.
      * tests/commandhelper.c: Fix offenders.
      * tests/cputest.c: Likewise.
      * tests/domainsnapshotxml2xmltest.c: Likewise.
      * tests/interfacexml2xmltest.c: Likewise.
      * tests/networkxml2argvtest.c: Likewise.
      * tests/networkxml2xmltest.c: Likewise.
      * tests/nodedevxml2xmltest.c: Likewise.
      * tests/nodeinfotest.c: Likewise.
      * tests/nwfilterxml2xmltest.c: Likewise.
      * tests/qemuargv2xmltest.c: Likewise.
      * tests/qemuxml2argvtest.c: Likewise.
      * tests/qemuxml2xmltest.c: Likewise.
      * tests/qemuxmlnstest.c: Likewise.
      * tests/qparamtest.c: Likewise.
      * tests/sexpr2xmltest.c: Likewise.
      * tests/storagepoolxml2xmltest.c: Likewise.
      * tests/storagevolxml2xmltest.c: Likewise.
      * tests/testutils.c: Likewise.
      * tests/virshtest.c: Likewise.
      * tests/xencapstest.c: Likewise.
      * tests/xmconfigtest.c: Likewise.
      * tests/xml2sexprtest.c: Likewise.
      8fe454ce
  9. 24 6月, 2011 1 次提交
    • D
      Provide a simple object for encoding/decoding RPC messages · ceacc1dd
      Daniel P. Berrange 提交于
      This provides a new struct that contains a buffer for the RPC
      message header+payload, as well as a decoded copy of the message
      header. There is an API for applying a XDR encoding & decoding
      of the message headers and payloads. There are also APIs for
      maintaining a simple FIFO queue of message instances.
      
      Expected usage scenarios are:
      
      To send a message
      
         msg = virNetMessageNew()
      
         ...fill in msg->header fields..
         virNetMessageEncodeHeader(msg)
         ...loook at msg->header fields to determine payload filter
         virNetMessageEncodePayload(msg, xdrfilter, data)
         ...send msg->bufferLength worth of data from buffer
      
      To receive a message
      
         msg = virNetMessageNew()
         ...read VIR_NET_MESSAGE_LEN_MAX of data into buffer
         virNetMessageDecodeLength(msg)
         ...read msg->bufferLength-msg->bufferOffset of data into buffer
         virNetMessageDecodeHeader(msg)
         ...look at msg->header fields to determine payload filter
         virNetMessageDecodePayload(msg, xdrfilter, data)
         ...run payload processor
      
      * src/Makefile.am: Add to libvirt-net-rpc.la
      * src/rpc/virnetmessage.c, src/rpc/virnetmessage.h: Internal
        message handling API.
      * testutils.c, testutils.h: Helper for printing binary differences
      * virnetmessagetest.c: Validate all XDR encoding/decoding
      ceacc1dd
  10. 01 5月, 2011 1 次提交
    • M
      tests: Lower stack usage below 4096 bytes · 9ba4eb3c
      Matthias Bolte 提交于
      Make virtTestLoadFile allocate the buffer to read the file into.
      
      Fix logic error in virtTestLoadFile, stop reading on the first empty line.
      
      Use virFileReadLimFD in virtTestCaptureProgramOutput to avoid manual
      buffer handling.
      9ba4eb3c
  11. 30 4月, 2011 1 次提交
    • E
      tests: simplify common setup · 20986e58
      Eric Blake 提交于
      A few of the tests were missing basic sanity checks, while most
      of them were doing copy-and-paste initialization (in fact, some
      of them pasted the argc > 1 check more than once!).  It's much
      nicer to do things in one common place, and minimizes the size of
      the next patch that fixes getcwd usage.
      
      * tests/testutils.h (EXIT_AM_HARDFAIL): New define.
      (progname, abs_srcdir): Define for all tests.
      (VIRT_TEST_MAIN): Change callback signature.
      * tests/testutils.c (virtTestMain): Do more common init.
      * tests/commandtest.c (mymain): Simplify.
      * tests/cputest.c (mymain): Likewise.
      * tests/esxutilstest.c (mymain): Likewise.
      * tests/eventtest.c (mymain): Likewise.
      * tests/hashtest.c (mymain): Likewise.
      * tests/networkxml2xmltest.c (mymain): Likewise.
      * tests/nodedevxml2xmltest.c (myname): Likewise.
      * tests/nodeinfotest.c (mymain): Likewise.
      * tests/nwfilterxml2xmltest.c (mymain): Likewise.
      * tests/qemuargv2xmltest.c (mymain): Likewise.
      * tests/qemuhelptest.c (mymain): Likewise.
      * tests/qemuxml2argvtest.c (mymain): Likewise.
      * tests/qemuxml2xmltest.c (mymain): Likewise.
      * tests/qparamtest.c (mymain): Likewise.
      * tests/sexpr2xmltest.c (mymain): Likewise.
      * tests/sockettest.c (mymain): Likewise.
      * tests/statstest.c (mymain): Likewise.
      * tests/storagepoolxml2xmltest.c (mymain): Likewise.
      * tests/storagevolxml2xmltest.c (mymain): Likewise.
      * tests/virbuftest.c (mymain): Likewise.
      * tests/virshtest.c (mymain): Likewise.
      * tests/vmx2xmltest.c (mymain): Likewise.
      * tests/xencapstest.c (mymain): Likewise.
      * tests/xmconfigtest.c (mymain): Likewise.
      * tests/xml2sexprtest.c (mymain): Likewise.
      * tests/xml2vmxtest.c (mymain): Likewise.
      20986e58
  12. 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
  13. 10 3月, 2010 1 次提交
  14. 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
  15. 16 12月, 2009 1 次提交
    • J
      avoid calling exit with a constant; use EXIT_* instead · 2e5efc3d
      Jim Meyering 提交于
      This appeases a new gnulib-provided "syntax-check".
      * daemon/libvirtd.c (main): Use EXIT_FAILURE, not 1.
      * proxy/libvirt_proxy.c (main): Likewise, and EXIT_SUCCESS, not 0.
      * tests/conftest.c (main): Likewise.
      * tests/reconnect.c (main): Likewise.
      * tests/testutils.h (EXIT_AM_SKIP): Define.
      * tests/nodeinfotest.c (mymain): Use EXIT_AM_SKIP, not 77.
      * tests/qemuargv2xmltest.c: Likewise.
      * tests/qemuxml2xmltest.c: Likewise.
      * tests/virshtest.c (mymain): Likewise.
      2e5efc3d
  16. 21 10月, 2009 1 次提交
    • C
      tests: Centralize VIR_TEST_DEBUG lookup, and document it · 9710856b
      Cole Robinson 提交于
      Provide a simple interface for other tests to lookup the testDebug variable.
      Also remove a redundant error message in interface tests.
      
      If anyone feels inclined to change this env variable to match the existing
      LIBVIRT_* format, it should now be easier to do so.
      9710856b
  17. 10 9月, 2009 1 次提交
  18. 21 5月, 2009 1 次提交
  19. 13 5月, 2009 1 次提交
  20. 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
  21. 21 8月, 2008 1 次提交
  22. 29 5月, 2008 1 次提交
  23. 18 4月, 2008 1 次提交
  24. 11 4月, 2008 1 次提交
  25. 06 2月, 2008 1 次提交
  26. 19 7月, 2007 1 次提交
  27. 25 8月, 2006 1 次提交
  28. 24 8月, 2006 1 次提交
  29. 09 5月, 2006 1 次提交