From 4d52d2f1c1f503c14d5087808bc26996f1a47aab Mon Sep 17 00:00:00 2001 From: Jeff Grafton Date: Fri, 12 Jun 2015 12:52:05 -0700 Subject: [PATCH] e2e: in core dump, add delta to waitgroup outside of goroutine. --- test/e2e/core.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/e2e/core.go b/test/e2e/core.go index c4e3a3a1b7c..346068058df 100644 --- a/test/e2e/core.go +++ b/test/e2e/core.go @@ -75,10 +75,9 @@ func logCore(cmds []command, hosts []string, dir, provider string) { for _, cmd := range cmds { fmt.Printf("SSH'ing to all nodes and running %s\n", cmd.cmd) for _, host := range hosts { + wg.Add(1) go func() { defer wg.Done() - wg.Add(1) - logfile := fmt.Sprintf("%s/%s-%s.log", dir, host, cmd.component) fmt.Printf("Writing to %s.\n", logfile) stdout, stderr, _, err := SSH(cmd.cmd, host, provider)