]> git.ipfire.org Git - thirdparty/libvirt.git/commit
tests: avoid spurious failure of nodeinfotest
authorEric Blake <eblake@redhat.com>
Wed, 15 Dec 2010 20:49:00 +0000 (13:49 -0700)
committerEric Blake <eblake@redhat.com>
Mon, 20 Dec 2010 17:31:40 +0000 (10:31 -0700)
commitbb11c553120c7b52d651efa05ffaf646c5b622da
tree5257d27c1e1d23f22edc7f76ca12869d9e3cd1c1
parent630fe36f06658f558ab2c3e6506c1db73a0179ae
tests: avoid spurious failure of nodeinfotest

When running 'make check' under a multi-cpu Dom0 xen machine,
nodeinfotest had a spurious failure it was reading from
/sys/devices/system/cpu, but xen has no notion of topology.  The test
was intended to be isolated from reading any real system files; the
regression was introduced in Mar 2010 with commit aa2f6f96dd.

Fix things by allowing an early exit for the testsuite.

* src/nodeinfo.c (linuxNodeInfoCPUPopulate): Add parameter.
(nodeGetInfo): Adjust caller.
* tests/nodeinfotest.c (linuxTestCompareFiles): Likewise.
src/nodeinfo.c
tests/nodeinfotest.c