[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] S390: Fix virSysinfoRead memory corruption



On Fri, Dec 07, 2012 at 05:30:05PM +0100, Viktor Mihajlovski wrote:
> On 12/07/2012 10:44 AM, Daniel P. Berrange wrote:
> >  1 files changed, 69 insertions(+), 91 deletions(-)
> >
> >Given the complexity the parsing it would be nice to add a test
> >case for this. It is a shame we don't already have a test case
> >for the sysinfo code in fact :-( I'd like to see test/virsysinfotest.c
> >to validate this parsing. Take a 'char *str' containing representation
> >data from /proc/sysinfo, run it through the parser & then validate the
> >result.
> >
> >Daniel
> >
> 
> Makes sense ... as this is platform-specific (ifdef'd) code: should I
> try to (by refactoring) make the s390 code testable on other platforms
> or do you think it's sufficient to have make check execute the test
> case on the target platform only, e.g. during RPM build.
> Either way: the checks for DMI-based sysinfo and PPC would have to be
> provided by the respective authors...

I think we only need to test the code associated with the platform
being built for. So just make the test case code you add be #ifdef
s390 too, and x86 authors can follow up with their own impl later.

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]