(cont *Container, want int)
| 180 | } |
| 181 | |
| 182 | func waitForProcessCount(cont *Container, want int) error { |
| 183 | cb := func() error { |
| 184 | pss, err := cont.Processes() |
| 185 | if err != nil { |
| 186 | err = fmt.Errorf("error getting process data from container: %w", err) |
| 187 | return &backoff.PermanentError{Err: err} |
| 188 | } |
| 189 | if got := len(pss); got != want { |
| 190 | log.Infof("Waiting for process count to reach %d. Current: %d", want, got) |
| 191 | return fmt.Errorf("wrong process count, got: %d, want: %d", got, want) |
| 192 | } |
| 193 | return nil |
| 194 | } |
| 195 | // Gives plenty of time as tests can run slow under --race. |
| 196 | return testutil.Poll(cb, pollTimeout) |
| 197 | } |
| 198 | |
| 199 | func blockUntilWaitable(pid int) error { |
| 200 | _, _, err := specutils.RetryEintr(func() (uintptr, uintptr, error) { |
no test coverage detected
searching dependent graphs…