libvirt/tests
Eric Blake 7b045c8ce9 util: new stricter unsigned int parsing
strtoul() is required to parse negative numbers as their
twos-complement positive counterpart.  But sometimes we want
to reject negative numbers.  Add new functions to do this.
The 'p' suffix is a mnemonic for 'positive' (technically it
also parses 0, but 'non-negative' doesn't lend itself to a
nice one-letter suffix).

* src/util/virstring.h (virStrToLong_uip, virStrToLong_ulp)
(virStrToLong_ullp): New prototypes.
* src/util/virstring.c (virStrToLong_uip, virStrToLong_ulp)
(virStrToLong_ullp): New functions.
* src/libvirt_private.syms (virstring.h): Export them.
* tests/virstringtest.c (testStringToLong): Test them.

Signed-off-by: Eric Blake <eblake@redhat.com>
2014-05-01 15:11:02 -06:00
..
bhyvexml2argvdata tests: add bhyve xml2xml test 2014-04-08 20:50:36 +04:00
bhyvexml2xmloutdata tests: add bhyve xml2xml test 2014-04-08 20:50:36 +04:00
capabilityschemadata
commanddata
confdata
cputestdata
domainconfdata Rename virDomainGetRootFilesystem to virDomainGetFilesystemForTarget 2014-02-20 15:50:46 +00:00
domainschemadata conf: Output disk backing store details in domain XML 2014-04-24 16:06:13 +02:00
domainsnapshotxml2xmlin conf: split <disk> schema into more pieces 2014-04-16 10:45:55 +02:00
domainsnapshotxml2xmlout
fchostdata/fc_host
interfaceschemadata
lxcconf2xmldata lxc conf2xml: don't let current vcpus at 0: define won't like it 2014-04-07 10:52:28 -06:00
lxcxml2xmldata
lxcxml2xmloutdata
networkxml2confdata network: fix problems with SRV records 2014-03-26 16:42:43 +02:00
networkxml2firewalldata Add test for converting network XML to iptables rules 2014-04-25 15:44:09 +01:00
networkxml2xmlin
networkxml2xmlout
networkxml2xmlupdatein
networkxml2xmlupdateout
nodedevschemadata
nodeinfodata
nwfilterxml2firewalldata Add a test suite for nwfilter ebiptables tech driver 2014-04-25 15:44:10 +01:00
nwfilterxml2xmlin
nwfilterxml2xmlout
qemucapabilitiesdata qemu: Add USB keyboard capability 2014-02-19 09:16:31 +01:00
qemucaps2xmldata qemu: add unit tests for the capabilities xml 2014-03-26 13:41:25 +01:00
qemuhelpdata
qemuhotplugtestdata qemuhotplugtest: Fix mem-leaking testcases 2014-03-19 14:48:58 +01:00
qemumonitorjsondata
qemuxml2argvdata tests: Test backing store XML formatting and parsing 2014-04-24 16:07:56 +02:00
qemuxml2xmloutdata tests: Test backing store XML formatting and parsing 2014-04-24 16:07:56 +02:00
qemuxmlnsdata
secretxml2xmlin Add tests for secret XML parsing 2014-02-14 16:47:14 +01:00
securityselinuxhelperdata tests: Flesh out securityselinuxhelper 2014-03-07 14:02:10 +01:00
securityselinuxlabeldata
sexpr2xmldata conf: Format and parse backing chains in domain XML 2014-04-24 16:06:18 +02:00
storagepoolschemadata
storagepoolxml2xmlin
storagepoolxml2xmlout
storagevolschemadata
storagevolxml2argvdata
storagevolxml2xmlin
storagevolxml2xmlout
sysinfodata
virfiledata
virpcitestdata
virscsidata tests: Fix SCSI test data filenames for Windows 2014-03-29 21:14:15 +01:00
virusbtestdata/sys_bus_usb/devices Add tests for virUSBDeviceFind functions 2014-03-03 14:35:22 +01:00
vmwareverdata
vmx2xmldata conf: Add keyboard input device type 2014-02-19 09:16:31 +01:00
xencapsdata
xmconfigdata conf: Add keyboard input device type 2014-02-19 09:16:31 +01:00
xml2sexprdata
xml2vmxdata
.valgrind.supp
bhyvexml2argvmock.c bhyve: add xml2args unittest 2014-03-27 08:33:41 +04:00
bhyvexml2argvtest.c tests: use virBhyveCapsBuild in bhyvexml2argv test 2014-04-09 10:27:16 +04:00
bhyvexml2xmltest.c tests: add bhyve xml2xml test 2014-04-08 20:50:36 +04:00
capabilityschematest
commandhelper.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
commandtest.c Coverity: Resolve a FORWARD_NULL 2014-03-25 17:13:27 -04:00
cpuset
cputest.c Use virFileFindResource to locate CPU map XML 2014-04-25 11:59:46 +01:00
define-dev-segfault
domainconftest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
domainschematest
domainsnapshotschematest
domainsnapshotxml2xmltest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
esxutilstest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
eventtest.c Add virLogSource variables to all source files 2014-03-18 14:29:22 +00:00
fchosttest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
fdstreamtest.c Use virFileFindResource to locate iohelper for fdstream 2014-04-25 11:59:46 +01:00
int-overflow
interfaceschematest
interfacexml2xmltest.c Require spaces around equality comparisons 2014-03-18 11:29:44 +01:00
jsontest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
libvirtd-fail
libvirtd-pool
libvirtdconftest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
lxcconf2xmltest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
lxcxml2xmltest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
Makefile.am build: add nwfilterxml2firewalldata to dist 2014-04-25 17:49:02 +01:00
metadatatest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
networkschematest
networkxml2conftest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
networkxml2firewalltest.c networkxml2firewalltest: fix build failure on freebsd 2014-04-30 10:16:09 +02:00
networkxml2xmltest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
networkxml2xmlupdatetest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
nodedevschematest
nodedevxml2xmltest.c Require spaces around equality comparisons 2014-03-18 11:29:44 +01:00
nodeinfotest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
nwfilterebiptablestest.c nwfilter: Tear down temp. filters when tearing all filters 2014-04-30 12:51:38 -04:00
nwfilterschematest
nwfilterxml2firewalltest.c Add a test suite for nwfilter ebiptables tech driver 2014-04-25 15:44:10 +01:00
nwfilterxml2xmltest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
objecteventtest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
objectlocking.ml tests: cleanup object-locking test 2014-03-18 10:20:49 +01:00
oomtrace.pl
openvzutilstest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
openvzutilstest.conf
pkix_asn1_tab.c
qemuagenttest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
qemuargv2xmltest.c tests: drop dead code from argv2xml and xml2xml 2014-04-11 13:02:09 -06:00
qemucapabilitiestest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
qemucaps2xmltest.c Fix memory leak in testGetCaps() 2014-03-27 07:22:10 +01:00
qemuhelptest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
qemuhotplugtest.c qemuDomainAttachDeviceFlags: Parse device xml as inactive 2014-03-26 13:49:47 +01:00
qemumonitorjsontest.c hash: add common utility functions 2014-04-07 06:14:45 -06:00
qemumonitortest.c
qemumonitortestutils.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
qemumonitortestutils.h
qemuxml2argvmock.c
qemuxml2argvtest.c Use virFileFindResource to locate CPU map XML 2014-04-25 11:59:46 +01:00
qemuxml2xmltest.c tests: Test backing store XML formatting and parsing 2014-04-24 16:07:56 +02:00
qemuxmlnstest.c Use virFileFindResource to locate CPU map XML 2014-04-25 11:59:46 +01:00
read-bufsiz
read-non-seekable
reconnect.c util: make it easier to grab only regular command exit 2014-03-03 12:40:32 -07:00
schematestutils.sh
seclabeltest.c
secretschematest Add tests for secret XML parsing 2014-02-14 16:47:14 +01:00
secretxml2xmltest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
securityselinuxhelper.c tests: Fix SELinux tests in VPATH build 2014-03-10 10:20:30 +01:00
securityselinuxlabeltest.c conf: move host disk type to util/ 2014-04-01 10:38:13 -06:00
securityselinuxtest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
sexpr2xmltest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
shunloadhelper.c Use K&R style for curly braces in tests/ 2014-03-20 17:06:38 +01:00
shunloadtest.c
sockettest.c Fix unitialized data in virSocketAddrMask 2014-03-20 12:15:00 +00:00
ssh.c
start
statstest.c Require spaces around equality comparisons 2014-03-18 11:29:44 +01:00
storagebackendsheepdogtest.c conf: track sizes directly in source struct 2014-04-02 06:03:00 -06:00
storagepoolschematest
storagepoolxml2xmltest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
storagevolschematest
storagevolxml2argvtest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
storagevolxml2xmltest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
sysinfotest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
test_conf.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
test_conf.sh
test-lib.sh
testutils.c Add test for converting network XML to iptables rules 2014-04-25 15:44:09 +01:00
testutils.h Add test for converting network XML to iptables rules 2014-04-25 15:44:09 +01:00
testutilslxc.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
testutilslxc.h Don't leave empty first line in C source files 2014-03-18 12:17:12 +01:00
testutilsqemu.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
testutilsqemu.h
testutilsxen.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
testutilsxen.h Don't leave empty first line in C source files 2014-03-18 12:17:12 +01:00
utiltest.c
vcpupin
viralloctest.c Add test suite for viralloc APIs 2014-04-25 11:29:55 +01:00
viratomictest.c
virauthconfigtest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
virbitmaptest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
virbuftest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
vircapstest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
vircgroupmock.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
vircgrouptest.c Extend virCgroupGetPercpuStats to fill in vcputime too 2014-04-09 16:24:08 +02:00
vircryptotest.c Add helper APIs for generating cryptographic hashes 2014-03-10 16:39:18 +00:00
virdbustest.c Fix Memory Leak in testMessageArrayRef() 2014-03-31 14:56:17 -06:00
virdrivermoduletest.c Use virFileFindResource to locate driver plugins 2014-04-25 11:59:46 +01:00
virendiantest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
virfiletest.c
virfirewalltest.c Introduce an object for managing firewall rulesets 2014-04-25 15:44:09 +01:00
virhashdata.h
virhashtest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
virhostdevtest.c tests: remove hostdevmgr directory on cleanup 2014-04-28 22:58:10 +02:00
viridentitytest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
viriscsitest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
virkeycodetest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
virkeyfiletest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
virkmodtest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
virlockspacetest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
virlogtest.c
virmock.h Conditionalize include of dlfcn.h in virmock.h 2014-04-25 15:48:30 +01:00
virmockdbus.c Create a re-usable DBus LD_PRELOAD mock library 2014-04-08 11:03:59 +01:00
virnetdevbandwidthtest.c QoS: make tc filters match all traffic 2014-04-07 11:35:29 +02:00
virnetmessagetest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
virnetserverclientmock.c
virnetserverclienttest.c
virnetsockettest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
virnettlscontexttest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
virnettlshelpers.c Add virLogSource variables to all source files 2014-03-18 14:29:22 +00:00
virnettlshelpers.h
virnettlssessiontest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
virpcimock.c Replace Pci with PCI throughout 2014-04-08 11:15:55 +01:00
virpcitest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
virportallocatortest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
virscsitest.c tests: Fix SCSI test data filenames for Windows 2014-03-29 21:14:15 +01:00
virsh-all
virsh-optparse virsh: Add keepalive in new vshConnect function 2014-03-18 08:27:29 +01:00
virsh-schedinfo
virsh-synopsis
virsh-undefine
virsh-uriprecedence
virshtest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
virstoragetest.c Add support for addressing backing stores by index 2014-04-25 11:11:03 +02:00
virstringtest.c util: new stricter unsigned int parsing 2014-05-01 15:11:02 -06:00
virsystemdtest.c Introduce --without-pm-utils to get rid of pm-is-supported dependency 2014-04-11 15:51:10 -06:00
virt-aa-helper-test Fix typos in src/* 2014-04-21 16:49:08 -06:00
virtimetest.c Add virLogSource variables to all source files 2014-03-18 14:29:22 +00:00
viruritest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
virusbmock.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
virusbtest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
vmwarevertest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
vmx2xmltest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
xencapstest.c Use K&R style for curly braces in tests/ 2014-03-20 17:06:38 +01:00
xmconfigtest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
xml2sexprtest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
xml2vmxtest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00