mirror of
https://github.com/libvirt/libvirt.git
synced 2026-09-03 20:53:04 -05:00
build: expand rule to cover testsuite
The bulk of this patch was done with: sed -i 's/\(\bfree *(/VIR_FREE(/g' tests/*.c followed by fixing the few compile errors that resulted. * cfg.mk (exclude_file_name_regexp--sc_prohibit_raw_allocation): Remove tests from exemption. * tests/testutils.h: Add common header. * tests/commandhelper.c: Fix offenders. * tests/cputest.c: Likewise. * tests/domainsnapshotxml2xmltest.c: Likewise. * tests/interfacexml2xmltest.c: Likewise. * tests/networkxml2argvtest.c: Likewise. * tests/networkxml2xmltest.c: Likewise. * tests/nodedevxml2xmltest.c: Likewise. * tests/nodeinfotest.c: Likewise. * tests/nwfilterxml2xmltest.c: Likewise. * tests/qemuargv2xmltest.c: Likewise. * tests/qemuxml2argvtest.c: Likewise. * tests/qemuxml2xmltest.c: Likewise. * tests/qemuxmlnstest.c: Likewise. * tests/qparamtest.c: Likewise. * tests/sexpr2xmltest.c: Likewise. * tests/storagepoolxml2xmltest.c: Likewise. * tests/storagevolxml2xmltest.c: Likewise. * tests/testutils.c: Likewise. * tests/virshtest.c: Likewise. * tests/xencapstest.c: Likewise. * tests/xmconfigtest.c: Likewise. * tests/xml2sexprtest.c: Likewise.
This commit is contained in:
@@ -81,8 +81,8 @@ linuxTestCompareFiles(const char *cpuinfofile,
|
||||
ret = 0;
|
||||
|
||||
fail:
|
||||
free(expectData);
|
||||
free(actualData);
|
||||
VIR_FREE(expectData);
|
||||
VIR_FREE(actualData);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -117,9 +117,9 @@ linuxTestNodeInfo(const void *data)
|
||||
result = linuxTestCompareFiles(cpuinfo, sysfs_cpuinfo, output);
|
||||
|
||||
cleanup:
|
||||
free(cpuinfo);
|
||||
free(output);
|
||||
free(sysfs_cpuinfo);
|
||||
VIR_FREE(cpuinfo);
|
||||
VIR_FREE(output);
|
||||
VIR_FREE(sysfs_cpuinfo);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user