- 22 7月, 2011 1 次提交
-
-
由 Eric Blake 提交于
In preparation for a future patch adding new virFile APIs. * src/util/files.h, src/util/files.c: Move... * src/util/virfile.h, src/util/virfile.c: ...here, and rename functions to virFile prefix. Macro names are intentionally left alone. * *.c: All '#include "files.h"' uses changed. * src/Makefile.am (UTIL_SOURCES): Reflect rename. * cfg.mk (exclude_file_name_regexp--sc_prohibit_close): Likewise. * src/libvirt_private.syms: Likewise. * docs/hacking.html.in: Likewise. * HACKING: Regenerate.
-
- 11 7月, 2011 1 次提交
-
-
由 Eric Blake 提交于
The shell version would output 40 extra spaces for a test with a multiple of 40 sub-tests, and the C version can use the same printf optimization for avoiding a loop over single space output as the shell version. * tests/testutils.c (virtTestMain): Avoid loop for alignment. * tests/test-lib.sh: Fix formatting when counter is multiple of 40.
-
- 09 7月, 2011 1 次提交
-
-
由 Matthias Bolte 提交于
Don't print OK/FAIL for tests that decide to be skipped after calling virtTestMain. Delay printing of the indentation before the first test until we know that the test didn't decide to be skipped. Also make the reconnect test use VIRT_TEST_MAIN.
-
- 24 6月, 2011 3 次提交
-
-
由 Eric Blake 提交于
* src/xenxs/xen_sxpr.c (xenParseSxprPCI): Comment fix. * tests/object-locking.ml (driverTables): Likewise. * tests/testutils.c (virtTestDifferenceBin): Likewise.
-
由 Daniel P. Berrange 提交于
Introduces a simple wrapper around the raw POSIX sockets APIs and name resolution APIs. Allows for easy creation of client and server sockets with correct usage of name resolution APIs for protocol agnostic socket setup. It can listen for UNIX and TCP stream sockets. It can connect to UNIX, TCP streams directly, or indirectly to UNIX sockets via an SSH tunnel or external command * src/Makefile.am: Add to libvirt-net-rpc.la * src/rpc/virnetsocket.c, src/rpc/virnetsocket.h: Generic sockets APIs * tests/Makefile.am: Add socket test * tests/virnetsockettest.c: New test case * tests/testutils.c: Avoid overriding LIBVIRT_DEBUG settings * tests/ssh.c: Dumb helper program for SSH tunnelling tests
-
由 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
-
- 01 5月, 2011 1 次提交
-
-
由 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.
-
- 30 4月, 2011 2 次提交
-
-
由 Eric Blake 提交于
* bootstrap.conf (gnulib_modules): Add getcwd-lgpl. * tests/commandtest.c (checkoutput): Drop unused cwd. * tests/commandhelper.c (main): Let getcwd malloc. * tests/testutils.c (virTestMain): Likewise. * tools/virsh.c (cmdPwd): Likewise. (virshCmds): Expose cmdPwd and cmdCd on mingw.
-
由 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.
-
- 05 4月, 2011 2 次提交
-
-
由 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
-
由 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
-
- 01 2月, 2011 1 次提交
-
-
由 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.
-
- 24 11月, 2010 1 次提交
-
-
由 Cole Robinson 提交于
Without this fix, the test suite doesn't print error messages when a libvirt function fails. Additionally, only print error reports if DEBUG or VERBOSE requested.
-
- 17 11月, 2010 1 次提交
-
-
由 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.
-
- 10 11月, 2010 1 次提交
-
-
由 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.
-
- 14 10月, 2010 1 次提交
-
-
由 Jiri Denemark 提交于
-
- 13 10月, 2010 1 次提交
-
-
由 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
-
- 17 9月, 2010 1 次提交
-
-
由 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.
-
- 24 3月, 2010 1 次提交
-
-
由 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.
-
- 23 3月, 2010 1 次提交
-
-
由 Matthias Bolte 提交于
Now the virsh tests compile at least.
-
- 10 3月, 2010 1 次提交
-
-
由 Eric Blake 提交于
* global: patch created by running: for f in $(git ls-files '*.[ch]') ; do cppi $f > $f.t && mv $f.t $f done
-
- 16 1月, 2010 1 次提交
-
-
由 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
-
- 21 10月, 2009 2 次提交
-
-
由 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.
-
由 Cole Robinson 提交于
Otherwise any virRandom calls will result in a segfault.
-
- 10 9月, 2009 1 次提交
-
-
由 Mark McLoughlin 提交于
* src/testutils.[ch]: make testDebug externally available * src/testutilsqemu.c: if VIR_TEST_DEBUG is set, dump the qemu driver capabilities to stderr
-
- 03 9月, 2009 1 次提交
-
-
由 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
-
- 08 7月, 2009 1 次提交
-
-
由 Daniel P. Berrange 提交于
* tests/testutils.c: Don't discard stderr when running external programs during tests
-
- 29 5月, 2009 1 次提交
-
-
由 Daniel P. Berrange 提交于
-
- 21 5月, 2009 1 次提交
-
-
由 Daniel P. Berrange 提交于
-
- 01 4月, 2009 1 次提交
-
-
由 Daniel P. Berrange 提交于
-
- 03 2月, 2009 1 次提交
-
-
由 Jim Meyering 提交于
* tests/qemuxml2argvtest.c: Revert the change, "tests: diagnose open failure" of 2009-01-30. * tests/testutils.c (virtTestLoadFile): Diagnose failure here.
-
- 29 1月, 2009 1 次提交
-
-
由 Daniel P. Berrange 提交于
-
- 18 12月, 2008 1 次提交
-
-
由 Daniel P. Berrange 提交于
-
- 12 12月, 2008 1 次提交
-
-
由 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.
-
- 21 11月, 2008 1 次提交
-
-
由 Daniel P. Berrange 提交于
-
- 09 7月, 2008 1 次提交
-
-
由 Daniel P. Berrange 提交于
-
- 07 7月, 2008 2 次提交
-
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
- 26 6月, 2008 1 次提交
-
-
由 Atsushi SAKAI 提交于
-
- 12 6月, 2008 1 次提交
-
-
由 Daniel P. Berrange 提交于
-