On Tue, Jul 16, 2019 at 10:54:34AM +0200, Michal Privoznik wrote:
Test if our parsing of interface stats as returned by ovs-vsctl
works as expected. To achieve this without having to mock
virCommand* I'm separating parsing of stats into a separate
function.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/libvirt_private.syms | 1 +
src/util/virnetdevopenvswitch.c | 93 ++++++++++++-------
src/util/virnetdevopenvswitch.h | 4 +
tests/Makefile.am | 13 ++-
tests/virnetdevopenvswitchdata/stats1.json | 1 +
tests/virnetdevopenvswitchdata/stats2.json | 1 +
tests/virnetdevopenvswitchtest.c | 101 +++++++++++++++++++++
7 files changed, 177 insertions(+), 37 deletions(-)
create mode 100644 tests/virnetdevopenvswitchdata/stats1.json
create mode 100644 tests/virnetdevopenvswitchdata/stats2.json
create mode 100644 tests/virnetdevopenvswitchtest.c
Reviewed-by: Ján Tomko <jtomko(a)redhat.com>
Jano