libvirt/tests
Laine Stump d6354c1696 util: change virFile*Pid functions to return < 0 on failure
Although most functions in libvirt return 0 on success and < 0 on
failure, there are a few functions lingering around that return errno
(a positive value) on failure, and sometimes code calling those
functions incorrectly assumes the <0 standard. I noticed one of these
the other day when auditing networkStartDhcpDaemon after Guido Gunther
found a place where success was improperly returned on failure (that
patch has been acked and is pending a push). The problem was that it
expected the return value from virFileReadPid to be < 0 on failure,
but it was actually positive (it was also neglected to set the return
code in this case, similar to the bug found by Guido).

This all led to the fact that *all* of the virFile*Pid functions in
util.c are returning errno on failure. This patch remedies that
problem by changing them all to return -errno on failure, and makes
any necessary changes to callers of the functions. (In the meantime, I
also properly set the return code on failure of virFileReadPid in
networkStartDhcpDaemon).
2011-07-25 16:56:26 -04:00
..
capabilityschemadata microblaze: Add architecture support 2011-07-07 17:49:21 -06:00
commanddata
confdata
cputestdata
domainschemadata
domainsnapshotxml2xmlin
domainsnapshotxml2xmlout
interfaceschemadata
networkxml2argvdata network: Fix dnsmasq hostsfile creation logic and related tests 2011-06-29 01:59:34 +02:00
networkxml2xmlin bandwidth: Add test cases for network 2011-07-25 13:50:06 +08:00
networkxml2xmlout bandwidth: Add test cases for network 2011-07-25 13:50:06 +08:00
nodedevschemadata
nodeinfodata
nwfilterxml2xmlin nwfilter: enable filtering of gratuitous ARP packets 2011-05-23 19:41:18 -04:00
nwfilterxml2xmlout nwfilter: enable filtering of gratuitous ARP packets 2011-05-23 19:41:18 -04:00
qemuhelpdata
qemuxml2argvdata bandwidth: Add domain schema and xml2xml tests 2011-07-25 13:50:20 +08:00
qemuxml2xmloutdata Introduce virDomainChrDefNew() 2011-04-14 10:29:39 -06:00
sexpr2xmldata Do not drop kernel cmdline for xen pv domains 2011-07-11 09:11:15 -06:00
storagepoolxml2xmlin
storagepoolxml2xmlout
storagevolxml2xmlin
storagevolxml2xmlout
vmx2xmldata esx: Fix regression in absolute file name handling 2011-05-26 23:32:44 +02:00
xencapsdata
xmconfigdata Fix order of disks and controllers 2011-06-01 19:11:58 +02:00
xml2sexprdata Do not drop kernel cmdline for xen pv domains 2011-07-11 09:11:15 -06:00
xml2vmxdata esx: Fix regression in absolute file name handling 2011-05-26 23:32:44 +02:00
.gitignore Add a test case for certificate validation 2011-07-22 15:18:32 +01:00
.valgrind.supp tests: suppress more valgrind situations 2011-05-03 08:03:39 -06:00
capabilityschematest
commandhelper.c build: rename files.h to virfile.h 2011-07-21 10:34:51 -06:00
commandtest.c util: change virFile*Pid functions to return < 0 on failure 2011-07-25 16:56:26 -04:00
conftest.c tests: Lower stack usage below 4096 bytes 2011-04-30 19:59:52 +02:00
cpuset
cputest.c maint: rename virBufferVSprintf to virBufferAsprintf 2011-05-05 13:47:40 -06:00
daemon-conf
define-dev-segfault Add domain type checking 2011-07-11 19:38:51 +02:00
domainschematest
domainsnapshotschematest
esxutilstest.c tests: Use EXIT_AM_SKIP instead of 77 directly 2011-07-09 10:14:38 +02:00
eventtest.c tests: simplify common setup 2011-04-29 10:21:20 -06:00
hashdata.h tests: More unit tests for internal hash APIs 2011-04-27 15:32:30 +02:00
hashtest.c hash: fix memory leak regression 2011-04-29 14:26:40 -06:00
int-overflow tests: don't alter state in $HOME 2011-03-28 09:55:46 -06:00
interfaceschematest
interfacexml2xmltest.c tests: Lower stack usage below 4096 bytes 2011-04-30 19:59:52 +02:00
jsontest.c Add test case for parsing JSON docs 2011-06-30 18:04:02 +01:00
libvirtd-fail
libvirtd-pool
Makefile.am tests: fix compilation failures 2011-07-25 13:48:26 +08:00
networkschematest
networkxml2argvtest.c network: Fix dnsmasq hostsfile creation logic and related tests 2011-06-29 01:59:34 +02:00
networkxml2xmltest.c bandwidth: Add test cases for network 2011-07-25 13:50:06 +08:00
nodedevschematest
nodedevxml2xmltest.c tests: Lower stack usage below 4096 bytes 2011-04-30 19:59:52 +02:00
nodeinfotest.c build: rename files.h to virfile.h 2011-07-21 10:34:51 -06:00
nwfilterschematest
nwfilterxml2xmltest.c tests: Lower stack usage below 4096 bytes 2011-04-30 19:59:52 +02:00
object-locking.ml maint: typo fixes 2011-06-24 08:01:10 -06:00
oomtrace.pl maint: mark more perl scripts executable 2011-05-16 10:12:21 -06:00
openvzutilstest.c openvz: Add simple test for openvzReadNetworkConf 2011-06-01 11:58:15 +02:00
openvzutilstest.conf openvz: Add simple test for openvzReadNetworkConf 2011-06-01 11:58:15 +02:00
pkix_asn1_tab.c Add a test case for certificate validation 2011-07-22 15:18:32 +01:00
qemuargv2xmltest.c Change extract pidfile & monitor config from QEMU command line 2011-07-12 15:39:04 +01:00
qemuhelptest.c tests: Use EXIT_AM_SKIP instead of 77 directly 2011-07-09 10:14:38 +02:00
qemuxml2argvtest.c Add domain type checking 2011-07-11 19:38:51 +02:00
qemuxml2xmltest.c bandwidth: Add domain schema and xml2xml tests 2011-07-25 13:50:20 +08:00
qparamtest.c tests: simplify common setup 2011-04-29 10:21:20 -06:00
read-bufsiz
read-non-seekable
reconnect.c tests: Improve output of tests that decide to skip at runtime 2011-07-09 15:47:57 +02:00
schematestutils.sh
seclabeltest.c
sexpr2xmltest.c Do not drop kernel cmdline for xen pv domains 2011-07-11 09:11:15 -06:00
sockettest.c tests: simplify common setup 2011-04-29 10:21:20 -06:00
ssh.c Introduce a generic object for using network sockets 2011-06-24 11:48:18 +01:00
start
statstest.c Skip some xen tests if xend is not running 2011-07-07 17:23:09 -06:00
storagepoolschematest
storagepoolxml2xmltest.c tests: Lower stack usage below 4096 bytes 2011-04-30 19:59:52 +02:00
storagevolschematest
storagevolxml2xmltest.c tests: Lower stack usage below 4096 bytes 2011-04-30 19:59:52 +02:00
test_conf.sh
test-lib.sh tests: simplify formatting 2011-07-11 09:21:37 -06:00
testutils.c build: rename files.h to virfile.h 2011-07-21 10:34:51 -06:00
testutils.h Provide a simple object for encoding/decoding RPC messages 2011-06-24 11:48:14 +01:00
testutilsqemu.c
testutilsqemu.h
testutilsxen.c
testutilsxen.h
undefine
utiltest.c build: avoid 'make syntax-check' failure 2011-07-01 16:46:20 -06:00
vcpupin
virbuftest.c maint: rename virBufferVSprintf to virBufferAsprintf 2011-05-05 13:47:40 -06:00
virnetmessagetest.c tests: Fix memory leak in virnetmessagetest 2011-06-29 10:47:54 +08:00
virnetsockettest.c remote/ssh: optional "keyfile" parameter. 2011-07-22 07:49:49 -06:00
virnettlscontexttest.c Fix import of private key with older gnutls 2011-07-25 13:47:11 -06:00
virsh-all
virsh-optparse virsh: fix previous patch 2011-07-14 07:14:05 -06:00
virsh-schedinfo
virsh-synopsis tests: use GPLv2+, not GPLv3 2010-05-12 08:41:10 +02:00
virshtest.c tests: Fix virshtest failure after dominfo changed 2011-07-19 20:48:15 +08:00
virt-aa-helper-test
vmx2xmltest.c tests: Use EXIT_AM_SKIP instead of 77 directly 2011-07-09 10:14:38 +02:00
xencapstest.c build: rename files.h to virfile.h 2011-07-21 10:34:51 -06:00
xmconfigtest.c Add domain type checking 2011-07-11 19:38:51 +02:00
xml2sexprtest.c Add domain type checking 2011-07-11 19:38:51 +02:00
xml2vmxtest.c Add domain type checking 2011-07-11 19:38:51 +02:00