From 582e1f0d1d51b9237d2dedfcb4c1540b849da8c2 Mon Sep 17 00:00:00 2001 From: Andrey Konovalov Date: Wed, 21 Nov 2018 16:44:29 +0100 Subject: ipc: add ProgInfo struct This patch add a new struct ProgInfo that for now holds info about each call in a program []CallInfo, but in the future will be expanded with remote coverage info. Update all the callers to use the new interface as well. --- pkg/ipc/ipc_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'pkg/ipc/ipc_test.go') diff --git a/pkg/ipc/ipc_test.go b/pkg/ipc/ipc_test.go index 55a8749bb..dba14b190 100644 --- a/pkg/ipc/ipc_test.go +++ b/pkg/ipc/ipc_test.go @@ -103,11 +103,11 @@ func TestExecute(t *testing.T) { if failed { t.Fatalf("program failed:\n%s", output) } - if len(info) == 0 { + if len(info.Calls) == 0 { t.Fatalf("no calls executed:\n%s", output) } - if info[0].Errno != 0 { - t.Fatalf("simple call failed: %v\n%s", info[0].Errno, output) + if info.Calls[0].Errno != 0 { + t.Fatalf("simple call failed: %v\n%s", info.Calls[0].Errno, output) } if len(output) != 0 { t.Fatalf("output on empty program") @@ -152,12 +152,12 @@ func TestParallel(t *testing.T) { err = fmt.Errorf("program failed:\n%s", output) return } - if len(info) == 0 { + if len(info.Calls) == 0 { err = fmt.Errorf("no calls executed:\n%s", output) return } - if info[0].Errno != 0 { - err = fmt.Errorf("simple call failed: %v\n%s", info[0].Errno, output) + if info.Calls[0].Errno != 0 { + err = fmt.Errorf("simple call failed: %v\n%s", info.Calls[0].Errno, output) return } if len(output) != 0 { -- cgit mrf-deployment